Handling credit card sources

Learn how Source objects created from credit cards function within the Digital River API.
In the Digital River API, sources created from credit cards are multi-use, synchronous, and pull-based. This means that customers aren't required to re-enter payment details before every payment, they are provided instant notification of a payment's approval status, and the amount charged to the card can be updated repeatedly throughout the checkout process.
The Sources API supports a wide range of credit cards.

Creating a credit card source

To ensure that you remain PCI compliant, credit card Source objects are created by DigitalRiver.js and then returned to your integration.
To create a credit card source, you must first include the DigitalRiver.js library on your payment collection form. You then create your payment form and embed elements on it. Once a customer has supplied payment details, you pass the data to DigitalRiver.js to create the payment source. We then return a source identifier to your integration.

Charging a credit card source

You can either attach the Source to a Customer for use in the current Checkout and potentially reuse in future payments or attach it directly to a Checkout. In the latter case, the Source cannot be reused and will have a state of consumed once charged.
Credit card sources should be used shortly after they are created. This is because CVC data expires within a few minutes. Orders created with cards that lack CVC's are more likely to be declined and pose a greater fraud risk.
Once you have attached the Source to a Customer or directly to a Checkout, it can then be used by Digital River to create a Charge object when you submit an Order.