Testing scenarios
When a credit card payment fails through xMoney, the API response includes a failureReason
to provide more context. To test different failure reasons, create a test card payment with a specific amount in test mode (see table below). Force the payment to failed
status in the test flow to trigger the corresponding failureReason
in the response.
Test cards
Use these test cards to simulate the different payment scenarios in your test environment.
Card number | Expiry date (MM/YY) | CVV | 3DS code |
---|---|---|---|
4111111111111111 | Any future date | 123 | 00000 |
Magic amounts
Use these magic amounts to trigger specific failure reasons when testing your integration.
Failure reason | Magic amount |
---|---|
Insufficient funds | 0.02 |
Bank time out | 0.03 |
Pending at Bank | 0.04 |
Declined by Bank | 0.05 |
Rejected by Processor | 0.06 |
Malformed response from Processor | 0.07 |
Timeout (processor hangs in an infinite loop) | 0.08 |
3D Secure transaction | over 25.00 |