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
  • Guest checkouts
  • Registered checkouts
  • Common attributes
  • Passing customer data to checkouts
  1. Integration options
  2. Direct integrations
  3. Building checkouts

Checking out guest and registered customers

Learn how to create guest and registered checkouts

PreviousBuilding checkoutsNextDescribing line items

Last updated 2 months ago

A customerId references the making the purchase. You can pass this identifier in both and requests.

For more information, refer to on the page.

If you want to process a , then don't set customerId. Conversely, if you want to process a , then you should set customerId.

Guest checkouts

If you don't set a customerId, then no is associated with the purchase. So, when you want to checkout a guest, don't send customerId in the body of a or request.

In guest checkout scenarios, you'll need to acquire a customer's shipping address (assuming the cart contains ), billing address, and email address. In addition, you must create one or more payment , and when , you'll also need to create a .

Once you obtain these addresses and create these resources, you must associate their data with the checkout.

Guest customer
Checkout

Shipping details

âž”

shipTo

Billing details

âž”

billTo

Email address

âž”

email

Tax identifiers

âž”

taxIdentifiers[]

Business or individual?

âž”

type

Payment method(s)

âž”

payment.sources[]

For more information refer to:

  • on the page

  • and on the page

  • and on the page

Registered checkouts

Common attributes

Customer
Checkout

shipping

âž”

shipTo

sources[].owner

âž”

billTo

sources[]

âž”

payment.sources[]

taxIdentifiers[]

âž”

taxIdentifiers[]

locale

âž”

locale

email

âž”

email

customerType

âž”

type

For more information refer to:

Passing customer data to checkouts

Version 2021-12-13 and later

You can present this saved information to customers as an available option at each stage of the checkout process. Whether customers select the saved option presented to them or use your site's forms to enter new information, you must pass this data to the checkout.

Version 2021-03-23 and earlier

curl --location --request POST 'https://api.digitalriver.com/checkouts' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_key>' \
...
--data-raw '{
    "currency": "USD",
    "customerId": 531718920336,
    "taxInclusive": false,
    "shipFrom": {
        "address": {
            "country": "US"
        }
    },
    "shippingChoice": {
        "amount": 5,
        "description": "standard",
        "serviceLevel": "SG"
    },
    "items": [
        {
            "skuId": "25b3f1cf-a6d0-439a-b8e6-7e506452f717",
            "quantity": 2,
            "price": 10
        }
    ]
}'
{
    "id": "531718920336",
    "createdTime": "2021-04-12T20:39:42Z",
    "email": "jdoe@digitalriver.com",
    "shipping": {
        "address": {
            "line1": "123 Boulevard",
            "city": "Saint Paul",
            "postalCode": "55155",
            "state": "MN",
            "country": "US"
        },
        "name": "John Doe",
        "phone": "555-555-5555"
    },
    "defaultSourceId": "5349c370-6694-45ff-915a-882e9b62b48d",
    "sources": [
        {
            "id": "5349c370-6694-45ff-915a-882e9b62b48d",
            "createdTime": "2021-04-12T20:40:26Z",
            "type": "creditCard",
            "reusable": true,
            "state": "chargeable",
            "owner": {
                "firstName": "William",
                "lastName": "Brown",
                "email": "null@digitalriver.com",
                "address": {
                    "line1": "10381 Bren Rd W",
                    "city": "Minnetonka",
                    "postalCode": "55343",
                    "state": "MN",
                    "country": "US"
                }
            },
            "clientSecret": "5349c370-6694-45ff-915a-882e9b62b48d_65525173-9ad9-4339-ba97-f889daf435c6",
            "creditCard": {
                "brand": "Visa",
                "expirationMonth": 7,
                "expirationYear": 2027,
                "lastFourDigits": "1111"
            }
        }
    ],
    "enabled": true,
    "requestToBeForgotten": false,
    "locale": "en_US",
    "type": "individual",
    "liveMode": false
}
{
    "id": "37a9569d-b23f-4d3e-b967-8dacb3427cc9",
    "createdTime": "2021-04-12T20:43:18Z",
    "customerId": "531718920336",
    "currency": "USD",
    "email": "jdoe@digitalriver.com",
    "shipTo": {
        "address": {
            "line1": "123 Boulevard",
            "city": "Saint Paul",
            "postalCode": "55155",
            "state": "MN",
            "country": "US"
        },
        "name": "John Doe",
        "phone": "555-555-5555"
    },
    "shipFrom": {
        "address": {
            "country": "US"
        }
    },
    "billTo": {
        "address": {
            "line1": "10381 Bren Rd W",
            "city": "Minnetonka",
            "postalCode": "55343",
            "state": "MN",
            "country": "US"
        },
        "name": "William Brown",
        "email": "null@digitalriver.com"
    },
    "totalAmount": 26.97,
    "subtotal": 25.0,
    "totalFees": 0.0,
    "totalTax": 1.97,
    "totalImporterTax": 0.0,
    "totalDuty": 0.0,
    "totalDiscount": 0.0,
    "totalShipping": 5.0,
    "items": [
        {
            "id": "3a1fc426-87fb-4216-8619-2d29ac2d5818",
            "skuId": "25b3f1cf-a6d0-439a-b8e6-7e506452f717",
            "amount": 20.0,
            "quantity": 2,
            "tax": {
                "rate": 0.07875,
                "amount": 1.58
            },
            "importerTax": {
                "amount": 0.0
            },
            "duties": {
                "amount": 0.0
            },
            "fees": {
                "amount": 0.0,
                "taxAmount": 0.0
            }
        }
    ],
    "shippingChoice": {
        "amount": 5.0,
        "description": "standard",
        "serviceLevel": "SG",
        "taxAmount": 0.39
    },
    "updatedTime": "2021-04-12T20:43:18Z",
    "locale": "en_US",
    "customerType": "individual",
    "sellingEntity": {
        "id": "C5_INC-ENTITY",
        "name": "DR globalTech Inc."
    },
    "liveMode": false,
    "payment": {
        "sources": [
            {
                "id": "5349c370-6694-45ff-915a-882e9b62b48d",
                "type": "creditCard",
                "amount": 26.97,
                "owner": {
                    "firstName": "William",
                    "lastName": "Brown",
                    "email": "null@digitalriver.com",
                    "address": {
                        "line1": "10381 Bren Rd W",
                        "city": "Minnetonka",
                        "postalCode": "55343",
                        "state": "MN",
                        "country": "US"
                    }
                },
                "creditCard": {
                    "brand": "Visa",
                    "expirationMonth": 7,
                    "expirationYear": 2027,
                    "lastFourDigits": "1111"
                }
            }
        ],
        "session": {
            "id": "55b44240-577c-4485-af5a-2c8224cb6653",
            "amountContributed": 26.97,
            "amountRemainingToBeContributed": 0.0,
            "state": "requires_confirmation",
            "clientSecret": "55b44240-577c-4485-af5a-2c8224cb6653_87c01674-8312-4f3a-afc7-7b2714fd47e8"
        }
    }
}

