To test fallbacks, you need:

  • a test card that will decline or fail with your primary processor under one of the conditions outlined above
  • a fallback processor that will authorize the payment based on the test card used to decline or fail with the first processor

Example fallback configuration

If the fallback processor doesn’t accept the test card, the payment will be declined and you’ll see both authorization requests declined in the payment details page.

Primer test processor

In sandbox, set the Primer test processor as the primary processor and an alternative processor as the fallback processor, such as Braintree, Stripe or Worldpay.

Failed and declined authorization Use the following test cards to simulate a failed or declined authorization.

Use any 3-digit CVV and future expiry date to trigger the test scenario.

ScenarioCard NetworkCard Number
Generic declineVisa4000 0000 0000 0002
Generic declineMastercard5100 0000 0000 0008
Generic failVisa4000 0000 0000 0010
Generic failMastercard5100 0000 0000 0016

Using one of Primer’s test cards for generic decline and fail authorizations above, the authorization request will decline or fail (depending on the card used) and trigger a fallback. The fallback authorization request should then be sent and be authorized.

Example test fallback with Primer test processor

Other sandbox processors

It’s possible to test fallbacks without using the Primer test processor. You will need to review the testing guides for your processors and ensure:

  • you can decline or fail a payment with your primary processor for the conditions outlined above
  • the test card or test scenario can lead to a successful authorization request with your fallback processor

See below for some example processors and how to test fallbacks using them.

Braintree

Braintree enable authorization responses to be determined by the authorization amount. You can test fallbacks using Braintree as your primary processor.

If the amount is set to 3000.00-3000.99, then this will trigger a fallback.

Set Braintree as the primary processor and configure your fallback processor.

Then, create a test payment with the amount set to 3000.00-3000.99 and use any test card from your fallback processor that will result in an authorized payment.

The authorization will decline and trigger a fallback. The fallback request should then be sent and be authorized.

You can test fallbacks with 3DS using Braintree as your primary processor as the authorization response is determined by the amount, not the test card. You will also need a fallback processor, such as the Primer test processor, that will accept Primer’s 3DS test card which is required to trigger 3DS in sandbox.

Example test fallback with 3DS

Worldpay

Worldpay enable authorization responses to be determined by the cardholder name. You can test fallbacks using Worldpay as your primary processor.

If the cardholder name is set to “ERROR”, then this will trigger a fallback.

Set Worldpay as the primary processor and configure your fallback processor.

Then, create a test payment with the cardholder name set to “ERROR” and use any test card from your fallback processor that will result in an authorized payment.

The authorization will decline and trigger a fallback. The fallback request should then be sent and be authorized.

You can test fallbacks with 3DS using Worldpay as your primary processor as the authorization response is determined by the cardholder name, not the test card. You will also need a fallback processor, such as the Primer test processor, that will accept Primer’s 3DS test card which is required to trigger 3DS in sandbox.

Example test fallback with 3DS using Worldpay as primary processor and Nuvei as fallback processor

Stripe

Stripe enable authorization responses to be determined by the card number. You can test fallbacks using Stripe as your primary processor.

If the card number is set to 4000000000000119, then this will trigger a fallback.

Set Stripe as the primary processor and configure your fallback processor.

Then, create a test payment with the card number 4000000000000119 and ensure this card will result in an authorized payment with your fallback processor.

The authorization will decline and trigger a fallback. The fallback request should then be sent and be authorized.

Example test fallback with 3DS using Worldpay as primary processor and Nuvei as fallback processor

You can’t test fallbacks with 3DS using Stripe as your primary processor as the authorization response is determined by the card number. This clashes with Primer’s 3DS test card which is required to trigger 3DS in sandbox.