Idempotent Requests

The Payssion API supports idempotency that allows the safe retry of the same requests, guaranteeing the operation is only performed once.

For example, if a Create Refund request fails with a network error, the request can be retried with the same idempotent request. This is especially important for partial refunds to ensure retry attempts are not processed as separate refunds, to avoid the loss of funds.

To perform an idempotent request, provide an additional Idempotency-Key: <v4UUID> header to the request. Use custom value as idempotent key is also allowed of your own choice.

Idempotency-Key ValueExampleRemark
Use v4 UUIDc5b1c7d8-8e6e-45cd-b31b-17d5fdfcbfd4Strongly recommend
Use Custom value24612b71dd66fbde278aad138Your own random string generator.
Less than 255 characters

The resources that include an idempotency key may send back the same response for requests made with the same idempotency key for up to 24 hours, regardless of whether the request succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors.

All POST and PUT requests accept idempotency keys. Sending idempotency keys in GET and DELETE requests has no effect and should be avoided, as these requests are idempotent by definition.