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
  • Building a cart
  • Initiating checkout
  • Configuring a checkout-session
  • Creating a checkout-session
  • The checkout-session identifier
  • Creating a Prebuilt Checkout
  • Prebuilt Checkout window
  • Name and address stage
  • Shipping choice stage
  • Tax identifiers stage
  • Payment stage
  • Order confirmation stage
  1. Integration options
  2. Low-code checkouts

Implementing a Prebuilt Checkout

Gain a basic understanding of how to add a Prebuilt Checkout to your site

PreviousLow-code checkoutsNextImplementing a Components checkout

Last updated 2 months ago

Prebuilt Checkout is a customizable checkout experience that connects an upstream commerce system with Digital River's , , , , fraud detection, tax exemption, and disclosure services.

The Prebuilt Checkout solution simplifies integrating with the and our front-end libraries, thereby shortening the time to deployment.

Once customers and , a Prebuilt Checkout integration needs to:

Building a cart

Initiating checkout

Configuring a checkout-session

Creating a checkout-session

curl --location --request POST 'https://api.digitalriver.com/drop-in/checkout-sessions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <secret API key>' \
...
--data-raw '{
    "currency": "USD",
    "customerType": "individual",
    "taxInclusive": false,
    "items": [
        {
            "skuId": "b535d75a-a6ee-4f63-be4d-c2e2537efec7",
            "quantity": 1,
            "price": 5
        }
    ],
    "shipFrom": {
        "address": {
            "line1": "10380 Bren Rd W",
            "line2": "",
            "city": "Minnetonka",
            "postalCode": "55129",
            "state": "MN",
            "country": "US"
        }
    },
    "options": {
        "shippingMethods": [
            {
                "amount": 5,
                "description": "standard",
                "serviceLevel": "SG"
            },
            {
                "amount": 15,
                "description": "next day",
                "serviceLevel": "ND"
            }
        ],
        "addresses": [
            {
                "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": "ヤマダ タロ"
                }
            },
            {
                "address": {
                    "line1": "62 Trinity Crescent",
                    "line2": "",
                    "city": "WHITCHURCH",
                    "postalCode": "CF4 9ZB",
                    "country": "GB"
                },
                "name": "Anna Brawner",
                "phone": "07854319925",
                "email": "anna@dr.com",
                "organization": "Digital River",
                "additionalAddressInfo": {
                    "neighborhood": "Centro",
                    "division": "営業部",
                    "phoneticName": "ヤマダ タロ"
                }
            }
        ]
    }
}'

The checkout-session identifier

{
    "id": "eb3b9cc3-d068-4300-9488-c88c0341b5db"
    ...
}

Creating a Prebuilt Checkout

<script src="https://checkout.digitalriverws.com/v1/DigitalRiverCheckout.js"></script>
document.getElementById('YOUR_CHECKOUT_BUTTON_ID').addEventListener('click', async (event) => {
  
   //Invokes a client defined function that creates a checkout session
   const checkoutSessionId = await createCheckoutSession();
  
   // Creates a Prebuilt Checkout and displays it in a modal window
   drCheckout.createModal(checkoutSessionId, config);
});
document.getElementById('YOUR_CHECKOUT_BUTTON_ID').addEventListener('click', async (event) => {
  
   //Invokes a client defined function that creates a checkout session
   const checkoutSessionId = await createCheckoutSession();
  
   // Creates a Prebuilt Checkout and displays it in an iframe
   drCheckout.embed(checkoutSessionId, config);
});

Prebuilt Checkout window

Name and address stage

Customers must always provide their name, phone number, email, and billing address at this stage.

Other required inputs and available options depend on whether the checkout involves:

Digital and physical products

Registered customers

Business-to-business transactions

Shipping choice stage

Tax identifiers stage

In guest checkouts, customers can enter a tax identifier but are not given the option to save the value to their account.

Payment stage

Saved payment methods

Save a payment method for future purchases

Prebuilt Checkout can ask customers whether they'd like to save a payment method for future purchases.

Custom consents

Order confirmation stage

Use the to

During the early stages of an eCommerce transaction, customers land on your storefront, review products, and build a cart. Digital River is typically not involved in these early pre-checkout interactions unless you . However, once customers , you must start interacting with Prebuilt Checkout.

Add a click event listener to each checkout button on your site. Handle the event by , passing that request data to your back-end server, and then securely .

Digital River returns a unique that you must pass, along with an optional , to on your front-end.

For details, refer to the page.

To create a checkout-session, send your and in a .

A 201 Created response to your contains a unique id.

Use this checkout-session identifier to .

Make sure you by adding the following script to your checkout page.

Use your to create a .

Next, you'll most likely want to .

Then, depending on whether you'd like Prebuilt Checkout to display in a or an , pass that object and the to either or , respectively.

After or is invoked, the checkout window opens and executes.

Depending on how the is configured, the experience takes customers through various stages:

Once customers successfully submit the required information, executes.

If any in the represent , customers are prompted for shipping information. Once validated, Digital River uses it to populate the shipTo and billTo.

Customers are given the option to input different billing information during the .

The experience doesn’t ask for shipping details in checkouts containing . Instead, it simply prompts customers for billing information.

If you send in the , customers can save their shipping and billing information for future checkouts. If you pass , customers are presented with these saved addresses for convenience.

If the is business, then customers must provide their company's name when entering shipping and billing information.

If you activate the feature, customers are shown a checkbox asking them whether they’d like to purchase on behalf of a business.

If contains physical goods, and then this toggle is displayed in the shipping information form. Otherwise, when are all digital, customers are presented with this option while supplying their billing information.

The experience prompts the user to choose shipping in transactions containing . For each in the , customers are always shown its description and amount.

Once customers input their shipping choice, executes.

The experience prompts the customer for their tax identification number for .

with applicable, saved tax identifiers can either select one of the values presented to them or enter a new one.

Registered customers who have no stored, transaction-applicable tax identifiers can save a new value for use in future checkouts. If they select this option, Digital River saves the tax identifier to the .

In , customers must enter a value before proceeding to the .

In the payment collection stage, customers are only shown that are appropriate to the transaction. Depending on how you configure the and on your settings, the experience can also:

.

Once customers provide payment, agree to the terms, and successfully submit the order, is called.

If you pass a in the , we retrieve and display any transaction-applicable payment that are saved to the referenced .

You must pass in the to activate this feature.

If the resource you reference doesn't exist in your account, Digital River creates a new and assigns it the identifier you passed.

If the payment method customers select supports , they are asked whether they'd like to save it for future purchases. If they opt to do so, we save it for that customer after Digital River creates the source.

Prebuilt Checkout presents users with the designated terms of sale and privacy policy for each displayed payment method.

If you , they are appended to Digital River's disclosures. Customers must accept all these terms and disclosures before completing the purchase.

To , you can to listen for the with a of .

Prebuilt Checkout only displays Digital River's disclosures if you don't

If you , Prebuilt Checkout displays Digital River's disclosures along with yours.

There are various ways to . The following is an example of the default option.

include DigitalRiverCheckout.js
build a configuration object
selling entity's
Define a checkout-session request
Create a checkout-session
checkout-session identifier
create a Prebuilt Checkout
Handle the checkout session order created event
engage our local pricing service
initiate checkout
defining a checkout-session request
sending a create checkout-session request
configuration object
checkout-session identifier
create checkout window method
create checkout-session request
create a Prebuilt Checkout
Name and address collection stage
Shipping choice collection stage
Tax identification number collection stage
Payment stage
Order confirmation stage
Physical and/or digital products
Registered customers
Customers conducting a B2B transaction
payment stage
Present saved payment methods
Save payment methods for future purchases
Display custom consents
local pricing
logistics
subscriptions
payment
build a cart
initiate checkout
DigitalRiverCheckout object
modal
iframe
checkout session identifier
payment methods
Digital River Dashboard
sources[]
configure a webhook
determine what disclosures customers accepted
create checkout-session request
payment stage
createModal()
embed()
createModal()
embed()
onReady
onAddressComplete
onDeliveryComplete
onCheckout Complete
configure the order confirmation stage
save your own consents in the Dashboard
save customized consents in the Digital River Dashboard
save the consents in the Digital River Dashboard
Digital River APIs
reusability
digital products
physical products
physical products
type
applicable checkouts
countries that require tax identifiers
public API key
secret API key
customer
Checkout-sessions
request payload
POST /drop-in/checkout-sessions
checkout-session
items[]
checkout-session
checkout-session's
customerId
options.addresses[]
checkout-session's
customerType
auto collect customer type
items[]
items[]
options.shippingMethods[]
checkout-session
Registered customers
customer’s record
checkout-session
customerId
create checkout session request
customer
customerId
create checkout session request
event
checkout_session.order.created