Configuring Boleto
Learn how to configure Boleto for DigitalRiver.js with Elements.
Last updated
Was this helpful?
Learn how to configure Boleto for DigitalRiver.js with Elements.
Last updated
Was this helpful?
If you're using, you can create a payment method for your app or website in three easy steps:
Build the Boleto Source Request and Details object. The Boleto Source Request object requires the following fields:
type
boletoBancario
sessionId
The payment session identifier.
owner
boletoBancario
A Boleto Source Details object.
Use the Boleto Source Details object code sample.
The Boleto Source Details object requires the following fields:
returnUrl
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 Boleto experience.
nationalId
Required
Use the DigitalRiver.js library to create and mount elements to the HTML container.
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.
An .
If the shopper is an individual buyer, nationalId
represents their CPF tax ID. If the shopper is a business shopper, nationalId
represents their CNPJ tax ID. Use the to collect these from the shopper.
The address
object must contain postal code and state/province data that 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.
Once authorized, you can use the source by .
.
. This action inserts the tax ID into the payment session.
. Note that the tax ID is required when creating the Boleto source. The payment session ID provides the tax ID.
.
.