LogoLogo
System Status
  • Digital River API
  • Getting started
  • Using our services
    • Local pricing
    • Item classification
    • Subscriptions
    • e-Invoicing
  • Integration options
    • Low-code checkouts
      • Implementing a Prebuilt Checkout
      • Implementing a Components checkout
      • Offering local pricing
      • Using a shipping endpoint
      • Processing subscription acquisitions
      • Adding custom fields
      • Offering store credit
      • Displaying policies and getting consent
      • Collecting e-invoice information
      • Handling completed checkout-sessions
    • Direct integrations
      • Standard flow
      • Building checkouts
        • Checking out guest and registered customers
        • Describing line items
          • Setting the price of an item
          • Managing items with shared SKU identifiers
        • Providing address information
        • Handling shipping choice
        • Tax identifiers
        • Applying a discount
        • Setting the customer type
        • Providing the IP address
        • Selecting a currency
        • Initiating a charge
        • Setting the purchase location
        • Configuring taxes
        • Accessing regulatory fee information
        • Localizing invoices and credit memos
        • Providing an upstream identifier
        • Applying store credit
        • Handling e-invoicing requirements
        • Landed cost
        • Tax calculation inputs
        • Selling entities
        • Payment sessions
        • Applying store credit (legacy)
        • Country specs
      • Building payment workflows
        • Handling redirect payment methods
        • Handling delayed payment methods
      • Subscription acquisitions
        • Handling subscription acquisitions
        • Handling external subscription acquisitions
        • Subscription information
      • Digital River coordinated fulfillments
        • Checking inventory levels
        • Using shipping quotes
        • Reserving inventory items
        • Managing a fulfillment order
        • Cancelling a fulfillment order
    • Connectors
  • Order management
    • Processing orders
    • Handling a rejected order
    • Accessing invoices and credit memos
    • Fulfilling goods and services
    • Capturing and cancelling charges
    • Payment reauthorizations
    • Handling reversals
      • Return basics
        • Digital River coordinated returns
        • Third party coordinated returns
      • Refund basics
        • Issuing refunds
        • Refunding asynchronous payment methods
      • Disputes and chargebacks
    • Customer notifications
    • Responding to events
      • Events
        • Key event types
        • All event types
      • Webhooks
        • Creating a webhook
        • Digital River API safelist
        • Digital River signature
      • Expanding events
      • Preventing webhooks from getting disabled
    • Distributor model
  • Subscription Management
    • Managing a subscription
    • Managing an external subscription
  • Payments
    • Payment solutions
      • Drop-in payments
        • How Drop-in payments work
        • Drop-in payments integration guide
      • DigitalRiver.js with Elements
        • Elements integration guide
        • Configuring payment methods
          • Configuring Afterpay
          • Configuring Alipay+ (cross-border)
          • Configuring Alipay (domestic)
          • Configuring Amazon Pay
          • Configuring Apple Pay
          • Configuring Bancontact
          • Configuring BNP Paribas
          • Configuring BLIK
          • Configuring CCAvenue
          • Configuring Clearpay
          • Configuring Credit Cards
          • Configuring FPX Online Banking
          • Configuring Google Pay
          • Configuring iDEAL
          • Configuring Klarna
          • Configuring Konbini
          • Configuring Online Banking (IBP)
          • Configuring Online Banking (Korea Bank Transfer)
          • Configuring PayCo
          • Configuring PayPal
          • Configuring SEPA Direct Debit
          • Configuring Trustly
          • Configuring Wire Transfer
          • Common payment sources
          • Common payment objects
    • Supported payment methods
      • Afterpay
      • Alipay (domestic)
      • Alipay+ (cross-border)
      • Amazon Pay
      • Apple Pay
      • Bancontact
      • BNP Paribas
      • BLIK
      • CCAvenue
      • Clearpay
      • Credit Cards
      • FPX Online Banking
      • Google Pay
      • iDEAL
      • Klarna
      • Konbini
      • Korea Bank Transfer (Online Banking)
      • Online Banking (IBP)
      • Pay with Installments France
      • PayCo
      • PayPal
      • PayPal Billing Agreement
      • PayPal Credit
      • PayPal Pay in 3
      • PayPal Pay in 4
      • PayPal RatenZahlung (Installment Payment)
      • SEPA Direct Debit
      • Trustly
      • Wire Transfer
    • Source basics
      • Managing sources
      • Handling credit card sources
      • Retrieving sources
    • Authorization declines
    • PSD2 and SCA
      • How to ensure SCA compliance
    • Payment testing scenarios
  • Product management
    • Product basics
    • Managing SKUs
    • Using product details
    • Grouping SKUs
    • SKU-inventory item pairs
    • Managing inventory items
    • Regulatory fees
      • What are regulatory fees?
        • Fees terminology
        • Regulatory fee management
        • European regulatory fees
        • Compliance obligations
        • WEEE directive requirements
        • Copyright directive requirements
        • Compliance challenges
      • Managing regulatory fees
  • Customer management
    • Customer basics
    • Creating and updating customers
    • Setting up tax exemptions
    • Recording a customer's request to be forgotten
  • Financial reporting
    • Financials basics
    • Sales transactions
      • Returning a list of sales transactions
      • Getting a sales transaction by ID
    • Sales summaries
      • Returning a list of sales summaries
      • Getting a sales summary by ID
    • Payouts
      • Returning a list of payouts
      • Getting a payout by ID
      • Get a list of transactions included in payout by ID
  • Developer resources
    • Digital River API reference
    • DigitalRiver.js reference
      • Including DigitalRiver.js
      • Initializing DigitalRiver.js
      • DigitalRiver object
      • Elements
        • Amazon Pay element
        • Apple Pay elements
        • Google Pay elements
        • IBAN element
        • iDEAL element
        • Konbini elements
        • Compliance element
        • Offline Refund elements
        • Online Banking elements
        • Tax Identifier element
        • Invoice attribute element
        • Delayed Payment Instructions element
        • PayPal elements
      • Guidelines for capturing payment details
      • Security
      • Digital River payment objects
      • Error types, codes, and objects
    • DigitalRiverCheckout.js reference
      • Including DigitalRiverCheckout.js
      • Initializing DigitalRiverCheckout.js
        • DigitalRiverCheckout configuration object
      • DigitalRiverCheckout object
        • Configuring Prebuilt Checkout
          • Performing actions
          • Defining experience
        • Components
          • Configuring components
          • Address component
          • Shipping component
          • Tax identifier component
          • Invoice component
          • Wallet component
          • Payment component
          • Compliance component
          • Order summary component
          • Thank you component
        • Rendering a checkout button
          • Performing actions on the checkout button
        • Determining the checkout's status
      • Accessing country and currency
    • DynamicPricing.js reference
    • Postman collection
  • administration
    • Sign in
    • Digital River Dashboard
      • Digital River Dashboard quick start guide
      • Key features
      • Reset your password
      • Test and production environments
      • Account
        • Adding an account
        • Switching accounts
        • Account access
      • Profile settings
        • Viewing your personal information
        • Changing your password
        • Updating your phone number
        • Enabling multi-factor authentication
      • Finance
        • Payouts
          • Viewing your payout details
          • Filtering your payouts
          • Exporting your payouts
        • Sales summaries
          • Viewing your sales summaries details
          • Filtering your sales summaries
          • Exporting your sales summaries
          • Exporting your sales summary details
        • Transactions
          • Viewing your transaction details
          • Filtering your transactions
          • Exporting your transactions
      • Order management
        • Orders
          • Searching for orders
          • Filtering your orders
          • Viewing the order details
          • Cancelling items
          • Fulfilling items
          • Downloading an invoice
          • Downloading a credit memo
          • Creating shipping labels
          • Recording a customer's request to be forgotten
          • Viewing returns and refunds
          • Creating a return
          • Accepting a return
          • Creating a refund
          • Viewing the order's timeline
        • Checkouts
          • Searching for checkouts
          • Filtering your checkouts
          • Viewing the checkout details
        • Prebuilt Checkout links
          • Generate Prebuilt Checkout links
          • View and work with Prebuilt Checkout link details
          • Add a customer during Prebuilt Checkout
          • Add a product during Prebuilt Checkout
      • Customers
        • Viewing customer details
        • Searching for customers
        • Filtering your customers
        • Editing account information
        • Adding a customer
        • Tax IDs and certificates
          • Adding a tax certificate
          • Adding a tax ID
          • Deleting a tax ID
        • Metadata
          • Adding metadata
          • Editing metadata
        • Manage subscriptions from the Customer Details page
        • Disabling a customer
        • Recording a customer's request to be forgotten
        • Deleting a customer
      • Catalog
        • SKUs
          • Viewing the SKU details
          • Searching for SKUs
          • Filtering your SKUs
          • Adding a SKU
          • Editing a SKU
          • Deleting a SKU
          • Adding a fee to a SKU
          • Editing a fee
          • Deleting a fee
          • Viewing product tariff codes
        • Managing customer subscriptions from Digital River Dashboard
      • Developers
        • API keys
          • Updating your API version
          • Getting your API keys
          • Changing the API version for your key
          • Creating a restricted key
          • Editing a restricted key
          • Deleting a restricted key
          • Rotating keys
        • Webhooks
          • Creating a webhook
          • Editing a webhook
          • Deleting a webhook
          • Rotating a webhook's secret
        • API logs
          • Filtering the API log
          • Viewing the API log details
        • Event logs
          • Filtering the events log
          • Viewing the event details
      • Settings
        • Users and roles
          • Roles
          • Searching for a user by name or email
          • Filtering your users and roles
          • Adding a user
          • Editing a user
          • Deleting a user
        • Prebuilt Checkout
        • Payment methods
          • Viewing your payment methods
          • Viewing payment method details
            • Enabling currencies
            • Managing countries
          • Enabling or disabling a payment method
  • General Resources
    • eCompass
    • eCompass documentation
    • Release notes
      • 2024
      • 2023
      • 2022
      • 2021
      • 2020
      • 2019
    • Standards and certifications
      • Certification process
      • Compliance requirements
      • Documentation requirements
      • Integration checklists
        • Admin portal
        • Products and SKUs
        • Customers and tax exemptions
        • Checkouts, payment sources, and orders
        • Disclosures, compliance statements, and emails
        • Fulfillments and cancellations
        • Customer portal
        • Order refund synchronization
        • Reversals
        • Error handling
      • Test and use cases
    • Commerce infrastructure
    • Versioning
    • Glossary
