Configuring Bancontact
Learn how to configure Bancontact for DigitalRiver.js with Elements.
If you're using DigitalRiver.js with Elements, you can create a Bancontact payment method for your app or website in four easy steps:
Step 1: Build a Bancontact Source Request and Details object
Build the Bancontact Source Request and Details objects.
Bancontact Source Request object
The Bancontact Source Request object requires the following fields.
Field | Value |
---|---|
|
|
| The payment session identifier. |
| An Owner object. |
|
Bancontact Source Details object
The Bancontact Source Details object requires the following fields.
Field | Required/Optional | Description |
---|---|---|
| Required | If you choose to use the full redirect flow, this is where you will redirect your customer to after authorizing or canceling within the Bancontact experience. |
Step 2: Create a Bancontact source using DigitalRiver.js
Use the DigitalRiver.js library to create and mount elements to the HTML container.
The address
object must contain postal code and state/province data that adheres to a standardized format using the state
attribute. Note that the state
attribute listed below corresponds to the countrySubdivision
attribute used when providing address information. The payment session manages the correct field name on the backend.
Bancontact source example
Step 3: Authorize the Bancontact source
When you create a Bancontact source, the customer is required to authorize the charge through their payment provider. You can accomplish this by redirecting the customer to their payment provider.
Redirecting the customer for Bancontact authorization
Use the redirectUrl
parameter in your createSource
response to redirect your customer to the payment provider for authorization.
The payment provider will present the customer with the transaction details, and the customer can authorize or cancel the transaction. A successful authorization redirects the customer to the Bancontact Return URL parameter you specified when you created the source.
Once authorized, the source state will change to chargeable
.
Step 4: Use the authorized source
Once authorized, you can use the source by attaching it to a cart.
Testing Bancontact
See Testing redirect payment methods for testing instructions.
Last updated