Configuring Afterpay
Learn how to configure Afterpay for DigitalRiver.js with Elements.
Step 1: Build an Afterpay Source Request and Details objects
Afterpay Source Request object
Field
Value
Afterpay Source Details object
{
"cancelUrl": "https://example1.com",
"returnUrl": "https://example2.com",
"shipping": {
"email": "[email protected]",
"phoneNumber": "077 1723 6984",
"recipient": "John Doe"
"address": {
"line1": "200 Broadway Ave",
"city": "West Beach",
"country": "AU",
"state": "South Australia",
"postalCode": "5024"
}
}
}Field
Required/Optional
Description
Step 2: Create an Afterpay source using DigitalRiver.js
Afterpay source response example
Step 3: Authorize the Afterpay source
Redirecting the customer for Afterpay authorization
Step 4: Use the authorized source
Testing Afterpay
Last updated