The API supports idempotency for safely retrying requests without accidentally performing the same operation twice.

For example, if a request to create a Payment fails due to a network connection error, you can retry the request with the same idempotency key to guarantee that only a single Charge is created.

To perform an idempotent request, attach a unique key to any POST request made to the API via the Idempotency-Key header.

How you create unique keys is completely up to you. We suggest using random strings or UUIDs. We’ll always send back the same response for requests made with the same key.