Learn the basics of sources.
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
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.
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.
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.
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.
stateprovides information about what can be done with the object. The
stateof a source may be