Bunne

API Documentation

Idempotency

Retry write requests safely.

Send an Idempotency-Key on create and capture calls so network retries do not duplicate financial operations.

Use business-stable keys

Prefer keys derived from your order or operation id, such as order_123_create and order_123_capture.
Create charge with idempotency
curl -X POST https://bunne.com.br/api/v1/charges \  -H "Authorization: Bearer sk_test_xxx" \  -H "Idempotency-Key: order_123_attempt_1" \  -H "Content-Type: application/json" \  -d '{"amount":10990,"currency":"BRL","payment_method":"PIX"}'

Behavior

FieldTypeDescription
same key + same bodyreplayReturns the original successful response.
same key + different bodyerrorReturns idempotency_key_conflict.
missing keyallowedThe request still works, but retries may duplicate writes.
Conflict response
{  "error": {    "type": "idempotency_error",    "code": "idempotency_key_conflict",    "message": "Invalid idempotency key usage.",    "request_id": "req_xxx"  }}