Idempotency and errors
Retry safely without creating duplicate payments.
Use test payment details only. No real money moves; live activation is separate.
POST /v1/payments requires Idempotency-Key: 8–128 letters, numbers, underscores, or hyphens. Use one key per business operation and keep it unchanged through network retries. The key is scoped to the authenticated merchant, environment, and operation.
The first request returns 201. A replay with identical fields returns 200, Idempotency-Replayed: true, and the original payment in its current state. Reuse with a changed amount, currency, reference, return URLs, collection flow, recurring consent or normalized customer profile returns 409 idempotency_conflict.
For customer wallets, name and email are part of that profile. Email casing and surrounding whitespace are normalized; names have surrounding whitespace trimmed. For example, " Customer@Example.com " and "customer@example.com" have the same retry fingerprint with an otherwise unchanged request. Changing the name beyond that trim, changing the email, or adding/removing the customer object conflicts. Dots and + aliases remain distinct. Each new order for a returning customer uses a new payment idempotency key. See customer matching.
Retry decisions
| Result | Action |
|---|---|
400 invalid_request | Correct the documented request fields; a card object is accepted only by the separately activated direct-card creation flow |
401 unauthorized | Supply a valid, unexpired API key for the chosen environment |
403 forbidden | Correct the key's scopes |
403 direct_card_not_enabled | Direct card submission is not enabled for this workspace and environment; use your existing hosted or token flow |
404 not_found | Check the endpoint or record belongs to this merchant |
409 idempotency_conflict | Reconcile the original request; do not bypass the conflict with a fresh key |
409 routing_unavailable | Payment processing is unavailable for this request; contact Aim Atlantic or retry later with the original key |
413 body_too_large | Keep request bodies within 8 KiB; dispute evidence allows up to 64 KiB |
429 rate_limited | Wait at least the Retry-After number of seconds, add jitter, then retry the same request and key |
503 provider_busy | Payment processing is temporarily busy; respect Retry-After and retain the original key |
503 temporarily_unavailable or timeout | Use bounded backoff and the same idempotency key; the operation may already have committed |
Errors include a request ID for support. A network timeout never proves a payment failed. This release does not expire idempotency records automatically.
For direct-card processing, an error after creation also includes error.payment_id. Retrieve that payment before another attempt. Card details are not part of the retained application fingerprint; the processor enforces identical card parameters under the same provider key. Never change the card under an existing key or store card data in a retry queue. Switching between hosted and direct collection under the same creation key returns a conflict.
Sandbox traffic limits
API keys for the same business share a request budget: reads allow a burst of 120 requests and refill at 10 requests per second; writes allow a burst of 20 and refill at 2 requests per second. Dashboard actions share these budgets. Rotating a key does not reset them. Checkout refreshes also have a separate per-link and per-business limit.
These are request limits, not a guaranteed payment throughput. Payment confirmation can involve several processing steps and customer authentication. Agree expected peak requests and transactions per second with Aim Atlantic before load testing or requesting higher limits.
For retries, wait at least Retry-After when supplied; otherwise use exponential backoff with random jitter and a bounded attempt count. Poll an existing payment or consult its event history after an uncertain result. Do not change the amount, create a new payment, switch idempotency keys, or treat a busy response as a confirmed decline.