Payment testing scenarios

Learn how to test payment methods.

This page explains how to start testing your payment integrations and provides links to the payment methods currently supported in our test environment. When testing standard payment methods, such as cards (credit and debit), we provide data you can use to test against success and error scenarios. We also provide information on testing redirect and receiver-type payment methods.

Getting started

Always use your test API keys to prevent you from interacting directly with payment services when evaluating your integration. Ensure that the test data you enter does not create an actual charge or result in the funds transfer.

Use your confidential (secret) test API key when conducting testing in the Commerce API. Use your public test API key to create test payment sources in DigitalRiver.js.

Your testing approach depends on whether the payment method has a standard, redirect, or receiver authentication flow. If you don't know the flow of the payment method you'd like to test, you can find it on the Supported Payment Methods page.

Supported payment methods in a test environment

The Commerce APIs support a wide range of payment methods. However, not all of them are currently supported in our testing environment. The test environment status for each payment method is on the Supported Payment Methods page.

Error scenarios

Understanding and preparing for error scenarios is crucial to ensure the robustness of your payment processing system. The following sections provide card numbers to simulate various error conditions, such as settle failures and refund failures. By using these test cards, you can assess how effectively your system manages and recovers from these specific issues.

Cards triggering a settle failure

Use these card numbers to simulate Settle failure scenarios. Enter any valid, future expiration date and any three-digit security code. These scenarios help you test how your system handles payment failures.

CardExpiration DateSecurity Code

4465421399999901

Any future date

Any three digits

4465421399999919

Any future date

Any three digits

Cards triggering a refund failure

Use these card numbers to simulate Refund failure scenarios. Enter any valid, future expiration date and any three-digit security code. These scenarios help you test how your system handles refund process failures.

CardExpiration DateSecurity Code

4465421399999984

Any future date

Any three digits

4465421399999992

Any future date

Any three digits

Cards triggering an auth reversal failure

Use these card numbers to simulate Auth Reversal failure scenarios. Enter any valid, future expiration date and any three-digit security code. These scenarios help you test how your system handles authorization reversal process failures.

CardExpiration DateSecurity Code

4465421399999943

Any future date

Any three digits

4465241399999950

Any future date

Any three digits

Successful validation but declined auth

In this scenario, the card information provided passes all initial validation checks, such as verifying the card number, future expiration date, and security code. However, when the payment authorization request is sent to the card issuer, it is declined. Reasons for a decline could include insufficient funds, suspected fraudulent activity, or exceeding credit limits. This test ensures the system handles cases where a card appears valid but cannot be used for successful payment authorization.

CardExpiration DateSecurity Code

4465421399999927

Any future date

Any three digits

Last updated