ROKIConnect
Connectors Start API SDKs Migrate MCP Portal ES
DocumentationMode 3 - Recurring payments

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 /recurring answers 422 with code: "payment_method_id_invalid" and the message "Recurring payments are not enabled on this platform." - in English whatever Accept-Language says, and filed under payment_method_id although 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

{}

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

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.