Idempotency lets you safely retry a request without performing the operation twice. If a request is interrupted — a network timeout, a dropped connection — you often can't tell whether the server processed it before the failure. Retrying with an idempotency key lets the server recognise the repeat and return the original result instead of creating a duplicate.
How to use it
Send an Idempotency-Key header with your request:
curl -X POST https://business.mamopay.com/manage_api/v1/international_payouts \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: payout-INV-9876-attempt-1" \
-d '{ ... }'If you retry with the same key, the server returns the original response and does not create a new operation. Keys are scoped to your account.
Which endpoints support it
| Endpoint | Notes |
|---|---|
POST /international_payouts | Required. A payout moves real money, so the key guards against duplicates on retry. Use the payout's external reference (for example an invoice number) as the key. |
Support for additional endpoints may be added over time.
Choosing a good key
- Derive it from something you already hold — an order ID, invoice number, or a UUID from your own system — so the same logical operation always maps to the same key.
- Reuse the same key when retrying the same operation. Use a new key for a genuinely new payout.
- If you deliberately want a retry to count as a new operation, change the key — for example by appending an attempt counter:
payout-INV-9876-attempt-2.