Momen Payment API

Idempotency

Safe retries with Idempotency-Key on create and cancel.

Idempotency

Every request that creates or moves money accepts an Idempotency-Key header. Send a unique value (a UUID is fine) per logical operation. If a request is retried with the same key, the original response is replayed instead of the operation running twice.

Use this on every create call. Network timeouts do not tell you whether the request succeeded, and retrying without a key can create duplicate payment links.

Rules

RuleDetail
ScopePer API key
Retention24 hours
Replay headerIdempotent-Replayed: true on replayed responses
Same key, different body422 (idempotency_key_reused)
Original still running409 (idempotency_request_in_progress) — retry after a short delay
5xx responsesNot stored — retrying runs the request again

Example

curl -X POST https://stggateway-sandbox.momen.co/v1/payment-links \-H "Authorization: Bearer sk_test_YOUR_KEY" \-H "Content-Type: application/json" \-H "Idempotency-Key: 8f14e45f-ceea-467a-9575-8f14e45fceea" \-d '{  "amount": 150000,  "title": "Invoice #1042"}'

reference_id is not used for idempotency. Use Idempotency-Key for that.

On this page