Idempotency

Every request that moves money needs an Idempotency-Key header: /v1/execute, /v1/pay and /v1/collect. The key makes retries safe. If your connection drops and you send the same request again, Borderli returns the first response instead of paying twice.

curl -X POST https://apidocs.borderli.io/v1/pay \
  -H "Content-Type: application/json" \
  -H "x-api-key: brly_test_key_001" \
  -H "Idempotency-Key: pay-order-12345" \
  -d '{ "qr_string": "...", "payer_name": "Maria Silva", "payer_account": "0001234567", "payer_tax_id": "12345678909" }'

What happens

You sendYou get
A new keyThe request runs.
A key you used before, with the same bodyThe first response, replayed. Nothing runs again.
A key whose first request is still running409 IdempotencyInProgress. Wait a moment and send the same request again.
A key you used before, with a different body400 IdempotencyConflict. Use a new key.

A key is only kept when the request succeeds. If the request fails with an error, the key is free again and you can retry with it. Keys expire after 24 hours. After that the same key can be used again with any body.

How to pick a key