Handling external subscription acquisitions
Gain a better understanding of how to do acquisitions and manage recurring billing with a third-party subscription service
If you're not using our subscription service, you can still use the Digital River APIs and DigitalRiver.js to handle recurring billing, display and acquire acceptance of a subscription's terms, and comply with PSD2 and SCA mandates.
Integrations that use a third-party subscription service can:
Supply an upstream subscription identifier
Use billing agreements to maintain SCA compliance
Flag a subscription as a free trial
Use the auto renewal flag to ensure that appropriate payment methods are displayed
Persist a subscription's terms and conditions
Specify a subscription's start time and end time.
Building a subscription acquisition
During subscription acquisitions, you need to:
Configure the checkout
Prior to order creation, a subscription acquisition checkout must contain:
A
customerId
that references an existing customerA primary payment
sources[]
that is reusable and saved to the referenced customerA
chargeType
that iscustomer_initiated
, thereby indicating that the customer is an active participant in the acquisition process.
In addition, each items[]
in the checkout that has subscriptionInfo
:
Can use SKUs or
productDetails
to represent a digital or physical productMust set
autoRenewal
totrue
Must contain the subscription's
terms
Acquiring acceptance of the autorenewal terms
During acquisitions, you must disclose a subscription's terms and then acquire the customer's active acceptance of them. How you do this depends on whether you're using Drop-in payments or DigitalRiver.js with Elements.
For more details on required disclosures, refer to the Subscriptions and Auto-Renewal Considerations article (refer to Learning tools for access information).
In checkouts, set each subscription line item's autoRenewal
to true
. In the createDropin()
method's configuration options
, set showTermsOfSaleDisclosure
to true
.
These settings prompt Drop-in payments to display the combined autorenewal and save payment agreement.
If customers click the configurable continue button without agreeing to the terms, Drop-in prevents the transaction from proceeding.
If the customer consents and a source is successfully created, then the onSuccess
event's data
contains the agreed-upon terms (mandate.terms
) and the time the customer accepted those terms (mandate.signedTime
).
If you configure your workflow correctly, then the customer accepted autorenewal terms are returned in the onSuccess
event's data
or the response to the createSource()
method.
In either case, retrieve mandate.terms
and use this value to set each of the checkout's items[].subscriptionInfo.terms
. This ensures that the subscription's terms are added to the billing agreement.
Handling payments
Customers can either create a new source or authenticate a saved source to fund a recurring transaction.
For details, refer to the subscription section on the Building payments workflows page.
Submitting the acquisition authorization request
Once the checkout's payment.session.state
is requires_confirmation
, and all address requirements are met, submit the create order request. At that point, Digital River generates a billing agreement and returns its billingAgreementId
in the response.
Notifying customers of a subscription acquisition
When the order's state
is accepted
, notify customers that their subscription acquisition has been successfully processed. In the Subscription Notifications article (refer to Learning tools for access information), you can find a complete list of what is required in this notification.
Next steps
For details on auto-renewals and updates, refer to Managing an external subscription.
Last updated