HomeProduct DocsAPI ReferenceChangelog
RecurlyAPI GuidesRecurly.jsWebhooksAPI ReferenceSupportBook demo
Product Docs

Test gateway

Use Recurly's Test Gateway to simulate credit card and ACH transactions — with predefined card numbers for successful transactions, declines, and 3DS2 challenge flows.

The Recurly Test Gateway provides a simulated environment for testing payment configurations using predefined credit card and bank account numbers — without affecting live operations or real money. It's active by default on your Recurly sandbox.
Available on all Recurly plans

Prerequisites

  • A Recurly account with administrator access.
  • Familiarity with the Recurly dashboard and gateway configuration.

Limitations

  • Test transactions do not involve real money and are for testing purposes only.
  • Test Gateway results may not always match live gateway outcomes.
  • Not all real-world error scenarios can be simulated.
  • Supported currencies: USD, AUD, BRL, CAD, CHF, CZK, DKK, EUR, GBP, HUF, ILS, INR, JPY, MXN, NOK, NZD, PLN, SEK, SGD, and ZAR.

Definition

The Recurly Test Gateway provides a simulated environment for testing payment transactions using predefined credit card and bank account numbers. It helps merchants identify and resolve configuration issues before going live, without affecting real-world operations.

Key benefits

Risk-free testing Test gateway configurations and transaction flows without real-world consequences.
Diverse scenarios Simulate a range of transaction outcomes — from successful payments to specific decline reasons.
3DS2 ready Test 3DS2 challenge flows without actual cardholder authentication.
Immediate feedback Get instant results to diagnose and troubleshoot integration issues quickly.

Test credit card numbers

With the Test Gateway active, use the card numbers below to simulate specific transaction outcomes.

Successful transactions

Card numberOutcome
4111-1111-1111-1111Success
4222-2222-2222-2220Success, but flagged for fraud review by the gateway. (Relevant only to PayPal gateways in production mode.)
4000000000002024Successful purchase with a declined refund

Additional successful card numbers

Card numberCard type
378282246310005American Express
371449635398431American Express
378734493671000American Express Corporate
30569309025904Diners Club
38520000023237Diners Club
6011000990139424Discover
3530111333300000JCB
3566002020360505JCB
5555555555554444Mastercard
5105105105105100Mastercard
22230000484000112 Series Mastercard
4012888888881881Visa
4222222222222Visa

All numbers except 4222222222222 pass the Luhn validation algorithm.

Declined transactions

Card numberDecline reason
4000-0000-0000-0002Declined by the gateway
4000-0000-0000-0010AVS failed on street address and postal code
4000-0000-0000-0028AVS failed on street address
4000-0000-0000-0036AVS failed on postal code
4000-0000-0000-0044Advanced Verification failed (3DS, etc.)
4000-0000-0000-0051Card number declined
4000-0000-0000-0069Expired card or expiration date mismatch
4000-0000-0000-0077Insufficient funds
4000-0000-0000-0085Did not pass fraud filters
4000-0000-0000-0093Originating from a fraudulent IP address
4000-0000-0000-1190Declined due to a fraud risk score
4000-0000-0000-0101CVV / security code mismatch
4000-0000-0000-0119Declined by issuing bank — customer must contact their bank
4000-0000-0000-0200Invalid data or parameter
4222-2222-2222-2222Invalid card number (fails Luhn algorithm)
4000-0000-0000-0226Invalid expiration date
4000-0000-0000-0309Gateway timeout
4000-0000-0000-0317Duplicate transaction
4000-0000-0000-0325Card type not accepted
4000-0000-0000-0341"Declined by Gateway" error returned, but Recurly allows the card to be stored

3DS2 test cards

Use these cards to test 3DS2 challenge flows only. See the 3DS2 integration guide for implementation details and instructions on using these cards.

Card numberDescription
4000000000003220Triggers the 3DS2 challenge flow
4000000000003063Triggers the device fingerprint flow
4222222222222220Triggers an approved transaction requiring fraud review (frictionless flow)
4000008400001629Tests the 3DS2 dunning flow

Test bank account numbers (ACH)

ACH bank account testing uses Recurly's internal test gateway — it does not test your live gateway connection, but simulates transaction responses and invoice states for ACH payments and refunds.

Add bank account details via the API, Hosted Account Management pages, or the Make a Payment button on the hosted invoice page.

Note Adding bank account details through the Recurly Admin is not supported due to NACHA regulations on merchant access to customer account information.

Routing number

Routing numberDescription
123456780The only routing number that works in sandbox mode. Returns "BANK OF RECURLY."

Successful bank account number

Account numberDescription
111111111Settled

Declined bank account numbers

Account numberDescription
111111112Transaction canceled by the bank
111111113Transaction canceled by the bank
111111114Initially successful, then issues a chargeback
111111115If refunded, returns a successful refund
111111116If refunded, returns a declined refund


Did this page help you?