# Testing in sandbox

The [sandbox](https://sandbox.intasend.com) is a full copy of IntaSend that moves no real money.
Sign up there, copy your `_test_` keys from **Settings → API Keys**, and use them exactly as you would
live keys. See [Getting started](https://developers.intasend.com/getting-started/#2-choose-an-environment) for how keys pick the environment.

When you're ready to go live, sign up on [payment.intasend.com](https://payment.intasend.com/account/signup/)
and swap in your `_live_` keys. Nothing else in your integration changes.

## Test cards

Use any future expiry date and any 3-digit CVC.

| Card number |
|---|
| `4456 5300 0000 1096` |
| `4456 5300 0000 3134` |
| `4242 4242 4242 4242` |
| `5200 0000 0000 1096` |
| `5200 0000 0000 3092` |

## M-Pesa

For collections (STK Push), use your own Safaricom number. Sandbox requests go through the
M-Pesa developer platform, which reverses test amounts within 48 hours.

For payouts, use the test accounts below.

## Payout test accounts

A sandbox payout to one of these accounts succeeds straight away without reaching any provider.
It goes through the same states, wallet debits and [webhooks](https://developers.intasend.com/guides/webhooks/) as a live payout,
and returns `John Doe` as the recipient name. Payouts to any other account aren't guaranteed to
succeed in sandbox.

| `provider` | Test account | Also required |
|---|---|---|
| `MPESA-B2C` | `254708374149` (`0708374149` also works) | |
| `MPESA-B2B` | `99999` | `account_type`, plus `account_reference` for a paybill |
| `PESALINK` | `001001001001` | `bank_code`: `1` (KCB) |
| `INTASEND-XB` | One per country, see below | `country` matching the number |
| `INTASEND-XB-BANK` | `1001001001` | `country`: `UG`, `bank_code`: `STANBIC_BANK_UGANDA_TRANSFER` |

### Cross-border (`INTASEND-XB`)

Use the test account for the payout's `country`. Mobile money numbers are in international
format without `+`. A test account sent with a different `country` is treated as an
ordinary account.

| `country` | Test account |
|---|---|
| `BJ` Benin | `22960000000` |
| `GN` Guinea | `224620000000` |
| `KE` Kenya | `254708374149` |
| `ML` Mali | `22366000000` |
| `RW` Rwanda | `250780000000` |
| `TG` Togo | `22890000000` |
| `TZ` Tanzania | `255650000000` |
| `UG` Uganda | `256700000000` |
| `ZM` Zambia | `260960000000` |

```json
{
  "currency": "UGX",
  "country": "UG",
  "provider": "INTASEND-XB",
  "requires_approval": "NO",
  "transactions": [
    {"name": "John Doe", "account": "256700000000", "amount": "5000", "narrative": "Sandbox test"}
  ]
}
```

## Callbacks and webhooks

Your `redirect_url`, `callback_url` and [webhook](https://developers.intasend.com/guides/webhooks/) endpoints must use HTTPS, in sandbox as well as live.
