Skip to main content
POST
Refund a transaction

Authorizations

x-api-key
string
header
required

Company API key for authentication

Path Parameters

id
string
required

Transaction ID to refund

Body

application/json
refund_reason
enum<string>
required

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
Available options:
BANKING_ERROR,
FRAUD,
CUSTOMER_REQUEST,
PIX_WITHDRAWAL_OR_CHANGE_ERROR
Example:

"CUSTOMER_REQUEST"

refund_amount
integer

Refund amount in cents. Optional — when omitted, the API treats the request as a refund of the transaction's original approved amount.

Required range: x >= 1
Example:

1000

description
string

Additional description for the refund

Example:

"Refund due to customer dissatisfaction"

metadata
object

Optional metadata object for storing custom key-value pairs

Example:

Response

Transaction refunded successfully

Transaction data returned by the API

id
string
required

Transaction unique identifier

Example:

"tx_123456789"

provider
enum<string>
required

Payment provider

Available options:
CELCOIN,
RINNE,
CAPPTA
Example:

"CELCOIN"

affiliation_id
string
required

Affiliation ID for this transaction

Example:

"a3dbd0c2-9f79-4f86-8caa-47779b3f2793"

request_id
string
required

Unique request ID for this transaction used for idempotency

Example:

"request-123"

mcc
string
required

Merchant Category Code

Example:

"5411"

amount
integer
required

Transaction amount in cents

Example:

10050

currency
enum<string>
required

Transaction currency

Available options:
BRL
Example:

"BRL"

pricing
object
required

Transaction pricing information

status
enum<string>
required

Transaction status

Available options:
PROCESSING,
AUTHORIZED,
APPROVED,
REFUNDED,
PARTIALLY_REFUNDED,
PENDING_REFUND,
CHARGEDBACK,
WAITING_PAYMENT,
AWAITING_3DS,
RISK_ANALYSIS,
REFUSED,
FAILED,
EXPIRED,
PENDING_CANCELLATION,
CANCELLED
Example:

"APPROVED"

capture_method
enum<string>
required

Transaction capture method

Available options:
EMV,
MAGSTRIPE,
ECOMMERCE,
CONTACTLESS_ICC
Example:

"EMV"

installments
integer | null
required

Number of installments

Example:

1

payment_method
enum<string>
required

Payment method

Available options:
CREDIT_CARD,
DEBIT_CARD,
PIX,
BOLEPIX
Example:

"PIX"

automatic_anticipation
boolean
required

Whether this transaction was automatically anticipated at creation time. Set to true when the affiliation's anticipation_type is AUTOMATIC; false otherwise.

Example:

false

anticipation_days
integer
required

Automatic-anticipation horizon in days (D+N), copied from the affiliation at creation and immutable after. 0 when automatic_anticipation is false. Available to fee and cost policy rule conditions as transaction.anticipation_days. A transaction created before this field existed reports the affiliation's current horizon when automatic_anticipation is true and 0 otherwise, until a one-time backfill stores its value; its card refund window is the next-business-day one until then.

Required range: x >= 0
Example:

1

origin
enum<string>
required

Where the transaction originated. INTERNAL: created through the Rinne API. EXTERNAL: originated outside the platform and registered from a provider event, such as an inbound Pix sent directly to a Pix key or a POS (card machine) transaction.

Available options:
INTERNAL,
EXTERNAL
Example:

"INTERNAL"

company_id
string
required

Company ID that owns this transaction

Example:

"a3dbd0c2-9f79-4f86-8caa-47779b3f2793"

company_document_type
enum<string>
required

Document type of the company that owns this transaction (the receiver).

Available options:
CPF,
CNPJ
Example:

"CNPJ"

company_document_number
string
required

Document number of the company that owns this transaction (the receiver), without formatting: CPF (11 digits) or CNPJ (14 characters, alphanumeric CNPJ supported).

Example:

"12345678000195"

pix_payer
object | null
required

The account holder who actually paid a PIX transaction, as reported by the payment provider when the payment is received. May differ from consumer, which is what the integrator sent at creation. null until the payment is received, and for every other payment method. A PIX received on a Pix key without a charge carries it from creation.

created_at
string<date-time>
required

Transaction creation timestamp

Example:

"2023-12-01T10:00:00.000Z"

fee_policy_id
string | null

Fee policy ID applied to this transaction

Example:

"fee_policy_123"

cost_policy_id
string | null

Cost policy ID applied to this transaction

Example:

"cost_policy_123"

approved_amount
integer | null

Approved amount in cents

Example:

10050

refunded_amount
integer | null

Total amount refunded in cents (sum of completed refunds)

Example:

0

three_d_secure_session_id
string<uuid> | null

ID of the 3DS session linked to this transaction, if any. Set when the transaction was created with a 3DS session (session-first flow) or authenticated via the /authenticate endpoint (transaction-first flow).

Example:

"550e8400-e29b-41d4-a716-446655440000"

acquirer_response_code
string | null

Acquirer response code

Example:

"00"

pix_data
object | null

PIX-specific data (present if payment_method is PIX)

bolepix_data
object | null

Bolepix-specific data (present if payment_method is BOLEPIX)

card_data
object | null

Card-specific data (present if payment_method is CREDIT_CARD or DEBIT_CARD)

soft_descriptor
string | null

The soft_descriptor sent with the create request, as sent. Null when the request had none.

Example:

"MYSTORE"

serial_number
string | null

Terminal serial number

Example:

"12345678"

nsu
string | null

Network Sequential Number

Example:

"000123"

metadata
object | null

Additional metadata

latest_refund_at
string<date-time> | null

Latest refund timestamp (for the most recent completed refund)

Example:

"2023-12-01T10:00:00.000Z"

status_reason
enum<string> | null

Status reason details. REVERSED indicates a failed card transaction whose charge was later found at the acquirer and reversed by reconciliation.

Available options:
PROVIDER,
ACQUIRER,
ANTIFRAUD,
INTERNAL_ERROR,
NO_ACQUIRER,
ACQUIRER_TIMEOUT,
CHALLENGE_NOT_ALLOWED,
REVERSED
Example:

"PROVIDER"

approved_at
string | null

Transaction approval timestamp

Example:

"2023-12-01T10:00:00.000Z"

company_full_name
string

Company full name

Example:

"Test Company"

company_name
string | null

Company name

Example:

"Test Company"

organization_id
string | null

Organization transaction ID (for refunds/chargebacks)

Example:

"tx_organization_123456"

consumer
object | null

Consumer information

updated_at
string<date-time> | null

Transaction last update timestamp

Example:

"2023-12-01T10:00:00.000Z"