The Gigapay API supports idempotency to safely retry requests without accidentally performing the same operation twice. Gigapay's idempotency works by storing the responses of previous requests. Subsequent requests with the same key return the same result, including errors.
To perform an idempotent request, provide an additional
Idempotency-Key: <key> header to the request. We recommend using uuid4() for the key, but any string with sufficient entropy will work. For example:
curl https://api.gigapay.se/v1/payouts \-H "Authorization: Token 1vjv20ksxwvlpp3peize74ievjmx3e" \-H "Integration-ID: 650fd73ff5"-H "Idempotency-Key: d03de720-5768-424d-ae93-17406e1be9b7"
Idempotency is available on all endpoints accepting
POST requests, all other HTTP request methods are idempotent by design in the Gigapay API, and any idempotency keys will be ignored. The response to a
POSTrequest without an idempotency key will include one generated in the
Keys expire after 24 hours, so a new response is generated if a key is reused outside of that time frame.