Powered by GitBook
On this page
  • Designating a container for an Inline Frame
  • Defining the checkout experience
  • Set display mode
  • Stylize the modal
  • Localize the experience
  • Customize order confirmation
  • Restrict shipping and billing countries
  • Modify the text of the country drop-down menu's label
  • Define the payment experience
  • Responding to front-end events
  • onInit
  • onReady
  • onAddressComplete
  • onDeliveryComplete
  • onCheckoutComplete
  • onClose
  • onError
  1. Developer resources
  2. DigitalRiverCheckout.js reference
  3. DigitalRiverCheckout object

Configuring Prebuilt Checkout

Gain a better understanding of the functionality that exists within the Prebuilt Checkout modal's configuration object

PreviousDigitalRiverCheckout objectNextPerforming actions

Last updated 2 months ago

The and functions, which are exposed by , accept an optional configuration object that allows you to define:

const config = {
    containerElementId: "PBC",
    options: options,
    paymentMethod: paymentMethod,
    onInit: (checkoutSession, actions) => {},
    onReady: () => {},
    onAddressComplete: (address, actions) => {},
    onDeliveryComplete: (shippingMethod) => {},
    onPaymentCancel: () => {},
    onCheckoutComplete: (order) => {},
    onError: () => {},
    onClose: () => {}
};

