rano API · v1 Test mode

Payments APIfor South Africa.

Cards, PayShap and EFT through one REST API. Every payment comes back with its fee itemised and what it leaves you.

https://api.rano.co.za/v1
Checking the API
POST /v1/payments
curl https://api.rano.co.za/v1/payments \
  -H "Authorization: Bearer $RANO_SECRET_KEY" \
  -H "Idempotency-Key: order-2048" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 38600,
    "currency": "ZAR",
    "payment_method_type": "card",
    "confirm": true
  }'
200R386.00 card paymentfee R7.95 · net R378.05

The response

The fee is part of the payment. Line by line, with the net beside it.

This is the response to the request above, exactly as the API returns it in test mode. Point at a line of the receipt to find it in the JSON.

Card paymentsucceeded

R386.00

  • Card issuer (interchange)R2.24
  • Card schemeR0.58
  • Acquiring bankR0.77
  • ranoR4.36
  • of which VATR0.57
  • FeeR7.95
  • You receiveR378.05
  • Three cost lines say who else is paid. One line is ours.
  • VAT is split out of our margin, never added on top: margin_excl_vat plus vat is margin.
  • net is the amount less the fee, in cents.
200POST /v1/payments
{  "id": "pay_01m4jerva1f3qtnq99e4rgtnxb",  "object": "payment",  "amount": 38600,  "currency": "ZAR",  "status": "succeeded",  "payment_method_type": "card",  "description": null,  "metadata": {},  "amount_refunded": 0,  "fee": {    "vat": 57,    "costs": 359,    "lines": [      { "code": "interchange", "kind": "cost",        "label": "Card issuer (interchange)", "amount": 224 },      { "code": "scheme", "kind": "cost",        "label": "Card scheme", "amount": 58 },      { "code": "acquirer", "kind": "cost",        "label": "Acquiring bank", "amount": 77 },      { "code": "rano", "kind": "margin",        "label": "rano", "amount": 436 }    ],    "total": 795,    "margin": 436,    "currency": "ZAR",    "price_plan": "plan_01m4jerv7kfvb9g5zydb3ye81a",    "margin_excl_vat": 379  },  "net": 37805,  "next_action": null,  "last_error": null,  "cancellation_reason": null,  "livemode": false,  "created": 1791620836}

Start building

Everything you need. One request away.

Test keys run against a full copy of rano with simulated banks, so you can build the whole integration before going live.

Conventions

Four rules. No surprises.

38600

Amounts in cents

Every amount is a whole number in the currency's minor unit. R386.00 is 38600.

Idempotency-Key

Safe retries

Send a POST again with the same key and you get the first response back, never a second payment. The SDK sets one on every POST.

error.code

Errors you can act on

Every error has a type, a code and a plain message, and param names the field at fault.

request-id

Traceable

Every response carries a request-id header, and rano-version says which version of the API answered.

Get your test keys. Build today.

Leave your email and we'll send sandbox keys to early-access developers as we onboard them.