Configuring Boleto
Learn how to configure Boleto for DigitalRiver.js with Elements.
If you're using DigitalRiver.js with Elements, you can create a Boleto payment method for your app or website in three easy steps:
Step 1: Build a Boleto Source Request and Details object
Build the Boleto Source Request and Details object. The Boleto Source Request object requires the following fields:
Boleto Source Details object
Use the Boleto Source Details object code sample.
The Boleto Source Details object requires the following fields:
Step 2: Create a Boleto 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.
Boleto source response example
Step 3: Use the authorized source
Once authorized, you can use the source by attaching it to a cart.
Best practices
To use Boleto as a payment method:
Optional. Set the locale and currency.
curl --location --request GET 'https://{host}/v1/shoppers/me.json?locale=pt_BR¤cy=BRL' \ --header 'Content-Type: application/json' --header 'authorization: bearer ***\
Optional. Set the the cart address to the BR address.
Attach the tax ID to the cart. This action inserts the tax ID into the payment session.
Create a Boleto source with a payment session ID. Note that the tax ID is required when creating the Boleto source. The payment session ID provides the tax ID.
Last updated