Introduction
The conventions every Rasto Business endpoint follows, and where to find each one documented.
The Rasto Business API is REST over HTTPS, with JSON request and response bodies. Every endpoint in the reference follows the conventions on this page, so learning them once covers the whole surface.
export BASE=https://sandbox.rasto.co
export KEY=sk_test_...
curl -s $BASE/api/customers -H "Api-Key: $KEY"
The conventions
| Convention | Rule | Detail |
|---|---|---|
| Authentication | Api-Key header on every request | Authentication |
| Environments | Two hosts, two key prefixes, partitioned data | Environments |
| Versioning | Optional Api-Version header, ISO date. Omitting it pins the oldest supported version | Environments |
| Idempotency | Idempotency-Key required on every POST /api/* | Idempotency |
| Errors | One envelope, a coarse kind and a specific code | Errors |
| Statuses | Stable vocabulary, forward only, one webhook per transition worth reacting to | Statuses & Lifecycles |
| Pagination | Cursor based, limit 1 to 100, default 25 | Pagination & Filtering |
| Amounts | Decimal strings. Rates in basis points | Amounts & Precision |
Three surfaces
The URL prefix tells you who a route is for.
| Prefix | Caller | Auth |
|---|---|---|
/api/* | You, from your backend | Api-Key |
/dashboard/* | Your team, from the dashboard | Dashboard session |
Tenant-level operations live on /dashboard/* deliberately: signing up,
managing API keys, and registering wallet keys. A leaked API key cannot
reach them.
A third surface receives inbound callbacks from the banking and verification systems behind the API. It is authenticated separately and is never callable with an API key, which is why it is not documented here.
Naming rules worth knowing
- Discriminator fields are always
kind, nevertype. A customer'skind, a destination'skind, an event'skind. - Money values are decimal strings in the asset's major units, never floats and never smallest-unit integers.
- Rates are basis points, never percent.
100means 1%. - Bank details use native vocabulary:
account_numberandrouting_numberfor USD,ibanandbicfor SEPA. There is no generic account identifier field. - Ids are opaque strings with a stable prefix (
cus_,va_,wop_). Do not parse them. See Objects & Terminology.
Objects and envelopes
Single resources return the object directly, with an object field naming
its kind:
{"id": "cus_033y1FhTOmoW9W2jAuSvQx", "object": "customer", "kind": "individual"}
Lists return a fixed wrapper:
{"data": [], "has_more": false, "next_cursor": null}
Webhook payloads carry the same objects. data.object inside an event is
byte-identical to what the matching GET returns, so your models never fork.
Errors
Every failure, on every endpoint, returns the same envelope:
{
"error": {
"kind": "invalid_request_error",
"code": "endorsement_required",
"message": "...",
"param": null,
"request_id": "req_033xhsr1AZZxC8AOkK7y3W"
}
}
Branch on code. Every documented code carries a retry class in
Errors.