Designating a container for an Inline Frame

<body>
    <div id="PBC"></div>
</body>

const config = {
    containerElementId: "PBC",
    ...
};

Defining the checkout experience

Set display mode

const options = {
  ...
  displayMode: 'fullPage',
  ...
};

A standard value results in a window whose dimensions are less than those of the browser window while fullPage expands the window to the edges of the browser window.

Stylize the modal

Localize the experience

const options = {
  ...
  language: 'en-gb',
  ...
};

Customize order confirmation

  • Custom page: To redirect customers to your fully customized order confirmation page, pass the appropriate web address.

const options = {
    ...
    thankYouPage: 'https://www.mysite.com/order-confirmation-page'
};

Restrict shipping and billing countries

const options = {
    ...
    shipToCountries: ['AT', 'BE', 'DE', 'ES', 'FR', 'IT'],
    billToCountries: ['DE', 'ES', 'FR', 'IT']
};

Modify the text of the country drop-down menu's label

const config = {
  "options": {
    "labelText": {
      "country": {
        "en-us": "An American custom label",
        "en-gb": "A British custom label",
        "zh-tw": "寄送地",
        "zh-hk": "寄送地",
        "zh": "寄送地"
      }
    }, 
    "language": "en-gb"
  }
};

Define the payment experience

