Documentation

API limits

The API v1 limits are initial values published in the contract: every limited response carries RateLimit headers and, when you must wait, Retry-After; changing them does not break the API.

Rate limits

These numbers are initial values published in the contract. They are tuned with experience; changing them does not break the API.

Every response of a limited route carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset. A 429 also carries Retry-After. Values are per window; the burst is what is allowed at once on top of the sustained pace.

Rate limits
Rate limitsWindowPracticeLiveBurst
Every authenticated request, per key1 min1206030
Request payments (`POST /v1/spends`), per agent1 min20105
Request payments per day, per agent1 day10002000
Check a payment (`POST /v1/spends/check`), per agent1 min603010
Administration writes (agents, rules, destinations, keys), per key1 min301510
Rotate or create keys per day, per owner1 day50100
Practice environment control (`/v1/test/*`), per owner1 h120020
Requests with an invalid or missing key, per IP10 min30300

Headers

The limit headers in the API responses are:

  • RateLimit-Limit
  • RateLimit-Remaining
  • RateLimit-Reset
  • Retry-After

Sizes

Maximum values of the request and of some fields.

Sizes
SizesValue
Request body16 KiB
`memo`280 characters
`client_reference`64 characters
`destination`253 characters
`resource` URL2048 characters
Items per page (default)10 items
Items per page (maximum)50 items
Long wait (`wait_seconds`)20 seconds
Idempotency key memory (minimum)24 hours
Lifetime of a pending approval (default)15 minutes (5-60)
Duplicate purchase warning window60 seconds
Lifetime of a practice key (default)90 days
Lifetime of a live key (default)30 days
Overlap when rotating a key (maximum)7 days

Quotas

Caps on how many things each owner can have.

Quotas
QuotasValue
Active agents in practice5
Active agents in live10
Archived agents20
Active keys per agent3
Active owner keys3
Webhook endpoints10
Days events are kept30

Idempotency

  • With the same key and the same fingerprint (amount, currency, destination and resource), the API gives back the current state of the same payment with idempotent_replay: true, without paying again.
  • memo and client_reference are not part of the fingerprint: a model rewrites them every time it retries.
  • The same key with a different fingerprint gives 409 idempotency_conflict; changed_fields says what changed.
  • A failed payment leaves the key spent: a new attempt needs a new key.

Webhooks

  • Maximum response time of the endpoint: 5 seconds.
  • Attempts per delivery: 8, over about 24 hours.
  • After 20 failures in a row the endpoint is paused and the owner is told.