Authorization
header. Additionally, for all state-changing operations, Gale supports idempotency to ensure that retrying a request does not result in duplicate processing.
Base URLs
Authorization
Every request needs an Authorization header:- In the Gale Dashboard open Settings → API Keys.
- Copy your
merchant_api_token
. - Send it on every call, for example:
Idempotency
Gale supports idempotent requests for all state-changing operations such as creating checkouts, issuing refunds, or cancelling sessions. This prevents duplicate processing when a request is retried due to a timeout or network error.Header Format
- This key should be a unique UUID generated per request.
- If the same key is sent again within a 24-hour period, Gale will return the original response without reprocessing the request.
When to Use
UseIdempotency-Key
with:
POST /v1/checkout
POST /v1/checkout/{checkout_id}/refund
POST /v1/checkout/{checkout_id}/cancel
- Any future endpoint that changes system state
Example Request
Best Practices
- Always generate a new key for each client-initiated request.
- If a response times out or fails with a network error, retry the same request with the same key.
- Do not reuse idempotency keys across unrelated operations.