Quickstart

A test key to a settled charge, in about ten minutes.

Everything below runs against sandbox. No real money moves, and you do not need a verified business to try it.

1. Get a test key

Create one in the dashboard under Settings → API keys. Test keys begin sk_test_.

A live key begins sk_live_ and moves real money. The two are separate credentials against separate data — a test key cannot read a live charge, and a live key cannot read a test one.

2. Take a payment

curl -X POST https://sandbox.inversepay.app/api/b/v1/charges \
  -H "Authorization: Bearer $INVERSEPAY_TEST_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "idempotency_key": "order-1001",
    "amount_minor": 500000,
    "currency": "RWF"
  }'
201 Created
{
  "id": "3f1c...",
  "amount_minor": 500000,
  "currency": "RWF",
  "status": "created",
  "is_test": true
}

amount_minor is 5,000 RWF. is_test tells you which world you are in without having to remember which key you used.

3. Send it again

Same idempotency_key, same response — the original charge, not a second one.

That is not a quirk to work around; it is the contract. When a request times out and you do not know whether it landed, retry it with the same key. You will either create the charge or be handed the one you already created.

4. Watch it settle

Sandbox does not wait for a human, and it will fail on purpose if you ask it to:

AmountWhat happens
anything elsesucceeds
999999declines
999998times out
999997succeeds, then reverses
999996goes to pending review

Build your failure handling against these before you go live, because the day you meet a real decline should not be the first time your code has seen one.

5. Then what

On this page