Idempotence Request
Idempotency allows you to retry a request multiple times while only performing the action once. This helps avoid unwanted duplication in case of failures and retries. For example, in the case of a timeout error, it is possible to safely retry sending the same API payment call multiple times with the guarantee that the payment detail will only be charged once.
The accounting rules in the PG take care of most potential double-processing issues that can impact payment modifications. To minimize unwanted side effects when requests are duplicated.
Implement Idempotency
To submit a request for idempotent processing, include an idempotency-key:<key> in the request header.
The <key> should be a unique identifier for the message, with a maximum length of 64 characters (including symbols). We recommend using a version 4 (random) UUID. If you do not receive a response (e.g., due to a timeout), you can safely retry the request with the same HTTP header. If the PG has already processed the request, the response from the first attempt will be returned without duplication.
To verify that a request was processed idempotently, check the idempotency-key HTTP header in the response.
Sample Request Header

Updated 4 days ago