Mode 3 - Recurring payments
A recurring arrangement (rec_*) anchors a schedule - amount, frequency, billing day - to a saved
card (pm_*). Each charge is merchant-initiated: the processor receives ThreeDSecure:false
and Recurring:true, so no customer is present and no 3-D Secure challenge runs.
Verified 2026-10-28, and what was not. On the platform we probed, recurring is not enabled:
POST /recurringanswers422withcode: "payment_method_id_invalid"and the message "Recurring payments are not enabled on this platform." - in English whateverAccept-Languagesays, and filed underpayment_method_idalthough no value of that field fixes it. The list, the not-found shape and every validation path were exercised. A real arrangement and a real charge were not, so the success shapes below are ROKI's documented ones.
26.1 The lifecycle
0. The customer enrols a card (automatic debit, section 31, or the merchant's hosted
enrolment page https://aura.roki.systems/automatic-debit/{merchant-slug})
-> 3-D Secure once -> card saved as pm_*
1. POST /recurring -> { "id": "rec_42", "status": "pending_activation" }
2. POST /recurring/rec_42/charge -> { "id": "<txn uuid>", "status": "approved" }
(the first approved charge makes the arrangement "active")
3. DELETE /recurring/rec_42 -> { "status": "cancelled" }
26.2 Create
POST /api/connect/v1/recurring
Authorization: Bearer sk_test_...
{
"payment_method_id": "pm_7k2n9xqf31ab",
"amount": 850.00,
"currency_code": "340",
"frequency": "monthly",
"billing_day": 1,
"description": "Monthly subscription",
"external_reference": "sub-customer-001"
}
frequency is one of weekly, biweekly, monthly, quarterly, yearly (anything else:
422 frequency_invalid, verified). billing_day (1-31) applies only to monthly, quarterly and
yearly.
26.3 Charge
POST /api/connect/v1/recurring/rec_42/charge
Authorization: Bearer sk_test_...
Idempotency-Key: rec_42-2026-11
{}
Idempotency-Keyis mandatory (verified:422 idempotency_key_requiredwithout it). Derive it from the arrangement and the billing period, so a retried job can never charge a cycle twice.amountis optional and defaults to the plan's.- An approved charge answers
201; a decline answers200withstatus: "failed", not a 4xx. Code that only checks the HTTP status records a declined renewal as paid. - On success
next_billing_atadvances by one period. The returnedidis a transaction UUID: void, refund and receipts work on it like on any other payment (13).
Nothing in ROKI fires this call on the date. next_billing_at is a record, not a job. Your
scheduler reads it and calls charge; your dunning policy decides what to do with
failed_payment_attempts.
26.4 List, read, cancel
GET /recurring?status=active&per_page=25- paginated{data, meta}. Thestatusfilter is not validated (verified:?status=bogusanswers200), unlikeGET /payments, which answers422 status_invalid. A typo in the filter silently changes what you get back.GET /recurring/{rec_id}- unknown id:404with the genericcode: "not_found"and an English message.DELETE /recurring/{rec_id}- cancels, issues no refund, is idempotent, and does not revoke thepm_*.
26.5 Webhooks
recurring.charge.succeeded, recurring.charge.failed and recurring.cancelled. Their data
carries recurring_id, status, plan_frequency, next_billing_at and, for charges, a charge
object with id, status, amount, iso_response_code and approved_at.
