Automatic debit - enrolling a card
Same flow as the merchant portal's automatic debit: ROKI charges 1.00 HNL with 3-D Secure, voids
it, and saves the card (pm_* plus the signed agreement) only if the processor returns a PAN
token.
Read this before using the API route.
POST /automatic-debit/authorizationstakescard_pan,card_expiry_month,card_expiry_yearandcard_cvvin your backend's request. That is the one Connect route where card data passes through the merchant's server, and it puts that server in PCI scope for card data - unlike every mode in this guide. If you can, share the merchant's hosted enrolment page (https://aura.roki.systems/automatic-debit/{merchant-slug}) instead: the card is entered on ROKI, and thepm_*appears under Connect -> Automatic Debit -> Authorizations.
Verified 2026-10-28 on a merchant with no agreement template:
GET /automatic-debit/agreementanswers200withready: false,template: nulland amessage; enrolment answers422 automatic_debit_not_configured- before theIdempotency-Keycheck; an unknown enrolment id answers422 automatic_debit_authorization_not_found(not 404). An enrolment itself was not run.
The flow:
GET /automatic-debit/agreement-ready,scopes(all,subscriptions,recurring,subscriptions_and_recurring) andtemplate.terms_text(HTML, localized byAccept-Language). Show the terms before enrolling.POST /automatic-debit/authorizationswithIdempotency-Keyandcustomer(name,email,identification_type,identity_number, optionalphone),internal_reference(the contract or account number, as in the portal), the card fields,scope, optionalcap_per_charge,terms_accepted: true, optionalsignature(PNG data-URL) and optional HTTPSsuccess_url/cancel_url.- The answer is
status: "requires_action"with a signed, expiringauthentication_url: redirect the customer there for 3-D Secure. GET /automatic-debit/authorizations/{id}:succeeded(haspayment_method_id),incomplete(3DS and void succeeded but no PAN token - do not charge),failed, or stillrequires_action.
The pm_* it produces is what recurring arrangements (26) charge.
