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.
https://api.ronda.am/v1Every 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.
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.am/v1/customers \
-H "Authorization: Bearer sk_test_…"| Key | Where it belongs | What it can do |
|---|---|---|
pk_test_… / pk_live_… | Anywhere, including a browser | Open a checkout session, and read that session back |
sk_test_… / sk_live_… | Your server only | Everything, 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.
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.
cus_ customer, prod_ product, plan_ price, sub_ subscription, pay_ payment, pm_ saved card, re_ refund, inv_ invoice, cs_ checkout session, link_ payment link, cpn_ coupon, di_ discount, dp_ dispute, we_ webhook endpoint, evt_ event, whd_ webhook delivery.12900 means ֏ 12 900. USD and EUR are in cents: 1999 is $19.99. Never send a decimal. Currency codes are case-insensitive.metadata — up to 50 keys of your own data, returned untouched.{ object: "list", data: [...], has_more }.Send an Idempotency-Key header on every create. 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.
The key is honoured when creating customers, products, plans, subscriptions, payments, refunds, coupons, invoices, checkout sessions and payment links, and on POST /v1/subscriptions/:id and change_plan. Other POSTs ignore it. Retry, cancel, pause and resume act on the subscription's state, so repeating one is refused or changes nothing. Portal sessions and webhook endpoints make a new object every time: a portal link is a sign-in for your customer, so Ronda never keeps a copy to replay. List endpoints before adding one.
curl -X POST https://api.ronda.am/v1/payments \
-H "Authorization: Bearer sk_test_…" \
-H "Idempotency-Key: order-3391-charge" \
-H "Content-Type: application/json" \
-d '{"amount": 12900, "currency": "AMD", "customer": "cus_…"}'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.