> ## Documentation Index
> Fetch the complete documentation index at: https://docs.afarapay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Test your integration

> Use test mode and test cards to try every outcome before you take real payments.

**Test mode** lets you run your whole payment flow without moving real money. Webhooks and email notifications still work, so what you see in test mode is a close copy of what happens in live mode.

## Switch between Test and Live

At the top right of the merchant portal there is a **Test / Live** switch. Your dashboard, transactions and API keys change with it. Real payments need your [live keys](https://docs.afarapay.com/guides/api-keys.md) and an approved [business profile](https://docs.afarapay.com/guides/business-profile.md).

> [!NOTE]
>
> Test mode needs your **test** keys, which start with `TPK_` and `TSK_`. Live keys start with `PK_` and `SK_`. Using the wrong pair is the most common reason a test payment does not show up.

## Test cards

Use these cards in the widget. Only these test cards work in test mode.

| Card | Number | Expiry | CVV | PIN | OTP | Result |
| - | - | - | - | - | - | - |
| Verve | `5060990580000217499` | 03/50 | 111 | 1111 | 123456 | Success |
| Visa | `4000000000002503` | 03/50 | 111 | 1111 | 123456 | Success |
| Mastercard | `5123450000000008` | 01/39 | 100 | 1111 | 123456 | Success |
| Verve | `5061830100001895` | 01/40 | 111 | 1111 | 123456 | Fails: the bank does not respond (timeout) |
| Verve | `5060990580000000390` | 03/50 | 111 | 1111 | 123456 | Fails: insufficient funds |
| Verve | `5612330000000000412` | 03/50 | 111 | 1111 | 123456 | Fails: no card record |

The default test **OTP is `123456`**.

> [!NOTE]
>
> We are re-checking this table against the live system. In our older documentation the Visa CVV was printed as `11` and the Mastercard number had a stray space, so the values above are our best reading. If a card is rejected, tell us which one so we can correct this page.

## A good test checklist

**1. Pay successfully**

Complete a payment with a success card. Check that your page shows the thank-you message and that the payment appears under **Transactions**.

**2. Try a failed payment**

Use the insufficient funds card. Check that your customer sees a clear message and can try again.

**3. Close the widget**

Open the widget and close it without paying. Check that your page does not mark the order as paid.

**4. Check your webhook**

If you use webhooks, confirm your server receives the message and that you reject one with a wrong signature.

Ready for real payments? Continue to the [go-live checklist](https://docs.afarapay.com/guides/go-live.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.