You can also use paymentMethod to:

const paymentMethod = {
    "style": {
        "base": {
            "color": "#495057",
            "height": "35px",
            "fontSize": "1rem",
            "fontFamily": "apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif",
            ":hover": {
                "color": "#137bee",
            },
            "::placeholder": {
                "color": "#999"
            },
            ":-webkit-autofill": {
                "color": "purple"
            },
            ":focus": {
                "color": "blue"
            }
        },
        "invalid": {
            "color": "#dc3545",
            ":-webkit-autofill": {
                "color": "#dc3545"
            }
        },
        "complete": {
            "color": "#28a745",
            ":hover": {
                "color": "#28a745",
            },
            ":-webkit-autofill": {
                "color": "#28a745"
            }
        },
        "empty": {
            "color": "#000000"
        }
    },
    "creditCard": {
        "cardNumberPlaceholderText": "Credit Card Number",
        "cardExpirationPlaceholderText": "MM/YY",
        "cardCvvPlaceholderText": "CVV",
        "style": styles,
        "mask": true
    },
    "onlineBanking": {
        "style": styles,
        "placeholderText": "Select a Bank",
    },
    "googlePay": {
        "style": {
            "buttonType": "plain",
            "buttonColor": "dark",
            "buttonLanguage": "en"
        }
    },
    "applePay": {
        "style": {
            "buttonType": "plain",
            "buttonColor": "dark",
            "buttonLanguage": "en"
        }
    },
    "payPal": {
        "style": {
            "label": "checkout",
            "size": "responsive",
            "color": "gold",
            "shape": "pill",
            "fundingicons": "false",
            "tagline": "false"
        },
    },
    "enabledPaymentMethods": ["creditCard", "payPal"],
    "disabledPaymentMethods": ["klarna"]
}

Style the overall payment experience

Style credit cards

To configure how credit cards are displayed, define one or more of the nested objects in creditCard.

  • mask: A boolean that determines whether card numbers and security codes get masked after they've been entered by users.

  • cardNumberPlaceholderText: The placeholder that is shown in the card number field.

  • cardExpirationPlaceholderText: The placeholder that is shown in the card expiration date field.

  • cardCvvPlacholderText: The placeholder that is shown in the card security code field.

The values you assign to cardNumberPlaceholderText, cardExpirationPlaceholderText, and cardCvvPlacholderText are not localized.

Style Google Pay

Style Apple Pay

Style PayPal

Property
Description
Accepted values

label

Customizes the button's label.

paypal (default), pay, checkout, and buynow

color

Sets the color of the button.

gold (default), silver, black, white and blue

shape

Determines the shape of the button.

pill (default) and rect

fundingicons

A boolean that determines whether icons, which as a visual cue of the stored payment methods, display below the button.

true or false (default)

tagline

A boolean that determines whether a PayPal slogan displays beneath the button.

For this feature to work, fundingicons must be false.

true or false (default)

Style online banking

  • placeholderText: The placeholder that appears in the online banking selector.

Enable and disable payment methods

To display and hide specific payment methods, provide a list of enabledPaymentMethods and disabledPaymentMethods.

Responding to front-end events

As events occur during the checkout process, these methods are executed.

