Developer documentationGet API keys

Ronda API

A REST API for recurring payments in Armenia. Save a card once on your bank's hosted page, then charge it on a schedule — merchant-initiated, with no customer present.

Base URL

https://api.ronda.sh/v1

Every request is JSON in and JSON out. The API is server-to-server: a secret key must never reach a browser or a mobile app.

Authentication

Send your secret key as a bearer token. The key itself decides both the merchant and the mode — there is no account or mode parameter to get wrong.

curl https://api.ronda.sh/v1/customers \
  -H "Authorization: Bearer sk_test_…"
KeyWhere it belongsWhat it can do
pk_test_… / pk_live_…Anywhere, including a browserOpen a checkout session, and read that session back
sk_test_… / sk_live_…Your server onlyEverything, subject to the key's scopes

Secret keys are stored as a hash and shown once at creation. If you lose one, rotate it — Ronda cannot recover it, which is the point.

Test and live mode

Each mode has its own keys and its own data. A test key literally cannot address a live object: mode is a column on every row and is derived from the key, never from the request. Test payments never accrue a platform fee.

Conventions

  • Ids are prefixed. cus_, plan_, sub_, pay_, re_, link_, evt_, cs_, dp_, in_.
  • Amounts are integers in minor units plus a currency. For AMD one minor unit is one dram, so 12900 means ֏ 12 900. Never send a decimal.
  • Timestamps are unix seconds.
  • Every object carries metadata — up to 50 keys of your own data, returned untouched.
  • Lists are cursor-paginated and wrapped in { object: "list", data: [...], has_more }.

Idempotency

Send an Idempotency-Key header on any POST that moves money. A repeat of the same key returns the original response instead of acting again, and carries Idempotent-Replay: true. Re-using a key with a different body is rejected with 409 rather than silently doing something new.

curl -X POST https://api.ronda.sh/v1/payments \
  -H "Authorization: Bearer sk_test_…" \
  -H "Idempotency-Key: order-3391-charge" \
  -H "Content-Type: application/json" \
  -d '{"amount": 12900, "customer": "cus_…"}'

Pagination

GET /v1/payments?limit=25
GET /v1/payments?limit=25&starting_after=pay_9f3a…

Cursors are object ids, not offsets, so a page never skips a row because new payments arrived while you were reading.

Where to go next

  • Quickstart — first recurring subscription in about ten minutes
  • API reference — every endpoint with examples
  • Webhooks — the event catalogue and signature verification
  • Test cards — approvals, declines, 3-D Secure and dunning