Current V1 backend support for
Idempotency-Key applies to bank transfer creation only.How idempotency works
When creating a bank transfer, include anIdempotency-Key header in your request.
Recommended key format
Use a unique UUID for every new transaction request.Example request
When to use idempotency
Create transfer
Supported when you create a bank transfer that may be retried.
Verify transfer status
Check the final state of a transfer after creating it.
Important rules
- Generate a new idempotency key for every new transaction.
- Reuse the same idempotency key only when retrying the same request.
- Do not reuse one idempotency key across different customers, payments, or payouts.
- Store the idempotency key with your internal transaction record.
- Use UUIDs or another high-entropy unique value.
Duplicate prevention
If Pasteaza detects a duplicate request, it returns the original transaction response. This helps prevent issues such as:- Sending the same bank transfer twice
- Debiting a balance more than once
- Creating confusing webhook events
Retry flow
1
Create a unique key
Generate a new UUID before sending a create request.
2
Send the request
Include the UUID in the
Idempotency-Key header.3
Retry with the same key
If the first request times out, retry the same request with the same idempotency key.
4
Use the original response
Pasteaza returns the original response when the duplicate request is detected.