const config = {
    ....
    onInit: (checkoutSession, actions) => {},
    onReady: () => {},
    onAddressComplete: (address, actions) => {},
    onDeliveryComplete: (shippingMethod) => {},
    onPaymentCancel: () => {},
    onCheckoutComplete: (order) => {},
    onError: () => {},
    onClose: () => {}
};

onInit

...
onInit = (checkoutSession, actions) => {},
...

onReady

....
onReady: () => {},
...

onAddressComplete

...
onAddressComplete: (address, actions) => {},
...

If passed, then onAddressComplete returns address, which contains the customer’s billing and shipping data.

{
    "address": {
        "billing": {
            "address": {
                "line1": "10380 Bren Rd W",
                "line2": "line 2",
                "city": "Minnetonka",
                "postalCode": "55129",
                "state": "MN",
                "country": "US"
            },
            "name": "John Smith",
            "phone": "952-111-1111",
            "email": "jsmith@digitalriver.com",
            "organization": "Digital River",
            "additionalAddressInfo": {
                "neighborhood": "Centro",
                "division": "営業部",
                "phoneticName": "ヤマダ タロ"
            },
            "saveForLater": false
        },
        "shipping": {
            "address": {
                "line1": "10380 Bren Rd W",
                "line2": "line 2",
                "city": "Minnetonka",
                "postalCode": "55129",
                "state": "MN",
                "country": "US"
            },
            "name": "John Smith",
            "phone": "952-111-1111",
            "email": "jsmith@digitalriver.com",
            "organization": "Digital River",
            "additionalAddressInfo": {
                "neighborhood": "Centro",
                "division": "営業部",
                "phoneticName": "ヤマダ タロ"
            },
            "saveForLater": false
        }
    }
}

onDeliveryComplete

    ....
    onDeliveryComplete: (shippingMethod) => {},
    ....

If passed, then onDeliveryComplete returns a shippingMethod that contains the customer’s selection, along with its calculated taxAmount.

{
    "amount": 5,
    "description": "standard",
    "serviceLevel": "SG",
    "taxAmount": 0.37
}

