Learn the basics of sources.
A source is associated with the payment method that a customer uses to fund a transaction. When generating a charge, Digital River retrieves data from the source.
In the Digital River APIs, each type of source has certain characteristics that determine how it's created and how a charge is eventually processed.
A source also contains a hash table that corresponds to its
type. This data object holds detailed information specific to each
type. For example, a source with a
credit cardhas a
creditCardhash table that lists the card's
A source's characteristics revolve around the concepts of pull or push, synchronous or asynchronous, reusable or single-use, primary or secondary, and payment flow.
The difference between a pull and push payment source has to do with how a customer's funds are transferred.
With pull sources, customers provide their information and consent, and then the money is drawn from their account. No additional customer actions are usually necessary. Credit cards are the most common example.
When using a push payment source, the customer must explicitly send the funds before a charge can become capturable. These payment sources almost always require additional customer action. For example, if you enable wire transfers on your website or app, you'll need to present your customers with the necessary transfer information to complete payment and they must then "push" the funds.
With asynchronous payment methods, the source may first return in
requires_actionbefore it transitions to
chargeable. For example, a source with a
payPalis asynchronous because the customer is redirected to the PayPal site and must take additional action to authorize the transaction.
When integrating asynchronous payment methods, you can create a webhook to listen for the
source.chargeableevent. This will allow you to determine when you should attach the source to a checkout or save the source to a customer's account.
Some payment methods can be used to create sources that are reusable, meaning they support recurring charge authorizations. In customer initiated transactions, this allows you to present stored sources to customers for convenience purposes. You can also use reusable sources in subscription renewals that are merchant initiated.
For a list of payment methods that support recurring payments, refer to the Supported payment methods page. Additionally, as part of the enablement process, certain payment methods that are typically reusable can be restricted to single-use only.
Sources must have a
truebefore they can be used to make multiple charges. Reusable sources however can't be created using a public API key. As a result, both Drop-in payments and DigitalRiver.js with elements only generate single-use sources. To make them reusable once they're created (assuming the source's
typesupports re-usability), you must save the source to a customer. This flips
trueand prevents the source's
consumedonce it's associated with the checkout.
If a source's underlying payment method doesn't support re-usability, we block the source from being saved to a customer. As a result, with non-reusable sources, you should only attach the source to a checkout. This will generate a one-time charge authorization when you convert the checkout to an order.
flowrepresents how your customers experience the payment process and what authentications they must complete. The enumerated
standard: In this flow, which mainly applies to credit cards, you obtain a customer's payment details on your storefront and submit this information to Digital River. The customer is never required to leave your website during the checkout process. No additional action is required by customers after they submit their information and a charge can be created immediately
redirect: In this flow, you obtain a customer's payment data on your storefront. You then redirect them to the payment provider where they are asked to authorize the transaction. Once the authorization is confirmed, a charge can be created. We recommend you adhere to these guidelines when using redirect payment methods.
receiver: This flow requires that customers push funds to an account before a charge can be created. Wire transfer is a common payment method that uses this authentication flow.
stateprovides information about what can be done with the object. The
stateof a source may be
Digital River only creates a charge object when the source is
chargeable. To be notified of when the source transitions to this
state, you can listen for
Once charged, the
stateof single-use sources switches to
consumedand no additional charges can be created from that source. Reusable sources however can persist in a
For sources with a
receiver, such as wire transfers, it may take days before the funds are confirmed by the receiving bank or financial institution, thereby switching the source's
For different success and error scenarios, you can create tests to determine whether your integration returns the expected
Once all captures are complete, the customer's payment method is charged the
amountvalue contained within the source, taking into account any cancellations you create or refunds you issue.
Each time that Digital River returns an updated source, the value of
amountcan change. For example, if customers add or subtract items from their carts late in the checkout process, and you then update the checkout, the source is returned with an updated