Payment component
Learn how to accept payment in a secure, customizable component
The payment component displays transaction-applicable payment methods and then processes the customer's selection.
Unless your checkout only uses the wallet component (plus the mandatory compliance component), you'll need to implement this component.
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.
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 to 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.
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
.Digital River only disclosures
Combined disclosures
If you have no customized consents in Dashboard, the component only displays Digital River's disclosures.


let paymentComponent;
...
paymentComponent = components.createComponent('payment');
...
<div id="payment-container" style="display: block">
...
paymentComponent.mount('payment-container');
...
Last modified 1mo ago