Handling completed checkout-sessions
Gain a better understanding of how to handle checkout-sessions after Digital River creates the order
Last updated
Gain a better understanding of how to handle checkout-sessions after Digital River creates the order
Last updated
If you're using either of our low-code checkout solutions, we recommend that you configure a webhook to listen for the with a type
of checkout_session.order.created
.
This event occurs when customers complete their purchase, and Digital River converts the to an . Its data.object
allows you to:
Save a copy of our in your database
Retrieve id
and add that value to the order in your system
We don’t recommend that you use checkout_session.order.created
to trigger order fulfillment or customer notifications. Instead, listen for order.accepted
and use it to trigger downstream fulfillment processes and order confirmation emails. For details, refer to:
Handling accepted orders on the Processing orders page
Order confirmation on the Customer notifications page
In the data.object
of checkout_session.order.created
, both shipTo
and billTo
contain the saveForLater
boolean indicates whether customers requested that their shipping and/or billing information be saved for future transactions.
The data.object
of checkout_session.order.created
contains consents
.
In this object, the termsOfSale
boolean references Digital River's terms of sale. The eula
and termsOfService
reference your company's unique end-user license agreement and terms of service, respectively.
If any of these attributes are true
, it signifies that customers were presented with that specific disclosure during the payment stage and actively accepted it.
For details, refer to Access price formatting rules on the Offering local pricing page.
For details, refer to Processing store credit in orders on the Offering store credit page.
If true
, you can call a method that saves address
, name
, phone
, email
, and (assuming it exists) additionalAddressInfo
in your system so that the next time this customer checks out, you can pass this data in .