When a registered customer, make sure you send customerId in the body of a or request. This associates the referenced with the .

When developing registered checkout flows, you should be aware of (1) and (2) .

and have some common attributes. In registered checkouts, the following data in a customer can be passed to a checkout. The options for are version-dependent.

on the page

, , , and on the page

The page

In registered checkouts, the you're using determines how customer data can be passed to checkouts:

In versions 2021-12-13 and later, when you associate a with a , Digital River doesn't, by default, pass that customer's data to the checkout. In other words, undefined in a checkout are not populated with the customer's data.

Instead, once registered customers have signed on to your site, and you've obtained their unique identifier, you can make a request to retrieve their shipping address, saved payment sources, billing addresses associated with those sources, tax identifiers, and other personal information.

For example, when obtaining a ship to address in a checkout that contains , you can get the customer's shipping, display it as an available option, and ask customers whether they want to use this saved address. Regardless of whether customers select the saved address or enter a new address, you must set the checkout's shipTo.

In versions 2021-03-23 and earlier, when you associate a with a , Digital River, by default, passes the customer's data to the checkout. In other words, any undefined in the checkout is automatically inherited from the associated customer.

The only exception is taxIdentifiers[]. Unless applicable to the transaction, we don't pass any of a customer's taxIdentifiers[] to the checkout. For more information, refer to on the page.

Data you set in the takes precedence over inherited data. Additionally, any data inherited by default from the customer can be overwritten in subsequent .

For example, the following contains a customerId but doesn't specify email, shipTo, billTo, locale, customerType, taxIdentifiers[] or sourceId.

Once you submit this request, Digital River determines what , if any, are undefined in the checkout, whether the associated customer contains any of these undefined attributes, and, if it does, retrieves that data and sends it to the checkout.

In this particular example, Digital River uses the customer's email, shipping, defaultSourceId, locale, and type to set the corresponding attributes. Note that the owner.address, owner.firstName, owner.lastName, and owner.email in the customer's are used to populate the checkout's billTo.

Tax identifiers
what attributes customers and checkouts have in common
how customer data can be passed to the checkout
common attributes
Building checkouts
tax identifier
Providing address information
Managing sources
Tax identifiers
guest checkout
registered checkout
checking out
Providing address information
Managing sources
Tax identifiers
passing this customer data to checkouts
common attributes
common attribute
Address requirements
Address requirements
Digital River APIs version
physical products
physical products
POST /checkouts
POST /checkouts/{id}
customer
checkout
Customers
checkouts
customer
checkout
GET /customers/{id}
customer
checkout
checkout
customer
update checkout requests
create checkout request
checkout's
customer
create
update checkout
checkout's
customer
POST /checkouts
POST /checkouts/{id}
sources
sequencing the checkout process
checkout
using tax identifiers in registered checkouts
required
Creating tax identifiers
attaching tax identifiers to checkouts
Creating sources
attaching sources to checkouts
Creating sources
authenticating sources
saving sources to customers
attaching sources to checkouts
default payment source