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

# Test mode

> The whole API with fake money, and buttons to play the customer.

With a `sk_test_` key, everything works as in live mode (fees, balances,
webhooks, events) but no money moves and no phone is prompted. Test data
and live data never mix.

## Finishing payments yourself

In live mode a customer approves a payin on their phone, and a partner
completes a payout. In test mode, you decide:

| Call | What it does |
| - | - |
| `POST /v1/test_helpers/payins/{id}/succeed` | The customer approves |
| `POST /v1/test_helpers/payins/{id}/fail` | The customer declines |
| `POST /v1/test_helpers/payouts/{id}/succeed` | The recipient receives it |
| `POST /v1/test_helpers/payouts/{id}/fail` | The payout fails; money returns |

`fail` takes an optional reason, which appears in the payment's `failure`:

```bash theme={null}
curl -X POST https://onepay-api-eiy9.onrender.com/v1/test_helpers/payins/pay_3d74b8e558814f19ac046b6b151a376b/fail \
  -H "Authorization: Bearer $ONEPAY_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "code": "insufficient_funds", "message": "The customer did not have enough money" }'
```

With a live key these answer `403 test_mode_only`.

## Good to know

* Any well-formed phone number works: `+2376` and 8 digits in Cameroon.
* Test payins become **available** at once, so you can try payouts straight
  away. In the dashboard, **Add test funds** gives you test money in one click.
* Nigerian bank transfer payins return a placeholder payment page
  (`checkout.onepay.test`): finish them with the test helpers.
* Test bank accounts for payouts are approved at once.
* Live [limits](https://pay.onemarketc.com/docs/guides/going-live.md#limits) do not apply in test mode.


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