Idempotency ensures that repeating a request always produces the intended outcome, no matter how many times it’s sent. This is especially important when network errors or interruptions make it unclear whether an operation has already completed. For operations where duplicates could cause unintended effects, PaySway requires an idempotency key. Including the same key in a retried request lets PaySway recognize it as a duplicate and return the existing result instead of performing the operation again. This ensures you can safely retry requests without the risk of creating duplicates or executing the same action twice.Documentation Index
Fetch the complete documentation index at: https://docs.paysway.io/llms.txt
Use this file to discover all available pages before exploring further.
Implementation
Generate an idempotency key
The idempotency key must be a valid UUID. Generate a unique UUID for each distinct request you intend to make.
Include the header in your request
Add the
Idempotency-Key header to your HTTP request with the generated UUID.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.