Developer docs v0.1.0

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

NameTypeRequiredDescription
limitintegernoPage size (1–100). · ≥ 1, ≤ 100, default 20
starting_afterstringnoObject ID; return objects after it (ascending ID order). · 26 chars
order"asc" | "desc"nodesc lists newest first. · default "asc"
status"pending_approval" | "active" | "exhausted" | "expired" | "revoked"noFilter by status.
customerstringnoFilter by customer. · 26 chars
agentstringnoFilter by agent. · 26 chars

Responses

StatusMeaningBody / error codes
200Success.object
400Invalid query.invalid_query_param
401Missing or invalid API key.authentication_error
429Rate limited; honor retry-after.rate_limit_exceeded too_many_auth_failures
500Server 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

NameTypeRequiredDescription
Idempotency-KeystringnoMakes 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

FieldTypeRequiredDescription
agent_idstringnoThe agent. Optional when an agent key creates the mandate: it is always that key's own agent. · 26 chars
customer_idstringyesULID · 26 chars
instrument_idstringnoThe customer's card. Defaults to their default card; it must have finished hosted enrollment. · 26 chars
currency"RON" | "EUR" | "USD"yes
per_payment_minintegerno≥ 1
per_payment_maxintegerno≥ 1
budgetintegeryesMost the mandate may charge in total, in minor units. · ≥ 1
max_paymentsintegerno≥ 1
period"day" | "week" | "month"noCalendar 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_budgetintegernoMost the mandate may charge in one period, in minor units. Cannot exceed budget. · ≥ 1
period_max_paymentsintegernoMost payments in one period. Cannot exceed max_payments. · ≥ 1
timezonestringnoIANA zone that decides where a period begins, for example Europe/Bucharest. · ≤ 64 chars, default "UTC"
starts_atstring (date-time)noCharges are refused before this time. Must fall before the mandate expires.
descriptionstringno≤ 500 chars
expires_in_daysintegerno≥ 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

StatusMeaningBody / error codes
201Created.Mandate
400Invalid body.validation_failed invalid_json
401Missing or invalid API key.authentication_error
403This key may not create it.agent_not_registered mandate_agent_mismatch scope_missing
404Agent, customer or card not found.resource_missing
409The agent is disabled.agent_disabled
429Rate limited; honor retry-after.rate_limit_exceeded too_many_auth_failures
500Server 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

NameTypeRequiredDescription
idstringyesObject ID (ULID). · 26 chars

Responses

StatusMeaningBody / error codes
200Success.Mandate
401Missing or invalid API key.authentication_error
404Not found, or not yours.resource_missing
429Rate limited; honor retry-after.rate_limit_exceeded too_many_auth_failures
500Server 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

NameTypeRequiredDescription
idstringyesObject ID (ULID). · 26 chars

Headers

NameTypeRequiredDescription
Idempotency-KeystringnoMakes 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

StatusMeaningBody / error codes
200Success.Mandate
401Missing or invalid API key.authentication_error
404Not found, or not yours.resource_missing
409The mandate has already expired.mandate_not_active
429Rate limited; honor retry-after.rate_limit_exceeded too_many_auth_failures
500Server 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"
}