Payment component
Learn how to accept payment in a secure, customizable component
Last updated
Learn how to accept payment in a secure, customizable component
Last updated
The payment component displays transaction-applicable payment methods and then processes the customer's selection.
Refer to Supported payment methods for a list of payments the component supports.
You'll need to implement this component unless your checkout only uses the wallet component(plus the mandatory compliance component).
To use the component's features, you'll need to create it and mount it.
After customers make a selection, the payment component can, when necessary, redirect customers to payment providers and handle PSD2/SCA requirements.
The component also has the capability to:
The component can display a customer's saved payment methods for convenience purposes.
To activate this feature, you need to pass customerId
in the create checkout session request. Digital River then determines whether the referenced customer exists, and, if it does, retrieves and displays its transaction-applicable payment sources[]
.
The component can ask customers whether they'd like to save a payment method for future purchases.
You must pass customerId
in the create checkout session request to activate this feature.
Digital River creates a customer if the referenced resource doesn't exist in your account.
If the payment method selected by customers supports reusability, then the component asks whether they'd like to save it for future purchases. If customers opt to do so, then after Digital River creates the source, we save it for that customer.
For each payment method that the component displays, customers are shown the terms of sale and the privacy policy of the transaction's designated selling entity.
If you save your consents in Digital River Dashboard, they are appended to Digital River's disclosures.
The component requires customers to accept all of these terms before they can complete the purchase.
To determine what disclosures customers accepted, you can configure a webhook to listen for the event with a type
of checkout_session.order.created
.
If you have no customized consents in Dashboard, the component only displays Digital River's disclosures.
To create an instance of the payment component, pass 'payment'
to createComponent()
.
To attach the payment component to your DOM, pass the id
of its container to mount()
.