Idempotency
The HwebPay API supports idempotency for safely retrying requests without accidentally performing the same operation twice. This is particularly important for Transfers and Payments.
The Concept
When an API request is interrupted (e.g., due to a network error), you may not know if the request was successful. By providing an X-Idempotency-Key, HwebPay will recognize the retry and return the original response instead of creating a duplicate record.
How to use
Include the key in your request headers. We recommend using a UUID v4.
-H "Authorization: Bearer sk_live_..." \
-H "X-Idempotency-Key: ad82-1234-5678-abcd" \
-d '{ "amount": 1000, "account_number": "0123456789", ... }'
Key Expiration
Idempotency keys are cached for 24 hours. If you make a request with the same key after 24 hours, it will be treated as a new request.
Important Note
The idempotency check is performed after authentication but before any business logic. If your request parameters change for the same key, the API will still return the cached response from the first successful attempt.
© 2026 HwebPay Docs Portal
Developer Community