ROKIConnect
Connectors Start API SDKs Migrate MCP Portal ES
DocumentationPayment authorizations (holds)

Payment authorizations (holds)

Authorize now, capture or release later - a generic hold, not a sale and not automatic debit. You create the hold, send the customer to its pay_url (card + 3-D Secure on ROKI), and once it is authorized you capture the full amount or release it.

Verified 2026-10-28: creation, read, not-found, the 30-day limit, capture and release from the wrong state, release without a reason, and the idempotency rule. An authorization through 3-D Secure, a real capture and a real release were not run.

29.1 Create

POST /api/connect/v1/payment-authorizations
Authorization: Bearer sk_test_...
Idempotency-Key: hold-1001

{
  "amount": 1000.00,
  "currency_code": "340",
  "expires_at": "2026-11-15 23:59:59",
  "success_url": "https://partner.example/hold/ok",
  "cancel_url": "https://partner.example/hold/cancel",
  "description": "Order hold",
  "customer": { "name": "Maria Lopez", "email": "maria@example.com",
                "identification_type": "DNI", "identity_number": "0801199000000" }
}

What the probe measured, and where this route differs from the others:

29.2 The customer authorizes

Redirect to pay_url. Failed attempts leave the hold active so the customer can retry until expires_at. Afterwards ROKI redirects to success_url or cancel_url with status (authorized | failed), payment_authorization_id, reference, authorization_id and maybe error in the query - UX only; confirm with GET or the webhook.

29.3 Capture

POST /payment-authorizations/{id}/capture captures the full authorized amount (no partial capture) and emits payment.approved with data.object = "payment_authorization". From any state but authorized it answers 422 payment_authorization_invalid (verified on an active hold).

29.4 Release

POST /payment-authorizations/{id}/release with {"reason": "...", "notes": "..."} voids an authorized hold. reason is required (422 reason_invalid without it, verified). Releasing an active hold answers 422 payment_authorization_invalid - a hold that was never authorized cannot be released; it simply expires.

An unknown id answers 404 with the generic code: "not_found".

29.5 Webhooks

payment_authorization.authorized, payment_authorization.released (with release_reason / release_notes), payment_authorization.expired (an hourly job sweeps holds past expires_at), and payment.approved on capture. Same signature and retries as every other event.