- Same-page dialog
- Custom form
- Mobile Apps
- Testing
- white.js
- beautiful.js
- API Documentation
- API Wrapper libs
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.
Test Cards
Here's a list of all of the test cards that White supports, and the result that they'll simulate.
Successful transactions
Number | Card Type |
---|---|
4242424242424242 | Visa |
4000000000000101 | Visa |
Testing Failed transactions
As described in the [API Documentation](/docs/api/#error-types), there are 4 main types of errors:
Request Errors
Parameters | Description |
---|---|
'number = abc | Triggers an invalid card error |
'exp_month = 13 | Simulates an invalid month |
'exp_year = 1979 | Simulates an invalid year (just use any year in the past) |
'cvc = abc | Simulates an invalid CVC code |
Banking Errors
Error to simulate | Number |
---|---|
card_declined | 4000000000000002 |
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.