Implementing a Prebuilt Checkout
Gain a basic understanding of how to add a Prebuilt Checkout to your site
Last updated
Gain a basic understanding of how to add a Prebuilt Checkout to your site
Last updated
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:
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:
In guest checkouts, customers can enter a tax identifier but are not given the option to save the value to their account.
Prebuilt Checkout can ask customers whether they'd like to save a payment method for future purchases.
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.