Idempotency

Some of our API endpoints support idempotency, which means you can safely retry a request without worrying about performing the same action more than once.

To make use of this feature, include an X-Idempotency-Key header in your call. This key should be a unique value in the UUID format: a 36-character alphanumeric label.

When you send a request with a new idempotency key and it succeeds, BVNK stores the entire response (both status code and body). If you then resend the same request with a short period of time using the same credentials and idempotency key, we return the original response instead of running the operation again. This is particularly useful for critical operations such as moving money, creating payment orders, or modifying existing resources.

For example, if your attempt to create a payment order times out due to a network glitch, you can repeat the call with the identical idempotency key to guarantee that exactly one payment order is created. Remember that only successful requests are cached—failed calls generate no stored result, so you can retry them freely without worrying about collision with a previous failure.

curl --request POST \
     --url https://api.sandbox.bvnk.com/ledger/v1/wallets \
     --header 'X-Idempotency-Key: 1e74002e-74a1-48fd-b707-147c3187a3e1' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '