# Implementing a Prebuilt Checkout

Prebuilt Checkout is a customizable checkout experience that connects an upstream commerce system with Digital River's [local pricing](https://docs.digitalriver.com/digital-river-api/integration-options/low-code-checkouts/offering-local-pricing), [logistics](https://docs.digitalriver.com/digital-river-api/integration-options/low-code-checkouts/using-a-shipping-endpoint), [subscriptions](https://docs.digitalriver.com/digital-river-api/integration-options/low-code-checkouts/processing-subscription-acquisitions), [payment](https://docs.digitalriver.com/digital-river-api/payments/payment-integrations-1), fraud detection, tax exemption, and disclosure services.

The Prebuilt Checkout solution simplifies integrating with the [Digital River APIs](https://app.gitbook.com/o/-LqC_Nsz4Z-JxICCsFw3/s/ZrhMyLX5esFYS64lNWVW/) and our front-end libraries, thereby shortening the time to deployment.

![](https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2F8oIPiYtNtQiqx3bpkkPI%2Fimage.png?alt=media\&token=0ddae280-476a-43b9-9c9e-208e1b75f039)

Once customers [build a cart](#building-a-cart) and [initiate checkout](#initiating-checkout), a Prebuilt Checkout integration needs to:

* [Define a checkout-session request](#configuring-a-checkout-session)
* [Create a checkout-session](#creating-a-checkout-session)
* Use the [checkout-session identifier](#the-checkout-session-identifier) to [create a Prebuilt Checkout](#creating-a-drop-in-checkout-modal)
* [Handle the checkout session order created event](#handling-the-checkout-session-order-created-event)

## Building a cart

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 [engage our local pricing service](https://docs.digitalriver.com/digital-river-api/integration-options/low-code-checkouts/offering-local-pricing). However, once customers [initiate checkout](#initiating-checkout), you must start interacting with Prebuilt Checkout.

## Initiating checkout

Add a click event listener to each checkout button on your site. Handle the event by [defining a checkout-session request](#configuring-a-checkout-session), passing that request data to your back-end server, and then securely [sending a create checkout-session request](#creating-a-checkout-session).

Digital River returns a unique [checkout-session identifier](#the-checkout-session-identifier) that you must pass, along with an optional [configuration object](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object/configuring-prebuilt-checkout), to [create checkout window method](#creating-a-drop-in-checkout-modal) on your front-end.

## Configuring a checkout-session

For details, refer to the [Checkout-sessions](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics) page.

## Creating a checkout-session

To create a checkout-session, send your [secret API key](https://app.gitbook.com/s/ZrhMyLX5esFYS64lNWVW/digital-river-api-reference-guide/api-structure#confidential-keys) and [request payload](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics) in a [`POST /drop-in/checkout-sessions`](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions#drop-in-checkout-sessions).

```
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

A `201 Created` response to your [create checkout-session request](#creating-a-checkout-session) contains a unique `id`.

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

Use this checkout-session identifier to [create a Prebuilt Checkout](#creating-a-drop-in-checkout-modal).

## Creating a Prebuilt Checkout <a href="#creating-a-drop-in-checkout-modal" id="creating-a-drop-in-checkout-modal"></a>

Make sure you [include DigitalRiverCheckout.js](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/including-digitalrivercheckout.js) by adding the following `script` to your checkout page.

```html
<script src="https://checkout.digitalriverws.com/v1/DigitalRiverCheckout.js"></script>
```

Use your [public API key](https://app.gitbook.com/s/ZrhMyLX5esFYS64lNWVW/digital-river-api-reference-guide/api-structure#public-keys) to create a [`DigitalRiverCheckout` object](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object).

Next, you'll most likely want to [build a configuration object](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object/configuring-prebuilt-checkout).

Then, depending on whether you'd like Prebuilt Checkout to display in a [modal](https://en.wikipedia.org/wiki/Modal_window) or an [iframe](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe), pass that object and the [checkout session identifier](#the-checkout-session-identifier) to either [`createModal()`](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object#create-an-instance-of-the-checkout-modal) or [`embed()`](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object#embed-checkoutsessionid-config), respectively.

{% tabs %}
{% tab title="Modal" %}

```javascript
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);
});
```

{% endtab %}

{% tab title="Inline Frame" %}

```javascript
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);
});
```

{% endtab %}
{% endtabs %}

## Prebuilt Checkout window <a href="#drop-in-checkout-modal-window" id="drop-in-checkout-modal-window"></a>

After [`createModal()`](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object#create-an-instance-of-the-checkout-modal) or [`embed()`](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object#embed-checkoutsessionid-config) is invoked, the checkout window opens and [`onReady`](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object/configuring-prebuilt-checkout#onready) executes.

Depending on how the [checkout-session](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics) is configured, the experience takes customers through various stages:

* [Name and address collection stage](#name-and-address)
* [Shipping choice collection stage](#shipping-choice)
* [Tax identification number collection stage](#tax-identifiers)
* [Payment stage](#payment)
* [Order confirmation stage](#order-confirmation)

### Name and address stage <a href="#name-and-address" id="name-and-address"></a>

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:

* [Physical and/or digital products](#digital-and-physical-products)
* [Registered customers](#registered-customers)
* [Customers conducting a B2B transaction](#business-to-business-transactions)

Once customers successfully submit the required information, [`onAddressComplete`](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object/configuring-prebuilt-checkout#onaddresscomplete) executes.

#### Digital and physical products

If any [`items[]`](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics) in the [checkout-session](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics) represent [physical products](https://docs.digitalriver.com/digital-river-api/product-management/skus#how-products-are-classified-as-physical-or-digital), customers are prompted for shipping information. Once validated, Digital River uses it to populate the [checkout-session's](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics) `shipTo` and `billTo`.

{% hint style="info" %}
Customers are given the option to input different billing information during the [payment stage](#payment).
{% endhint %}

The experience doesn’t ask for shipping details in checkouts containing [digital products](https://docs.digitalriver.com/digital-river-api/product-management/skus#how-products-are-classified-as-physical-or-digital). Instead, it simply prompts customers for billing information.

{% tabs %}
{% tab title="Physical products" %}

<div align="left"><img src="https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2FCeYjFkS5NcnsCs8scsnE%2FShipping%20information%20(guest%20customer).png?alt=media&#x26;token=55479848-d3ea-488b-b305-ae102bef53dc" alt=""></div>
{% endtab %}

{% tab title="Digital only products" %}

<div align="left"><img src="https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2FQJkfDFrrRoe2UOluoyN5%2FBilling%20information%20(guest%20customer).png?alt=media&#x26;token=d70e8ea3-edb3-4b4e-b9ba-4a68c6111b44" alt=""></div>
{% endtab %}
{% endtabs %}

#### Registered customers

If you send [`customerId` ](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics#customer-identifier)in the [create checkout-session request](#creating-a-checkout-session), customers can save their shipping and billing information for future checkouts. If you pass [`options.addresses[]`](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics#saved-addresses), customers are presented with these saved addresses for convenience.

{% tabs %}
{% tab title="Save address option" %}

<div align="left"><figure><img src="https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2F9AzXLZutPjdRfliSdNfE%2Fimage.png?alt=media&#x26;token=1f031fe0-0f63-44d9-8e06-6b1234bf4022" alt=""><figcaption></figcaption></figure></div>
{% endtab %}

{% tab title="Saved addresses" %}

<div align="left"><figure><img src="https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2FFAes6Esd2QCYRApPhvJc%2Fimage.png?alt=media&#x26;token=2bd2505e-75d6-44d3-90f5-27529a2c6360" alt=""><figcaption></figcaption></figure></div>
{% endtab %}
{% endtabs %}

#### Business-to-business transactions

If the [checkout-session's](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics) [`customerType` ](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics#customer-type)is `business`, then customers must provide their company's name when entering shipping and billing information.

{% tabs %}
{% tab title="Shipping information" %}

<div align="left"><figure><img src="https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2FeCR3US7TOlXM6V4p4E56%2Fimage.png?alt=media&#x26;token=209fe3a1-70e9-4633-9e40-aa4efd535d8f" alt=""><figcaption></figcaption></figure></div>
{% endtab %}

{% tab title="Billing information" %}

<div align="left"><figure><img src="https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2FvVNVyGIPsK8wev4anSjX%2Fimage.png?alt=media&#x26;token=019bd4d4-7819-40c5-b2f2-a91bf80fa1b1" alt=""><figcaption></figcaption></figure></div>
{% endtab %}
{% endtabs %}

If you activate the [auto collect customer type](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics#auto-collect-customer-type) feature, customers are shown a checkbox asking them whether they’d like to purchase on behalf of a business.

If [`items[]`](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics) contains physical goods, and then this toggle is displayed in the shipping information form. Otherwise, when [`items[]`](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics) are all digital, customers are presented with this option while supplying their billing information.

<div align="left"><figure><img src="https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2FDspXECnOiLEIq4ewOD5N%2FAuto%20collect%204.png?alt=media&#x26;token=9dc7cf62-927e-4175-9948-b4f6f9e0d03d" alt=""><figcaption></figcaption></figure></div>

### Shipping choice stage <a href="#shipping-choice" id="shipping-choice"></a>

The experience prompts the user to choose shipping in transactions containing [physical products](https://docs.digitalriver.com/digital-river-api/product-management/skus#how-products-are-classified-as-physical-or-digital). For each [`options.shippingMethods[]`](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics#shipping-methods) in the [checkout-session](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics), customers are always shown its `description` and `amount`.

<div align="left"><img src="https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2FsG74smmFHFzCNq11nQTQ%2FShipping%20choice%20(static).png?alt=media&#x26;token=15332979-b10b-4456-9c62-36528f1537e3" alt=""></div>

Once customers input their shipping choice, [`onDeliveryComplete`](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object/configuring-prebuilt-checkout#ondeliverycomplete) executes.

### Tax identifiers stage <a href="#tax-identifiers" id="tax-identifiers"></a>

The experience prompts the customer for their tax identification number for [applicable checkouts](https://docs.digitalriver.com/digital-river-api/checkouts/creating-checkouts/tax-identifiers#supported-tax-identifiers).

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

<div align="left"><img src="https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2FPMEuv3twCe1eb1Pm69D2%2Ftax%20identifiers%20(guest%20customer).png?alt=media&#x26;token=c0d45c9e-498c-41f0-9bd6-ff4450ecb2e5" alt=""></div>

[Registered customers](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics#registered-customers) with applicable, saved tax identifiers can either select one of the values presented to them or enter a new one.

<div align="left"><img src="https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2FD1bBYPafMZ1WCos3MptP%2Ftax%20identifiers%20(registered%20customer).png?alt=media&#x26;token=a1f42c3c-cdac-41a7-b5f0-84e4d5e73ec5" alt=""></div>

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 [customer’s record](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/customers).

<div align="left"><img src="https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2FC8qaxxVLR37GrIaNjkyq%2Ftax%20identifiers%20(registered%20customer%20with%20save%20for%20later%20option).png?alt=media&#x26;token=a44bfb03-02c8-42c9-a228-b7ae8f6b1ca9" alt=""></div>

In [countries that require tax identifiers](https://docs.digitalriver.com/digital-river-api/checkouts/creating-checkouts/tax-identifiers#supported-tax-identifiers), customers must enter a value before proceeding to the [payment stage](#payment).

### Payment stage <a href="#payment" id="payment"></a>

In the payment collection stage, customers are only shown [payment methods](https://docs.digitalriver.com/digital-river-api/payments/supported-payment-methods) that are appropriate to the transaction. Depending on how you configure the [checkout-session](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics) and on your [Digital River Dashboard](https://docs.digitalriver.com/digital-river-api/administration/dashboard) settings, the experience can also:

* [Present saved payment methods](#saved-payment-methods)
* [Save payment methods for future purchases](#save-a-payment-method-for-future-purchases)
* [Display custom consents](#custom-consents).

Once customers provide payment, agree to the terms, and successfully submit the order, [`onCheckout                                                                                                            Complete`](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object/configuring-prebuilt-checkout#oncheckoutcomplete) is called.

#### Saved payment methods

If you pass a [`customerId` ](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics#customer-identifier)in the [create checkout session request](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions), we retrieve and display any transaction-applicable payment [`sources[]`](https://docs.digitalriver.com/digital-river-api/payments/payment-sources) that are saved to the referenced [customer](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/customers).

<div align="left"><img src="https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2FO8sVx1AFfx4CRDlfX9CG%2Fimage.png?alt=media&#x26;token=d23343f4-2467-432f-8865-b600f4100aff" alt=""></div>

#### Save a payment method for future purchases

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

You must pass [`customerId` ](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions/checkout-sessions-basics#customer-identifier)in the [create checkout session request](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/drop-in-checkout-sessions#drop-in-checkout-sessions) to activate this feature.

{% hint style="info" %}
If the resource you reference doesn't exist in your account, Digital River creates a new [customer ](https://app.gitbook.com/s/ScJM6Hp95yBCPfU1nBSB/checkouts#checkouts-1)and assigns it the identifier you passed.
{% endhint %}

If the payment method customers select supports [reusability](https://docs.digitalriver.com/digital-river-api/payments/payment-sources#reusable-or-single-use), 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.

<div align="left"><figure><img src="https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2FSd1k6YbZcY4zGUuqOG81%2FSave%20for%20future.png?alt=media&#x26;token=d7bd9f07-20e1-4128-9ad3-72b88f820d51" alt=""><figcaption></figcaption></figure></div>

#### Custom consents

Prebuilt Checkout presents users with the designated [selling entity's](https://docs.digitalriver.com/digital-river-api/integration-options/checkouts/creating-checkouts/selling-entities) terms of sale and privacy policy for each displayed payment method.

If you [save your own consents in the Dashboard](https://docs.digitalriver.com/digital-river-api/administration/dashboard/settings/prebuilt-checkout#create-a-prebuilt-checkout-configuration), they are appended to Digital River's disclosures. Customers must accept all these terms and disclosures before completing the purchase.

{% hint style="info" %}
To [determine what disclosures customers accepted](#determining-what-disclosures-customers-accepted), you can [configure a webhook](https://docs.digitalriver.com/digital-river-api/order-management/events-and-webhooks-1/webhooks/creating-a-webhook) to listen for the [event](https://app.gitbook.com/s/x8fSFzVR3sg0TsNWwwVz/events) with a [`type`](https://docs.digitalriver.com/digital-river-api/order-management/events-and-webhooks-1/events-1#event-types) of [`checkout_session.order.created`](https://docs.digitalriver.com/digital-river-api/order-management/events-and-webhooks-1/events-1/event-types#checkout_session.order.created).
{% endhint %}

{% tabs %}
{% tab title="Digital River only disclosures" %}
Prebuilt Checkout only displays Digital River's disclosures if you don't [save customized consents in the Digital River Dashboard](https://docs.digitalriver.com/digital-river-api/administration/dashboard/settings/prebuilt-checkout#create-a-prebuilt-checkout-configuration)

<div align="left"><img src="https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2F1IiPpoGbScLQH6l9i5nk%2Fimage.png?alt=media&#x26;token=bd68f29e-97f7-4161-9ca9-75975e20abee" alt=""></div>
{% endtab %}

{% tab title="Combined disclosures" %}
If you [save the consents in the Digital River Dashboard](https://docs.digitalriver.com/digital-river-api/administration/dashboard/settings/prebuilt-checkout#create-a-prebuilt-checkout-configuration), Prebuilt Checkout displays Digital River's disclosures along with yours.

<div align="left"><img src="https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2FBlKkylj4rkOQBrl7EcLf%2Fimage.png?alt=media&#x26;token=01b9a299-8c5b-4619-958a-9333e822b303" alt=""></div>
{% endtab %}
{% endtabs %}

### Order confirmation stage <a href="#order-confirmation" id="order-confirmation"></a>

There are various ways to [configure the order confirmation stage](https://docs.digitalriver.com/digital-river-api/developer-resources/digitalrivercheckout.js-reference/digitalrivercheckout-object/configuring-prebuilt-checkout#customize-order-confirmation). The following is an example of the default option.

<div align="left"><figure><img src="https://334437993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LqH4RJfLVLuHPXuJyTZ%2Fuploads%2F8mDItXrqrDporIeLrw1E%2Forder%20confirmation.png?alt=media&#x26;token=a7377e4c-6f37-42f7-968f-97143c9b3573" alt=""><figcaption></figcaption></figure></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digitalriver.com/digital-river-api/integration-options/low-code-checkouts/drop-in-checkout.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
