Idempotent requests
Token Charge supports idempotency so you can retry a charge after a timeout or connection error without charging the card twice.
Send a unique Idempotency-Key on every logical charge attempt (one key per intended bill, not one key per HTTP try). If the first HTTP call times out, repeat the same JSON body with the same key. Coda returns the original outcome instead of creating a second charge.
Init, Inquiry, and webhooks are not covered by this header.
How a safe retry works
Generate the key
You generate the key. Coda uses it only to recognise retries of that attempt.
Use a UUID v4 (or another high-entropy random string)
Reuse a key across billing cycles, users, or amounts
Create a new key for every new logical charge
Use email, shopper id, PAN, or other personal data as the key
Persist the key with the attempt until you have a durable result (HTTP response, complete notification, or Inquiry)
Derive the key only from orderId if you might reuse that orderId after 24 hours
Scope: one Idempotency-Key maps to one Token Charge attempt for your account. Treat collisions as a bug in key generation.
Last updated
Was this helpful?