Implementation
1
Generate an idempotency key
The idempotency key must be a valid UUID. Generate a unique UUID for each distinct request you intend to make.
2
Include the header in your request
Add the
Idempotency-Key header to your HTTP request with the generated UUID.3
Handle retries
When you need to retry a previous request due to network issues or timeouts, always use the same idempotency key as the original request.
If a retried request uses the same idempotency key but different parameters, PaySway will reject it. This prevents accidental misuse and ensures the idempotency key always refers to the same request.