Checking out guest and registered customers
Learn how to create guest and registered checkouts
Last updated
Learn how to create guest and registered checkouts
Last updated
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
.
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.
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
shipping
âž”
shipTo
sources[].owner
âž”
billTo
sources[]
âž”
payment.sources[]
taxIdentifiers[]
âž”
taxIdentifiers[]
locale
âž”
locale
email
âž”
email
customerType
âž”
type
For more information refer to:
2021-12-13
and laterYou 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.
2021-03-23
and earlierWhen 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
.