Core

Idempotency

Safely retry POSTs with an Idempotency-Key header.

POST endpoints accept an optional Idempotency-Key header. Reusing the same key replays the original response without duplicating work — safe to retry network failures.

bash
curl https://sandbox-api.key2pays.com/v1/payments \
  -H "Authorization: Bearer sk_test_51N8mP...exampleK3Y" \
  -H "Idempotency-Key: 7c1fd0d4-5e94-4b3e-a8b6-8c4f2a9e1c2d" \
  -H "Content-Type: application/json" \
  -d '{ "amount": 4500, "currency": "USD", "method": "card" }'
Keys are scoped per merchant + endpoint and stored for 24 hours. Reusing the key with a different body returns 409 Conflict.