Refund a transaction
Requires the transaction.refund permission.
Refunds a transaction by calling the provider’s refund method.
Important Notes:
- Only APPROVED or PARTIALLY_REFUNDED transactions can be refunded
- BOLEPIX transactions do not support refunds
- Refund amount cannot exceed the approved amount minus already refunded amount
refund_amountis optional. When omitted, it resolves to the transaction’s original approved amount. Because the resolved amount must still satisfy the exceeds-approved guard, omission only succeeds on a transaction with no priorCOMPLETED,PENDING,PROCESSING, orTIMEOUTrefunds;FAILEDandCANCELLEDpriors are ignored. To refund only the remainder of a partially refunded transaction, sendrefund_amountexplicitly.- Partial refunds are supported for providers that allow them (transaction status becomes PARTIALLY_REFUNDED); providers that only accept full cancellations (e.g. Cappta) reject partial refund requests with a 400 — omit
refund_amountor submit the full approved amount instead. - Full refunds change status to REFUNDED
- Transaction may return with PENDING_REFUND status if the provider call fails for a transient reason (e.g., timeout, insufficient balance). The refund will be retried indefinitely by background jobs until manually cancelled.
Documentation Index
Fetch the complete documentation index at: https://docs.rinne.com.br/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Company API key for authentication
Path Parameters
Transaction ID to refund
Body
Reason for the refund.
- BANKING_ERROR: Banking system error
- FRAUD: Fraudulent transaction
- CUSTOMER_REQUEST: Customer requested refund
- PIX_WITHDRAWAL_OR_CHANGE_ERROR: PIX withdrawal or change error
BANKING_ERROR, FRAUD, CUSTOMER_REQUEST, PIX_WITHDRAWAL_OR_CHANGE_ERROR "CUSTOMER_REQUEST"
Refund amount in cents. Optional — when omitted, the API treats the request as a refund of the transaction's original approved amount.
x >= 11000
Additional description for the refund
"Refund due to customer dissatisfaction"
Optional metadata object for storing custom key-value pairs
{
"custom_field": "value",
"refund_source": "customer_request"
}Response
Transaction refunded successfully
Transaction data returned by the API
Transaction unique identifier
"tx_123456789"
Payment provider
CELCOIN, RINNE, CAPPTA "CELCOIN"
Affiliation ID for this transaction
"a3dbd0c2-9f79-4f86-8caa-47779b3f2793"
Unique request ID for this transaction used for idempotency
"request-123"
Merchant Category Code
"5411"
Transaction amount in cents
10050
Transaction currency
BRL "BRL"
Transaction pricing information
Transaction status
PROCESSING, AUTHORIZED, APPROVED, REFUNDED, PARTIALLY_REFUNDED, PENDING_REFUND, CHARGEDBACK, WAITING_PAYMENT, AWAITING_3DS, REFUSED, FAILED, EXPIRED, PENDING_CANCELLATION, CANCELLED "APPROVED"
Transaction capture method
EMV, MAGSTRIPE, ECOMMERCE, CONTACTLESS_ICC "EMV"
Number of installments
1
Payment method
CREDIT_CARD, DEBIT_CARD, PIX, BOLEPIX "PIX"
Whether this transaction was automatically anticipated at creation time. Set to true when the affiliation's anticipation_type is AUTOMATIC; false otherwise.
false
Company ID that owns this transaction
"a3dbd0c2-9f79-4f86-8caa-47779b3f2793"
Transaction creation timestamp
"2023-12-01T10:00:00.000Z"
Fee policy ID applied to this transaction
"fee_policy_123"
Cost policy ID applied to this transaction
"cost_policy_123"
Approved amount in cents
10050
Total amount refunded in cents (sum of completed refunds)
0
Acquirer response code
"00"
PIX-specific data (present if payment_method is PIX)
Bolepix-specific data (present if payment_method is BOLEPIX)
Card-specific data (present if payment_method is CREDIT_CARD or DEBIT_CARD)
Soft descriptor shown on cardholder statement
"MYSTORE"
Terminal serial number
"12345678"
Network Sequential Number
"000123"
Additional metadata
Latest refund timestamp (for the most recent completed refund)
"2023-12-01T10:00:00.000Z"
Status reason details
PROVIDER, ACQUIRER, ANTIFRAUD, INTERNAL_ERROR, NO_ACQUIRER, ACQUIRER_TIMEOUT, CHALLENGE_NOT_ALLOWED "PROVIDER"
Transaction approval timestamp
"2023-12-01T10:00:00.000Z"
Company full name
"Test Company"
Company name
"Test Company"
Organization transaction ID (for refunds/chargebacks)
"tx_organization_123456"
Consumer information
Transaction last update timestamp
"2023-12-01T10:00:00.000Z"

