Regoria API docs

Idempotency

A network failure can leave you unsure whether a request landed. The operations that create money state take an Idempotency-Key header so you can retry safely: the first request runs; a retry with the same key gets the first answer back, nothing runs twice.

Which operations

The reference marks them x-kit-idempotent: true; each says "Requires Idempotency-Key" in its description:

Operation Creates
POST /v1/checkout-sessions a hosted checkout session
POST /v1/orders a payment on a saved card and its order
POST /v1/refunds a refund
POST /v1/subscriptions/{subscription}/charge a payment for the next period of a merchant-managed subscription
POST /v1/subscriptions/{subscription}/resume a payment when resuming a paused subscription
POST /v1/api-keys an API key

Other writes (fulfil, cancel, pause, archive, endpoint changes) are idempotent by nature or carry a row version, and take no key.

The rules

Example

curl -X POST https://api.sandbox.staging.regoria.com/v1/refunds \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: refund-INV-1001-2026-10-21" \
  -d '{"charge_id": "chg_01HZX5Y3V8N2K7QJ4R9T6B3M1C", "amount_cents": 1000, "reason": "requested_by_customer"}'

Run it twice: the second answer is byte for byte the first, and only one refund exists.

In the SDKs

The TypeScript and PHP SDKs add a UUID v7 Idempotency-Key on these operations when you pass none, and accept yours as an option. Pass your own when a retry may come from another process.