Spreedly provides a set of test data for use against the test gateway in an initial integration with our API. This test data is only recognized by the test gateway, so using this data in production gateways will pass the card values just like any other payment method.

Credit cards

Card typeGood cardDeclined/failed card
Visa41111111111111114012888888881881
Visa (19-digit)44443333222211114554917610000000000003
Mastercard55555555555544445105105105105100
Mastercard (2-series BIN)22230031220032222720992720992729
American Express378282246310005371449635398431
Discover60111111111111176011000990139424
Diners Club3056930902590430207712915383
JCB35699900100304003528327757705979
Dankort50197170101037425019994000124034
Maestro67590000000000000056799990100000000019
Carnet50622800000000026393889871239875
Elo50673100000000105067312520593847
Alelo50677052320927525067705613381311
Cabal60352277164270215896570834189662
Naranja58956278234530055895627823453064
Panal60204900000000006020490000000000
Confiable56071800000000005607180000000001
Verve50609905800002174995612330000000000412
3D Secure 1 or 2 Enrolled45567610299838864024007101934890
Third-party VaultAny4217651111111119

Click to Pay

The following card numbers are compatible with MasterCard Click to Pay and will return a successful response from the Spreedly Test gateway.

Card typeCard number(s)
Mastercard5186001700008785, 5120350100064537
Visa4622943127011022
American Express373708623186001
Discover6011208800050000

Apple Pay

When using Apple Pay, there is no way to request a test payment method from the Passkit framework. Instead, pass in the test_card_number parameter set to one of the above test credit card numbers and Spreedly will recognize it as a test payment method.

Capture/credit

On the test gateway, both the capture and the credit operation always succeed unless you use an amount of 44 cents. The test gateway recognizes that amount and returns a failure in that case to allow testing of capture/credit failures.

Offsite gateway testing

Purchases made against the test gateway with an offsite payment can be made to fail by using that same 44 cents in the transaction. Note that attempting a 3D Secure transaction when performing offsite transactions is not supported. Please specify false for attempt_3dsecure to avoid failing these test transactions for that reason.

Bank accounts

Test routing number: 021000021

All other routing numbers will be considered production (non-test) payment methods.

Good test account number: 9876543210

This account number only works with the test routing number above; all other account numbers will generate a failure when used with the test routing number.