Mandates
A customer's bounded permission for an agent to charge their saved card.
GET /v1/mandates
List mandates
Cursor-paginated. Filter by status, customer or agent.
- Authentication
- Merchant API key
- Effect
- Read-only.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Page size (1–100). · ≥ 1, ≤ 100, default 20 |
starting_after | string | no | Object ID; return objects after it (ascending ID order). · 26 chars |
order | "asc" | "desc" | no | desc lists newest first. · default "asc" |
status | "pending_approval" | "active" | "exhausted" | "expired" | "revoked" | no | Filter by status. |
customer | string | no | Filter by customer. · 26 chars |
agent | string | no | Filter by agent. · 26 chars |
Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | Success. | object |
| 400 | Invalid query. | invalid_query_param |
| 401 | Missing or invalid API key. | authentication_error |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"object": "list",
"url": "string",
"has_more": false,
"data": [
{
"object": "mandate",
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"merchant_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"agent_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"customer_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"instrument_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"status": "pending_approval",
"description": "string",
"currency": "RON",
"constraints": {
"per_payment_min": 1,
"per_payment_max": 1,
"budget": 1,
"max_payments": 1,
"period": {
"unit": "day",
"budget": 1,
"max_payments": 1,
"timezone": "string"
},
"starts_at": "2026-10-25T18:00:00.000Z"
},
"usage": {
"spent": 1,
"remaining": 1,
"payments": 1,
"period": {
"key": "string",
"spent": 1,
"remaining": 1,
"payments": 1,
"payments_remaining": 1
}
},
"expires_at": "2026-10-25T18:00:00.000Z",
"approved_at": "2026-10-25T18:00:00.000Z",
"revoked_at": "2026-10-25T18:00:00.000Z",
"approval": {},
"approval_url": "string",
"created_at": "2026-10-25T18:00:00.000Z",
"updated_at": "2026-10-25T18:00:00.000Z"
}
]
}POST /v1/mandates
Create a mandate
Creates a mandate in pending_approval and returns approval_url once. Give the URL to the customer: they read the limits in plain words and approve with a 6-digit code we email to the address of their customer record, so holding the link is not enough. The link works for 7 days. The agent can then charge with POST /v1/payments and mandate_id.
- Authentication
- Merchant API key
- Effect
- Creates a pending mandate and emits
mandate.created.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | no | Makes retries safe: same key + body replays the stored response (idempotency-replayed: true); a different body, or an agent key or dashboard session reusing another credential's key, returns 409 idempotency_key_in_use. · ≤ 96 chars |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
agent_id | string | no | The agent. Optional when an agent key creates the mandate: it is always that key's own agent. · 26 chars |
customer_id | string | yes | ULID · 26 chars |
instrument_id | string | no | The customer's card. Defaults to their default card; it must have finished hosted enrollment. · 26 chars |
currency | "RON" | "EUR" | "USD" | yes | |
per_payment_min | integer | no | ≥ 1 |
per_payment_max | integer | no | ≥ 1 |
budget | integer | yes | Most the mandate may charge in total, in minor units. · ≥ 1 |
max_payments | integer | no | ≥ 1 |
period | "day" | "week" | "month" | no | Calendar period for period_budget and period_max_payments, in timezone (a week starts on Monday). Counters start from zero in each new period. Needs at least one of the two. |
period_budget | integer | no | Most the mandate may charge in one period, in minor units. Cannot exceed budget. · ≥ 1 |
period_max_payments | integer | no | Most payments in one period. Cannot exceed max_payments. · ≥ 1 |
timezone | string | no | IANA zone that decides where a period begins, for example Europe/Bucharest. · ≤ 64 chars, default "UTC" |
starts_at | string (date-time) | no | Charges are refused before this time. Must fall before the mandate expires. |
description | string | no | ≤ 500 chars |
expires_in_days | integer | no | ≥ 1, ≤ 365, default 30 |
Example request
{
"agent_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"customer_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"instrument_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"currency": "RON",
"per_payment_min": 1,
"per_payment_max": 1,
"budget": 1,
"max_payments": 1,
"period": "day",
"period_budget": 1,
"period_max_payments": 1,
"timezone": "UTC",
"starts_at": "2026-10-25T18:00:00.000Z",
"description": "string",
"expires_in_days": 30
}Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 201 | Created. | Mandate |
| 400 | Invalid body. | validation_failed invalid_json |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | This key may not create it. | agent_not_registered mandate_agent_mismatch scope_missing |
| 404 | Agent, customer or card not found. | resource_missing |
| 409 | The agent is disabled. | agent_disabled |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"object": "mandate",
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"merchant_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"agent_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"customer_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"instrument_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"status": "pending_approval",
"description": "string",
"currency": "RON",
"constraints": {
"per_payment_min": 1,
"per_payment_max": 1,
"budget": 1,
"max_payments": 1,
"period": {
"unit": "day",
"budget": 1,
"max_payments": 1,
"timezone": "string"
},
"starts_at": "2026-10-25T18:00:00.000Z"
},
"usage": {
"spent": 1,
"remaining": 1,
"payments": 1,
"period": {
"key": "string",
"spent": 1,
"remaining": 1,
"payments": 1,
"payments_remaining": 1
}
},
"expires_at": "2026-10-25T18:00:00.000Z",
"approved_at": "2026-10-25T18:00:00.000Z",
"revoked_at": "2026-10-25T18:00:00.000Z",
"approval": {},
"approval_url": "string",
"created_at": "2026-10-25T18:00:00.000Z",
"updated_at": "2026-10-25T18:00:00.000Z"
}GET /v1/mandates/:id
Retrieve a mandate
Includes usage and, once approved, the approval evidence. An agent key retrieves only its own agent's mandates (another agent's mandate is 404); list and revoke follow the same rule.
- Authentication
- Merchant API key
- Effect
- Read-only.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Object ID (ULID). · 26 chars |
Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | Success. | Mandate |
| 401 | Missing or invalid API key. | authentication_error |
| 404 | Not found, or not yours. | resource_missing |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"object": "mandate",
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"merchant_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"agent_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"customer_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"instrument_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"status": "pending_approval",
"description": "string",
"currency": "RON",
"constraints": {
"per_payment_min": 1,
"per_payment_max": 1,
"budget": 1,
"max_payments": 1,
"period": {
"unit": "day",
"budget": 1,
"max_payments": 1,
"timezone": "string"
},
"starts_at": "2026-10-25T18:00:00.000Z"
},
"usage": {
"spent": 1,
"remaining": 1,
"payments": 1,
"period": {
"key": "string",
"spent": 1,
"remaining": 1,
"payments": 1,
"payments_remaining": 1
}
},
"expires_at": "2026-10-25T18:00:00.000Z",
"approved_at": "2026-10-25T18:00:00.000Z",
"revoked_at": "2026-10-25T18:00:00.000Z",
"approval": {},
"approval_url": "string",
"created_at": "2026-10-25T18:00:00.000Z",
"updated_at": "2026-10-25T18:00:00.000Z"
}POST /v1/mandates/:id/revoke
Revoke a mandate
Stops the mandate at once; later charges under it are refused. Charges already submitted are not undone.
- Authentication
- Merchant API key
- Effect
- Revokes the mandate and emits
mandate.revoked.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Object ID (ULID). · 26 chars |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | no | Makes retries safe: same key + body replays the stored response (idempotency-replayed: true); a different body, or an agent key or dashboard session reusing another credential's key, returns 409 idempotency_key_in_use. · ≤ 96 chars |
Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | Success. | Mandate |
| 401 | Missing or invalid API key. | authentication_error |
| 404 | Not found, or not yours. | resource_missing |
| 409 | The mandate has already expired. | mandate_not_active |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"object": "mandate",
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"merchant_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"agent_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"customer_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"instrument_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"status": "pending_approval",
"description": "string",
"currency": "RON",
"constraints": {
"per_payment_min": 1,
"per_payment_max": 1,
"budget": 1,
"max_payments": 1,
"period": {
"unit": "day",
"budget": 1,
"max_payments": 1,
"timezone": "string"
},
"starts_at": "2026-10-25T18:00:00.000Z"
},
"usage": {
"spent": 1,
"remaining": 1,
"payments": 1,
"period": {
"key": "string",
"spent": 1,
"remaining": 1,
"payments": 1,
"payments_remaining": 1
}
},
"expires_at": "2026-10-25T18:00:00.000Z",
"approved_at": "2026-10-25T18:00:00.000Z",
"revoked_at": "2026-10-25T18:00:00.000Z",
"approval": {},
"approval_url": "string",
"created_at": "2026-10-25T18:00:00.000Z",
"updated_at": "2026-10-25T18:00:00.000Z"
}