Building payment workflows
Learn how to create SCA-compliant workflows using Drop-in payments and DigitalRiver.js with elements.
You can create Strong Customer Authentication (SCA) compliant workflows for purchase transactions and account management.
When building workflows that use Drop-in payments, you'll need to perform some common initial steps before proceeding to the workflow's specific steps. For workflows using DigitalRiver.js with elements, you must also complete some prerequisites.
Each purchase and account management workflow has some key settings and methods.
Whether you are using Drop-in payments or DigitalRiver.js with elements, Digital River automatically manages any SCA requirements. Our authenticate source method handles two-factor authentication. Our card acquirers use the 3-D Secure protocol to communicate with issuing banks. This protocol operates "behind the scenes" and requires no developer interaction.
Limitations and constraints
Note the following limitations and constraints when building your payments workflow.
Do not change the currency when a secondary source is in the cart. Specify the correct currency when creating a secondary payment source. Do not change the currency after you apply the secondary source to the cart. If you change the currency when calling
/v1/shoppers
, a409 Conflict
response contains specific information about what triggered the failure. In this instance, one of the currencies in the cart is not supported.
You can't use the store credit to buy subscription products, pre-order products, or products on backorder. Additionally, you can't link more than one store credit source to an order, as multiple secondary sources are not currently supported.
Common Drop-in payment steps
You must perform the following steps for any workflow that uses Drop-in payments, whether built for purchases or account management.
Once you've completed these initial steps, you can perform those specific to your desired purchase or account management scenario.
Elements prerequisites
You need to use payment sessions when using DigitalRiver.js with elements to build workflows. So ensure you've completed the necessary migration. We assume you are familiar with creating and styling elements and capturing payment details.
Once you've completed these prerequisites, you can perform the steps specific to your desired purchase or account management scenario.
Purchase Flows
For almost all one-off, subscription, and mail-order/telephone-order (MOTO) transactions, Digital River supports SCA-compliant workflows using Drop-in payments or DigitalRiver.js elements.
One-off
You can develop workflows that allow customers to enter, save, and retrieve their payment information while making one-off purchases.
Customers enter their credit card information
In this flow, customers supply their credit card information during a one-off transaction but don't save it to their accounts.
SCA required? | Drop-in payments supported? | Elements supported? |
---|---|---|
Yes | Yes | Yes |
Prerequisites: Perform the common Drop-in payments steps.
Step one: Create a cart with all tax, shipping, duty, and fee amounts in a final state and a chargeType
that is customer_initiated
.
Step two: Retrieve the cart's payment session identifier, and use it to set the sessionId in the Drop-in payments' configuration object. In options
, set flow
to checkout
and usage
to convenience
, and (to prompt Drop-in payments to display the save payment option) showSavePaymentAgreement
to true
.
Step three: Use the configuration object to instantiate Drop-in Payments.
Step four: Specify a container to place Drop-in payments on your cart page.
Drop-in payments render in the specified container.
Customers enter their credit card information and click the configurable Pay Now button.
If the customer completes the SCA, then the onSuccess
method is called, and Digital River returns a unique source in a chargeable state.
Step five: Attach the source to the cart.
Step six: Create the order by submitting the cart.
Customers save their credit card information
In this flow, customers enter credit card information and save it to their account during a one-off transaction.
SCA required? | Drop-in payments supported? | Elements supported? |
---|---|---|
Yes | Yes | Yes |
Prerequisites: Perform the common Drop-in payments steps.
Step one: Create a cart with all tax, shipping, duty, and fee amounts in a final state. Set chargeType
to customer_initiated
and autoRenewal
to true
.
Step two: Retrieve the cart's payment session identifier, and use it to set the sessionId in the Drop-in payments configuration object. In the configuration options
, set flow
to checkout
and usage
to convenience.
To prompt Drop-in payments to display the save payment option, set showSavePaymentAgreement
to true
.
You should also configure the usage
parameter. Doing so identifies the future use of the payment source.
Step three: Use the configuration object to instantiate Drop-in Payments.
Step four: Specify a container to place Drop-in Payments on your cart page.
The modal renders in the specified container.
Customers enter their credit card information, actively accept the save payment agreement, and click the configurable Pay Now button.
If the customer completes the SCA steps necessary to make the source chargeable, then the onSuccess
method is called, and Digital River returns a unique Source in a chargeable state.
Step five: Attach the source to the shopper.
Step six: Attach the shopper to the cart.
Step seven: Create the order by submitting the cart.
Customers retrieve their payment information
In this one-off purchase flow, the customers select a credit card they previously saved to their account. The key step is to call the authenticate source method.
SCA required? | Drop-in payments supported? | Elements supported? |
---|---|---|
Yes | No | Yes |
Drop-in payments do not currently support retrieving stored payment methods. To handle this flow, use Elements.
Subscription
You can create SCA-compliant workflows allowing customers to save or retrieve a recurring payment method during subscription acquisitions. You can also set up workflows for merchant-initiated autorenewals.
Shopper enter and save their payment information during a subscription acquisition
In this flow, customers save payment information to their account and use that payment source to acquire an auto-renewing subscription.
SCA required? | Drop-in payments supported? | Elements supported? |
---|---|---|
Yes | Yes | Yes |
Prerequisites: Perform the common Drop-in payments steps.
Step one: Create a cart with an authenticated customer, and all tax, shipping, duty, and fee amounts are in a final state. Set chargeType
to customer_initiate
and autoRenewal
to true
.
Step two: Retrieve the payment session identifier from the cart, and use it to set the sessionId
in the Drop-in Payments configuration object.
In options
, set flow
to checkout
and usage
to convenience
, and (to prompt Drop-in payments to display the save payment option) showTermsOfSaleDisclosure
to true
.
Step three: Use the configuration object to instantiate Drop-in payments.
Step four: Specify a container to place Drop-in payments on your cart page.
Drop-in renders in the specified container.
Shoppers must enter their credit card information and click the configurable Pay Now button.
If the shopper completes the necessary SCA steps, then the onSucess
method is called an,d Digital River returns a unique source in a chargeable state that is readyForStorage
.
Step five: Attach the source to the shopper.
Step six: Create the order by submitting the cart.
Shoppers retrieve saved payment during a subscription acquisition
In this flow, shoppers select a credit card they previously saved to their account and use it to acquire an auto-renewing subscription.
SCA required? | Drop-in supported? | Elements supported? |
Yes | No | Yes |
Drop-in payments does not currently support retrieving stored payment methods. To handle this flow, use Elements.
Merchant-initiated auto-renewals
In this flow, you initiate a subscription auto-renewal for the shopper. Although this flow type does not require SCA, you should ensure you're properly managing subscriptions, setting up auto-renewals, and initiating the charge type during the checkout process.
SCA required? | Drop-in payments supported? | Elements supported? |
---|---|---|
No | N/A | N/A |
Mail order/telephone order
SCA is not required for transactions where shoppers provide payment details by mail, fax, or telephone. But both Drop-in payments and Elements support building workflows for mail order and telephone order (MOTO) transactions.
SCA required? | Drop-in payments supported? | Elements supported? |
---|---|---|
No | No | Yes |
Prerequisites: Perform the common Drop-in payments steps.
Step one: Create a cart with a chargeType
of moto
and all tax, shipping, duty, and fee amounts in a final state. This configures Drop-in payments to display only payment methods supported in MOTO transactions.
Step two: Retrieve the checkout's payment session identifier, and use it to set sessionId
in the Drop-in payments' configuration object. In options
, set flow
to checkout
and usage
to convenience
.
Step three: Use the configuration object to instantiate Drop-in payments.
Step four: Specify a container to place Drop-in payments on your checkout page.
The modal window renders in the specified container.
The merchant's representative enters the customer's credit card information and clicks the configurable Pay Now button. If the payment is authorized, then the onSuccess
method is called, and Digital River returns a unique source in a chargeable
state.
Step five: Attach the source to the cart.
Step six: Create the order by submitting the cart.
Account management flows
You can create flows that allow customers to manage recurring payment methods through their account portal.
In these account management flows you only need to adhere to SCA regulations when saving a customer's credit card for future use. While storing a card, make sure you identify the future use of the source. This increases the probability that future transactions will be approved.
You're not required to provide SCA when updating a credit card's expiration date or billing address.
Saving a credit card
C, customers can use their account portal to save credit card information for future transactions.
SCA required? | Drop-in payments supported? | Elements supported? | |
---|---|---|---|
Yes | Yes | Yes |
Drop-in paymentsPrerequisites: Perform the common Drop-in payments steps.
Step one: Go to a page in your integration where customers manage their payment methods.
Step two: In the configuration object's options
, set flow
to managePaymentMethods
and specify a value for usage
that identifies the potential future use of the payment source.
Step three: Use the configuration object to instantiate Drop-in payments.
Step four: Specify a container to place Drop-in payments on the account management page.
The modal window renders in the specified container.
Shoppers enter their credit card information, select the save payment agreement option, and click the configurable add payment method button.
If the shopper completes the necessary SCA steps, then the onSucess
method is called, and Digital River returns a unique source in a chargeable state that is readyForStorage
.
Step six: Attach the source to the shopper.
Updating a credit card's expiration date or billing address
In this flow, customers use their account portal to update their saved credit card's expiration date or billing address.
SCA required? | Drop-in payments supported? | Elements supported? |
---|---|---|
No | No | Yes |
Drop-in payments do not support interacting directly with saved payment methods.
Last updated