JamiDev
REST API

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/jamidev

There'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"
PrefixOrganization
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.

EndpointAuth
POST /products, GET /products, GET/PATCH/DELETE /products/{id}Token (or the dashboard session)
POST /checkoutToken. Hosted checkout pages also call it without one, for published products only.
GET /checkout/{sessionId}None. The session id is the secret.
GET /ordersToken
POST /subscriptions/checkout, GET /subscriptions, GET /subscriptions/{id}, POST /subscriptions/{id}/cancel, /resume, /simulate-renewalToken (or the dashboard session). A token can never start a subscription or charge a wallet; the payer approves on Jami.
GET /balanceToken
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). 10000 is 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) and limit (1 to 100, default 20), return newest first, and respond with { items, total, page, limit }.
  • Idempotency: POST /withdrawals accepts an Idempotency-Key header.

Errors

Errors return a status code and a JSON body with a readable message. Most use { "error": "…" }; authentication failures use { "message": "…" }.

StatusMeaning
400Validation failed. The message names the field.
401Missing, malformed, revoked, or wrong-environment token
403Products: no token and no dashboard session
402Withdrawal: the owner's wallet can't cover it right now
404Not found, or not in your organization (the API doesn't distinguish)
409Payment 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).
410Payment link: expired
422Products: changing a field that's locked after creation
429Too many checkout or subscribe-link requests, or the daily payout cap
500Something broke on our side. Safe to retry with the same idempotency key.
502The payment provider rejected the checkout

Rate limits

EndpointLimit
POST /checkout with a tokenA bucket per token: bursts of up to 200, refilling at 20 per second
POST /checkout without a token40 per 5 minutes per IP
POST /subscriptions/checkoutA 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.

On this page