onCheckoutComplete

    ....
    onCheckoutComplete: (order) => {
        console.log('[onCheckoutComplete callback]', order);
    },
    ....
{
    "id": "1038474530082",
    "checkoutId": "978785ba-07fc-4acd-9eaa-960ab512766c",
    "checkoutSessionId": "41dc1898-81fa-43af-a128-480320a443f9",
    "createdTime": "2022-07-11T19:22:46Z",
    "currency": "USD",
    "email": "jsmith@digitalriver.com",
    "shipTo": {
        "address": {
            "line1": "10380 Bren Rd W",
            "line2": "line 2",
            "city": "Minnetonka",
            "postalCode": "55129",
            "state": "MN",
            "country": "US"
        },
        "name": "John Smith",
        "phone": "952-111-1111",
        "email": "jsmith@digitalriver.com",
        "organization": "Digital River",
        "additionalAddressInfo": {
            "neighborhood": "Centro",
            "division": "営業部",
            "phoneticName": "ヤマダ タロ"
        },
        "saveForLater": false
    },
    "shipFrom": {
        "address": {
            "line1": "10380 Bren Rd W",
            "city": "Minnetonka",
            "postalCode": "55129",
            "state": "MN",
            "country": "US"
        }
    },
    "billTo": {
        "address": {
            "line1": "10380 Bren Rd W",
            "line2": "line 2",
            "city": "Minnetonka",
            "postalCode": "55129",
            "state": "MN",
            "country": "US"
        },
        "name": "John Smith",
        "phone": "952-111-1111",
        "email": "jsmith@digitalriver.com",
        "organization": "Digital River",
        "additionalAddressInfo": {
            "neighborhood": "Centro",
            "division": "営業部",
            "phoneticName": "ヤマダ タロ"
        },
        "saveForLater": false
    },
    "totalAmount": 10.74,
    "subtotal": 10,
    "totalFees": 0,
    "totalTax": 0.74,
    "totalImporterTax": 0,
    "totalDuty": 0,
    "totalDiscount": 0,
    "totalShipping": 5,
    "items": [
        {
            "id": "50418820082",
            "sku": {
                "id": "b646aeaa-efe1-4fe4-a88f-73212b40381c",
                "name": "Widget",
                "eccn": "EAR99",
                "taxCode": "4323.310_A",
                "physical": true,
                "metadata": {
                    "customAttribute1": "some value"
                }
            },
            "amount": 5,
            "quantity": 1,
            "tax": {
                "rate": 0.07375,
                "amount": 0.37
            },
            "importerTax": {
                "amount": 0
            },
            "duties": {
                "amount": 0
            },
            "availableToRefundAmount": 0,
            "fees": {
                "amount": 0,
                "taxAmount": 0
            }
        }
    ],
    "shippingChoice": {
        "amount": 5,
        "description": "standard",
        "serviceLevel": "SG",
        "taxAmount": 0.37
    },
    "updatedTime": "2022-07-11T19:22:46Z",
    "locale": "en_US",
    "customerType": "individual",
    "sellingEntity": {
        "id": "C5_INC-ENTITY",
        "name": "DR globalTech Inc."
    },
    "payment": {
        "charges": [
            {
                "id": "c40a8740-fd56-41df-8ca3-0ebd12fcf9e7",
                "createdTime": "2022-07-11T19:22:49Z",
                "currency": "USD",
                "amount": 10.74,
                "state": "capturable",
                "captured": false,
                "refunded": false,
                "sourceId": "ab6078ef-deeb-4728-9217-ec81f0b70af6",
                "type": "customer_initiated"
            }
        ],
        "sources": [
            {
                "id": "ab6078ef-deeb-4728-9217-ec81f0b70af6",
                "type": "creditCard",
                "amount": 10.74,
                "owner": {
                    "firstName": "John",
                    "lastName": "Smith",
                    "email": "jsmith@digitalriver.com",
                    "address": {
                        "line1": "10380 Bren Rd W",
                        "line2": "line 2",
                        "city": "Minnetonka",
                        "postalCode": "55129",
                        "state": "MN",
                        "country": "US"
                    },
                    "organization": "Digital River",
                    "additionalAddressInfo": {
                        "neighborhood": "Centro",
                        "phoneticFirstName": "ヤマダ",
                        "phoneticLastName": "タロ",
                        "division": "営業部"
                    }
                },
                "creditCard": {
                    "brand": "Visa",
                    "expirationMonth": 12,
                    "expirationYear": 2023,
                    "lastFourDigits": "1111"
                }
            }
        ],
        "session": {
            "id": "98fbc79d-d649-4f6b-8e55-45bda0f542b9",
            "amountContributed": 10.74,
            "amountRemainingToBeContributed": 0,
            "state": "complete",
            "clientSecret": "98fbc79d-d649-4f6b-8e55-45bda0f542b9_652d201c-799e-4d35-928b-3ccc3ccf4635"
        }
    },
    "state": "accepted",
    "stateTransitions": {
        "accepted": "2022-07-11T19:22:51Z"
    },
    "fraudState": "passed",
    "fraudStateTransitions": {
        "passed": "2022-07-11T19:22:51Z"
    },
    "taxInclusive": false,
    "consents": {
        "termsOfService": true,
        "eula": true,
        "termsOfSale": true
    },
    "liveMode": false
}

onClose

The onClose method, which optionally accepts checkoutCompleted, executes when customers close Prebuilt Checkout.

    ....
    onClose: (checkoutCompleted) => {}

onError

The onError method, which optionally accepts error, executes when a problem occurs during the checkout process.

    ....
    onError: (error) => {
          console.log('[onError callback]', error);
          console.log(error.errors[0].message);
        }
    ...

If passed, then onError returns an error that contains a type and an array of errors[], each element of which provides more details on the triggering event.

{
    "type": "bad_request",
    "errors": [
        {
            "code": "invalid_parameter",
            "parameter": "address.postalCode",
            "message": "A required address parameter, postal code, is invalid."
        }
    ]
}

If you implement and want Digital River to add the iframe which displays a to a specific HTML element, then assigns that element's identifier to containerElementId.

