Overview
Base URL, authentication, environments, conventions, errors and rate limits for the JamiDev REST API.
The REST API is what jami-sdk calls under the hood. Use it directly from any
language. It covers Products, Checkout,
Orders, Subscriptions, and balance and
Withdrawals. The machine-readable spec is at
/openapi.json.
https://jami.bio/api/jamidevThere's no separate sandbox host. Your token decides which environment you're in.
Authentication
Create tokens in Developer → API Tokens and send them as a bearer token:
curl https://jami.bio/api/jamidev/orders \
-H "Authorization: Bearer $JAMI_TOKEN"| Prefix | Organization |
|---|---|
jamidev_test_ | Sandbox |
jamidev_live_ | Production |
The full token is shown once; Jami stores only a hash. A token is tied to the environment it
was created in. If the organization switches environment, the token returns 401 telling
you to create a new one, so an old test token can never act on live data.
| Endpoint | Auth |
|---|---|
POST /products, GET /products, GET/PATCH/DELETE /products/{id} | Token (or the dashboard session) |
POST /checkout | Token. Hosted checkout pages also call it without one, for published products only. |
GET /checkout/{sessionId} | None. The session id is the secret. |
GET /orders | Token |
POST /subscriptions/checkout, GET /subscriptions, GET /subscriptions/{id}, POST /subscriptions/{id}/cancel, /resume, /simulate-renewal | Token (or the dashboard session). A token can never start a subscription or charge a wallet; the payer approves on Jami. |
GET /balance | Token |
POST /withdrawals, GET /withdrawals, GET /withdrawals/{id} | Token |
With a token, POST /checkout only sees your organization's products, always honors
successUrl, accepts metadata, can charge a custom amount with no
product, and returns a payment link when you leave out
gateway. Without a token, none of those work.
Conventions
- Money is integer santim (ETB minor units).
10000is 100.00 ETB. - Bodies are JSON in and out. Send
Content-Type: application/json. - Ids are 24-character hex strings. Products also have a public
p_…token. - Lists take
page(from 1) andlimit(1 to 100, default 20), return newest first, and respond with{ items, total, page, limit }. - Idempotency:
POST /withdrawalsaccepts anIdempotency-Keyheader.
Errors
Errors return a status code and a JSON body with a readable message. Most use
{ "error": "…" }; authentication failures use { "message": "…" }.
| Status | Meaning |
|---|---|
400 | Validation failed. The message names the field. |
401 | Missing, malformed, revoked, or wrong-environment token |
403 | Products: no token and no dashboard session |
402 | Withdrawal: the owner's wallet can't cover it right now |
404 | Not found, or not in your organization (the API doesn't distinguish) |
409 | Payment link: a prompt is already out, or it's already paid. Subscriptions: the plan isn't available, or the action isn't allowed (code says which). |
410 | Payment link: expired |
422 | Products: changing a field that's locked after creation |
429 | Too many checkout or subscribe-link requests, or the daily payout cap |
500 | Something broke on our side. Safe to retry with the same idempotency key. |
502 | The payment provider rejected the checkout |
Rate limits
| Endpoint | Limit |
|---|---|
POST /checkout with a token | A bucket per token: bursts of up to 200, refilling at 20 per second |
POST /checkout without a token | 40 per 5 minutes per IP |
POST /subscriptions/checkout | A bucket per organization: bursts of up to 100, refilling at 10 per second |
When you get a 429, back off and retry. All limits are listed on
Fees & limits.
