Idempotent requests are only available for use on the Create Payment endpoint. This functionality is meant to help prevent Payers from being charged more than once when submitting a Payment (due to retry strategies, sending multiple requests, etc).
To submit an idempotent request, you will need to generate a unique ID (UUID v4) and set that as the value in the
Idempotency-Key header. Adding the header will cache any Payment responses for that request and return the cached response for the initial request made with that specific key in the case of resubmission. If a cached response is returned, it will contain an
Idempotency-Replay header with value set to
By default, idempotency will be enforced for 24 hours after which the
Idempotency-Key and related response will no longer be cached.
Only POST /Payments Supports Idempotent Requests
Idempotency-Keyheader is passed in for any other endpoint, it will be ignored and no idempotency function will occur.
Updated about 2 years ago