Refunds

Return all or part of a pay-in to the payer, from your balance.

POST/v1/refunds

Availability

A pay-in can be refunded when its method allows it: capabilities indicates this in features (refund, partial_refund). If it doesn't, POST /v1/refunds responds 422 refund_not_supported.

curl "$CAIBO_API/v1/refunds" \
  -H "Authorization: Bearer $CAIBO_API_KEY" \
  -H "Idempotency-Key: refund-order-8812" \
  -H "Content-Type: application/json" \
  -d '{ "payin_id": "pin_01m3sg9x...", "reason_code": "requested_by_customer", "amount": "10.000000" }'
FieldRequiredWhat it is
payin_idYesThe pay-in to refund.
reason_codeYesrequested_by_customer, duplicate, fraud, or other.
amountNoIn the pay-in's currency (the one that was credited). If you omit it, everything remaining is refunded.
noteNoUp to 500 characters, with no personal data.

The refund comes out of your available balance and is sent asynchronously.

statusWhat it means
pending_reviewUnder risk review.
processingSent.
completedReturned to the payer.
failedIt couldn't be returned; failure_code tells you why.

Events: refund.created, refund.approved, refund.processing, refund.completed, refund.failed.

Errors: refund_not_supported, refund_exceeds_refundable (you're requesting more than what's left), payin_not_refundable, insufficient_funds, risk_blocked. GET /v1/payins/{id} tells you how much is left in refundable.