🎉 White Payments joins Payfort! Read all about it🎉
Getting Started
  • Same-page dialog
  • Custom form
  • Mobile Apps
References
Integrating White

Testing White

How to test White without going bankrupt

Wouldn't it be great if there was a way to test all you liked without having to use real-life credit cards?

Well, it turns out you can.

In the interest of keeping developers from spending money on their integrations, we're created a set of test cards that you can use.

Note: Test cards only work in `Test Mode`, i.e. when you're using a test API key.

Test Cards

Here's a list of all of the test cards that White supports, and the result that they'll simulate.

Successful transactions

NumberCard Type
4242424242424242Visa
4000000000000101Visa

Testing Failed transactions

As described in the [API Documentation](/docs/api/#error-types), there are 4 main types of errors:

Request Errors

ParametersDescription
'number = abcTriggers an invalid card error
'exp_month = 13Simulates an invalid month
'exp_year = 1979Simulates an invalid year (just use any year in the past)
'cvc = abcSimulates an invalid CVC code

Banking Errors

Error to simulateNumber
card_declined4000000000000002

Authentication Errors

Simply use an invalid token when making the API request. Here's an example: `this_is_an_invalid_key`, but you can probably come up with more imaginative ones yourself.

Processing Errors

Processing errors indicate that something went wrong on White's end. In order to test a processing error, just use the card number `4000000000000127`. It should generate an `internal_server_error`.


Go forth and have fun! But remember, you must use a **Test API key** in order for all of these test scenarios to actually work.