Skip to main content
Skip table of contents

How to Test Declines in Sandbox

How to Test Declines with transactions via API or Payrix Hosted pages

When using the test API, the transaction amount gives you the ability to test both successful and failed payments. When the transaction amount has zero cents or a number of cents other than the ones listed below, the test transaction will always be successful.

If you provide one of the following numbers for the number of cents you will receive a transaction failed response with the corresponding reason:

  • 31 = Invalid Account

  • 54 = Expired card - Card Only

  • 51 = Declined

  • 61 = Insufficient Funds

  • 96 = Technical failure - Card Only

How to Test Declines for 3D-Secure transactions in Sandbox

When testing the 3DS, you can use a few different card numbers for triggering different scenarios:

  • 4907639999909022 Frictionless Success

  • 5283901906612672 Frictionless Rejected (The Issuer is refusing the authentication)

  • 5283901901266672 Frictionless Fail (Failed Authentication)

  • 5100000000100006 Frictionless Attempts (Issuer is not responding)·

  • 4918914107195005 Challenge Required (Usual test card numbers also trigger this)·

  • 4001880000000055 Merchant Cancel

  • 2221000000000009 Decoupled Authentication

If a challenge is required on the “Verify your Payment” page, if a code/ pin of "555" is entered the payment will complete successfully. Any other 3 digit code can be used for a failed challenge. Both will trigger a redirect back to “CallbackUrl”.

For more information around ‘transactions’, see our API documentation here.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.