In options, you can control the appearance and behavior of a . Specifically, you can use options to:

In , the displayMode, whose value can either be standard (default) or fullPage, controls the size of the checkout window.

Set style.experience in to alter the checkout window's logo, theme, borders, text fields, and fonts. For details, refer to .

Digital River localizes the by default based on the customer’s browser settings. But if you want to control the language of the experience, set language in .

If you do define options.language, then Digital River assigns the same value to in the .

For a list of accepted values, refer to .

By setting thankYouPage in , you can configure the .

Default window: To display Digital River's default order confirmation, omit thankYouPage. You can customize this default confirmation by calling , which is exposed by .

Close window: If you want the to immediately close after customers place an order, set thankYouPage to none.

By setting shipToCountries and/or billToCountries in , you can restrict the values displayed in the drop-down menus that customers use to select a country in the .

The values you pass must be formatted as two-letter as described in the international standard.

By adding labelText.country.* in , you can modify the text of the country drop-down menu's label in both the .

If a country.* matches , then Digital River updates the label's text.

In , you can use paymentMethod to control the appearance and behavior of the . Specifically, paymentMethod allows you to style:

also use the paymentMethod object; the only difference is that it's named .

To capture secure payment details, wraps with a predetermined style. But you can customize their look and feel by defining style.

For details, refer to .

style: For details, refer to .

For details on googlePay.style, refer to .

For details on applePay.style, refer to .

All the properties of payPay.style, which styles the button, are optional.

To configure the appearance of the payment method, define one or more of the nested objects in onlineBanking.

style: For details, refer to .

For details on how to format these values, refer to .

If you don't populate either of these arrays, then, by default, displays all transaction-applicable payment methods. If enabledPaymentMethods contains a value that doesn't meet this precondition, then it's not presented as an option to customers.

In the , you can define methods and assign them to its , , , , , , and properties.

The onInit method, which accepts checkoutSession and , executes when Prebuilt Checkout initializes.

The onReady method executes when the is created, and the Prebuilt Checkout is loaded and ready for customer interaction.

The onAddressComplete method, which accepts an optional address and , executes when customers successfully submit their shipping and/or billing information and the shipTo and/or billTo is updated.

The onDeliveryComplete method, which optionally accepts shippingMethod, executes when , and the shippingChoice is successfully updated.

The onCheckoutComplete method, which optionally accepts order, executes when , and Digital River adds to the and creates the .

If passed, then onCheckoutComplete returns the .

If passed, checkoutCompleted returns a boolean that indicates whether it closed before the checkout process is completed. If true, customers close the window in the . If false, it was closed in an earlier stage.

Alpha-2 country codes
ISO 3166
Prebuilt Checkout
elements
PayPal
online banking
actions
Set the display mode
Stylize the modal
Localize the modal
Customize order confirmation notifications
Restrict shipping and billing countries
Modify the text of the country drop-down menu's label
options
Defining experience
options
language
The overall payment experience
Credit cards
Google Pay
Apple Pay
PayPal
Online banking
Enable and disable specific payment methods
Prebuilt Checkout configuration object
onInit
onReady
onAddressComplete
onDeliveryComplete
onCheckoutComplete
onClose
onError
DigitalRiverCheckout
Customized actions
A container for Prebuilt Checkout
The overall checkout experience
The payment experience
How your application handles callbacks
Prebuilt Checkout's configuration object
Drop-in payments
actions
sources[]
options
options
options
options
Prebuilt Checkout
Prebuilt Checkout window
order confirmation stage
Prebuilt Checkout window
name and address collection stage
shipping and billing information collection stage
payment collection stage
Prebuilt Checkout
order confirmation stage
Prebuilt Checkout
customers submit their shipping method choice
customers provide payment and submit the order
createModal()
embed()
embed()
paymentMethodConfiguration
replaceDefaultMessage()
actions.thankYouPage
Source types
Google Pay element styles and customization
Styling an element container
Styling an element container
Styling an element container
Apple Pay styles and customization
language
checkout-session
checkout-session
checkout-session's
checkout-session's
checkout-session
order
order
Supported languages