Transaction basics
A transaction requires:- An active provider affiliation
- Transaction amount (in cents)
- Payment method (PIX, credit card, etc.)
- Capture method (e-commerce, POS, etc.)
- Unique request ID for idempotency
Entity relationships
Creating transactions
PIX transaction
Immediate PIX payment
PIX with due date
For invoice payments, you can create PIX transactions with a due date and pricing modifiers:due_date: Expected payment date (YYYY-MM-DD format)expiration_in_days_after_due_date: Days after due date before expiration (1-365, default: 30)interest: Applied when paid after due datefine: One-time charge when paid after due datediscount: Reduces amount when paid earlyabatement: Permanent amount reduction
When using
due_date, consumer information (full_name, document_number, document_type) is
required.BolePix transaction
BolePix is a hybrid payment method that generates both a boleto (bank slip) and a PIX QR code. Customers can pay using either method.BolePix requirements
- Minimum amount: 500 cents (R$ 5.00)
- Maximum amount: 25,000,000 cents (R$ 250,000.00)
- Installments: Must be 1 (no installment support)
- Consumer: Required with
full_name,document_type,document_number, and full address includingstreet_number
BolePix-specific fields
due_date: Payment due date in YYYY-MM-DD format (required, must be after today)expiration_in_days_after_due_date: Days after due date before expiration (0-59, default: 0)discount: Optional discount configurationamount: Fixed discount amount in cents (for FIXED modality)percentage: Discount percentage (for PERCENTAGE modality)modality:FIXEDorPERCENTAGEuntil_date: Date until which discount applies (must be before or equal to due_date)
fine_percentage: Fine percentage applied after due date (0.01-100%)monthly_interest_percentage: Monthly interest divided by 30 and applied per day after due date (0.01-100%)
The minimum amount after discount is applied must be at least 500 cents (R$ 5.00).
Card transaction
Card payment functionality is currently being implemented. The
card_data field will be
available once the full implementation is live.Card data requirements
Thecard_data field is required for CREDIT_CARD and DEBIT_CARD payment methods and has the following validation rules:
- Either
number(card PAN) ornetwork_tokenmust be provided (mutually exclusive) expiry_month: Two-digit month (01-12)expiry_year: Four-digit year (YYYY)cryptogram: Required for 3DS authenticationauthentication_type: Currently only3DSis supported (defaults to3DS)
Tokenized payments
For digital wallet payments (Apple Pay, Google Pay), use thenetwork_token field instead of the card number:
- Set
wallet_typetoAPPLE_PAYorGOOGLE_PAY - Provide the
network_tokenfrom the wallet provider - Include the
cryptogramfor secure authentication - Optionally include
display_namefor user-friendly card identification
Transaction status
Transactions move through different statuses during their lifecycle:| Status | Description |
|---|---|
PROCESSING | Transaction is being processed |
WAITING_PAYMENT | Awaiting customer payment (PIX) |
AUTHORIZED | Payment authorized but not captured |
APPROVED | Payment successfully processed |
REFUSED | Payment declined by provider/acquirer |
EXPIRED | Payment window expired |
PENDING_REFUND | Refund is being processed |
REFUNDED | Fully refunded |
PARTIALLY_REFUNDED | Partially refunded |
CHARGEDBACK | Disputed and reversed |
Amounts in cents
All monetary values in the API are represented in cents (integer values):10000= R$ 100.001050= R$ 10.5099= R$ 0.99
Request ID for idempotency
Therequest_id field ensures idempotent transaction creation. If you retry a request with the same request_id, you’ll receive the existing transaction instead of creating a duplicate.
Transaction pricing
Each transaction has associated fees and costs:- Fee: Amount charged to the merchant (your revenue)
- Cost: Amount paid to the provider (your cost)
Refunds
You can refund approved transactions partially or fully:Refund rules
- Only
APPROVEDorPARTIALLY_REFUNDEDtransactions can be refunded - Refund amount cannot exceed:
approved_amount - refunded_amount - When a refund is initiated, the transaction status changes to
PENDING_REFUND - Partial refunds change status to
PARTIALLY_REFUNDED - Full refunds change status to
REFUNDED - Balance is checked before processing refunds to ensure sufficient funds
- Only one refund can be in progress at a time per transaction (PENDING, PROCESSING, or TIMEOUT status)
Refund reasons
| Reason | Description |
|---|---|
CUSTOMER_REQUEST | Customer requested refund |
FRAUD | Fraudulent transaction |
BANKING_ERROR | Banking system error |
PIX_WITHDRAWAL_OR_CHANGE_ERROR | PIX withdrawal or change error |
Async refund processing
Refunds are processed asynchronously to improve reliability. When you initiate a refund:- A refund record is created with
PENDINGstatus - The transaction status changes to
PENDING_REFUND - The system attempts to process the refund with the provider
- On success, the refund status updates to
COMPLETED - On timeout, the refund status updates to
TIMEOUTfor automatic retry - On other errors, the refund remains
PENDINGfor automatic retry
If the provider call fails due to a transient error (timeout, insufficient balance, etc.), the
refund will be automatically retried by background jobs until it succeeds or is manually
cancelled.
Cancelling a pending refund
You can cancel a refund that is inPENDING status:
- The refund status changes to
CANCELLED - The transaction status reverts based on remaining refunds:
APPROVEDif no other completed refunds existPARTIALLY_REFUNDEDif other completed refunds exist
Refund information in transaction response
When you retrieve a transaction with full details, the response includes arefunds array with complete refund information:
- id: Unique refund identifier
- amount: Refund amount in cents
- status: Refund status (
PENDING,PROCESSING,COMPLETED,FAILED,TIMEOUT,CANCELLED) - reason: Reason for the refund
- description: Optional additional description (nullable)
- provider_refund_identification: Provider-specific identifier for the refund, such as E2E ID for PIX or ARN for cards (nullable)
- metadata: Optional custom key-value pairs for tracking and integration (nullable)
- created_at / updated_at: Timestamps
Refund status lifecycle
| Status | Description |
|---|---|
PENDING | Refund created, awaiting processing or retry |
PROCESSING | Refund is being processed by the provider |
COMPLETED | Refund successfully processed |
FAILED | Refund failed permanently |
TIMEOUT | Provider request timed out, will be retried |
CANCELLED | Refund was manually cancelled |
Automatic refund processing
Rinne automatically monitors and processes refunds through background jobs:- Pending refunds: Processed every 30 minutes. PENDING refunds older than 2 minutes are retried with the provider.
- Timeout refunds: Checked every 5 minutes. TIMEOUT refunds are queried at the provider to sync their status. If not found, they revert to PENDING for reprocessing.
Retrieving transactions
Get a specific transaction
You can retrieve a transaction by ID without specifying the merchant ID:List transactions for a specific merchant
List transactions for all merchants (organization)
Filtering and sorting
Transactions support extensive filtering:status: Filter by transaction status (array)payment_method: Filter by payment methodamount_from/amount_to: Filter by amount rangecreated_at_from/created_at_to: Filter by date rangeprovider: Filter by providersort: Sort by fields (e.g.,-created_at,amount)
Transaction metadata
Store custom data with transactions using themetadata field:
Transaction receipts
Generate PDF receipts for completed PIX transactions, including both original payments and refunds.Receipt eligibility
Receipts are available for transactions that meet these requirements:- Status:
APPROVED,REFUNDED, orPARTIALLY_REFUNDED - Payment method: PIX only (currently supported)
- Payer information: Transaction must have payer data
- End-to-end ID: Transaction must have a valid PIX end-to-end identifier
Receipt types
- PAYMENT: Receipt for the original transaction payment
- REFUND: Receipt for each completed refund with a provider identification
Generating receipts
Receipt response
The response includes a list of receipts (payment and any refunds):Payer/receiver direction
- Payment receipts: Payer is the customer, receiver is the merchant
- Refund receipts: Payer is the merchant, receiver is the customer (reversed)
CPF documents are masked for privacy (e.g.,
***.456.789-**), while CNPJ documents are shown in full.
