Skip to main content
Transactions represent payment operations processed through the Rinne platform. Each transaction is linked to a merchant, processed through a provider affiliation, and can support various payment methods.

Transaction basics

A transaction requires:
  • An active provider affiliation. Sending provider is optional. See Provider selection.
  • Transaction amount (in cents)
  • Payment method (PIX, credit card, etc.)
  • Capture method (e-commerce, POS, etc.)
  • Unique request ID for idempotency

Entity relationships

Provider selection

provider is optional when you create a transaction. If you omit it, Rinne picks the provider from the merchant’s affiliations. You can then move traffic between providers, or add a new one, without changing or redeploying your integration.

Omit provider

Rinne picks a provider the merchant can use for this payment_method and capture_method. Use this by default.

Send provider

Rinne uses that provider’s affiliation and ignores routing defaults. Use this to pin a transaction to a specific provider.
This applies to both creation endpoints: POST /v1/transactions and POST /v1/merchants/{merchantId}/transactions. The transaction response always includes the provider that processed it.

How Rinne picks the provider

When a request omits provider, Rinne resolves it as follows:
1

Find eligible affiliations

Rinne considers the merchant’s ACTIVE affiliations that allow the requested payment_method and capture_method. For PIX and BOLEPIX, the affiliation also needs a bank account.
2

Use the only match

If exactly one affiliation is eligible, Rinne uses it. Most merchants have one affiliation per payment method and need no configuration.
3

Apply routing defaults

If several affiliations are eligible, Rinne applies the routing defaults configured for the merchant, then its organization, then Rinne-wide. A default for the exact capture method comes before one that covers any capture method.
4

Take the first eligible provider

Each default lists providers in order of preference, most preferred first. Rinne selects the first listed provider the merchant has an eligible affiliation with. It skips providers the merchant can’t use.
Rinne configures routing defaults for you. Contact Rinne to set or change the default provider for your organization or a merchant.
Routing defaults are not failover. If the selected provider refuses the transaction or fails, Rinne doesn’t retry it on the next provider in the list.

Errors when provider is omitted

The merchant can process this payment and capture method on more than one provider, and no routing default selects one. Rinne never guesses. Send provider explicitly, or ask Rinne to configure a default.
The merchant has active affiliations, but none of them allows the requested payment_method and capture_method. The issue is reported on payment_method.
The merchant has no active affiliation. Create one and wait for it to become ACTIVE. See Affiliations.
Rinne resolves the affiliation before it reads a stored card. A request whose provider has no active affiliation and whose card_data.card_id is invalid returns the affiliation 404, not the card 400.

Creating transactions

PIX transaction

PIX guidelines

  • Installments: Must be 1 for PIX (defaults to 1 if not sent).
  • When pix_data.due_date is provided: consumer is required with full_name, document_number, and document_type. Use expiration_in_days_after_due_date; do not send expiration_in_seconds.
  • When pix_data.due_date is not provided: Use expiration_in_seconds; do not send expiration_in_days_after_due_date.

Immediate PIX payment

The response includes a QR code for the customer to scan:

PIX with due date

For invoice payments, you can create PIX transactions with a due date and pricing modifiers:
Due date features:
  • 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 date
  • fine: One-time charge when paid after due date
  • discount: Reduces amount when paid early
  • abatement: 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.
The response includes both boleto and PIX payment data:

BolePix requirements

  • Minimum amount: 500 cents (R$ 5.00)
  • Maximum amount: 1,500,000,000 cents (R$ 15,000,000.00)
  • Installments: Must be 1 (no installment support)
  • Consumer: Required with full_name, document_type, document_number, and full address including street_number

BolePix-specific fields

  • due_date: Payment due date in YYYY-MM-DD format (required, must be today or later)
  • expiration_in_days_after_due_date: Days after due date before expiration (0-59, default: 0)
  • discount: Optional discount configuration
    • amount: Fixed discount amount in cents (for FIXED modality)
    • percentage: Discount percentage (for PERCENTAGE modality)
    • modality: FIXED or PERCENTAGE
    • until_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

Use Card transactions, Wallet transactions, and 3D Secure authentication for production-ready implementation details.
For credit and debit card transactions, you’ll need to provide card data with one of three credentials: the card number, a network token (for tokenized payments like Apple Pay or Google Pay), or a card_id that references a card stored on file. The card number and network token are accepted only in encrypted form — these values must come from the rinne-js secure components, which encrypt them so raw card data never touches your systems and you avoid PCI scope issues. For example, a tokenized wallet transaction:

Card data requirements

The card_data field is required for CREDIT_CARD and DEBIT_CARD payment methods and has the following validation rules:
  • Exactly one of number (card PAN), network_token, or card_id (a card stored on file) must be provided — they are mutually exclusive
  • number, cvv, network_token, and cryptogram must arrive encrypted from rinne-js; plaintext values are rejected with 400 VALIDATION_ERROR
  • With card_id, the stored card supplies the number, expiry, last_digits, brand, and cardholder_name; sending any of those alongside card_id is rejected with 400 VALIDATION_ERROR
  • With number or network_token, send these fields inline:
    • expiry_month: Two-digit month (01-12)
    • expiry_year: Four-digit year (YYYY)
    • cardholder_name: Name of the cardholder as it appears on the card
    • last_digits: Last 4 digits of the card number (exactly 4 digits)
  • cryptogram: Required for authenticated/tokenized 3DS flows (directly or injected from three_d_secure_session_id)
  • authentication_type: Currently only 3DS is supported

Card statement descriptor

Card transactions accept an optional soft_descriptor at the top level of the request, next to amount rather than inside card_data, as in the example above. It carries your text, such as an order number, which Rinne prints on the cardholder’s statement after the merchant’s name. Rinne folds accented letters to their base letter, uppercases the text, removes spaces and unsupported characters, and keeps the first 9 characters. When you omit the field, or the kept characters hold no letter or digit, the line ends at the merchant’s name. See Card statement descriptor for how Rinne composes the full line.

3DS challenge strategy flags

Card transaction creation supports two optional flags:
  • require_3ds: Forces immediate AWAITING_3DS status and defers provider authorization until /authenticate is called with an authenticated 3DS session.
  • refuse_on_challenge: Refuses challenge-triggered paths immediately (REFUSED) instead of moving to AWAITING_3DS.
These flags let you tune 3DS policy without changing your entire checkout architecture:
  • Use require_3ds to enforce 3DS while staying in a pure transaction-first flow (no separate session-first policy path required).
  • Use refuse_on_challenge to fail fast when you intentionally do not support challenge handling for a merchant or transaction segment.
When refuse_on_challenge blocks a challenge-triggered path, the transaction uses:
  • status: REFUSED
  • status_reason: CHALLENGE_NOT_ALLOWED
When refuse_on_challenge is enabled, non-challenge transactions still follow normal provider processing.
require_3ds and refuse_on_challenge cannot both be true in the same transaction request.

Tokenized payments

For digital wallet payments (Apple Pay, Google Pay), use the network_token field instead of the card number:
  • Set wallet_type to APPLE_PAY or GOOGLE_PAY
  • Provide the network_token from the wallet provider
  • Include the cryptogram for secure authentication
  • Optionally include display_name for user-friendly card identification
Use rinne-js to easily integrate Apple Pay and Google Pay buttons in your web application. The SDK handles wallet authentication and provides encrypted card data ready for transaction processing.

Transaction status

Transactions move through different statuses during their lifecycle:
REFUSED vs FAILED: REFUSED means the provider explicitly declined the transaction for a business reason (e.g., insufficient funds, invalid card). FAILED means the HTTP call to the provider errored (4xx/5xx, timeout, network failure). Both are terminal states.
For REFUSED outcomes, status_reason can include values such as PROVIDER, ACQUIRER, ANTIFRAUD, NO_ACQUIRER, ACQUIRER_TIMEOUT, and CHALLENGE_NOT_ALLOWED.

Cancelling BOLEPIX transactions

You can cancel BOLEPIX transactions that are in WAITING_PAYMENT status before the customer pays:
Or for a specific merchant’s transaction:

Cancellation behavior

When you cancel a BOLEPIX transaction:
  1. The transaction status changes to PENDING_CANCELLATION
  2. A cancellation request is sent to the provider
  3. If successful, the status changes to CANCELLED
  4. If the provider times out, the status remains PENDING_CANCELLATION
Non-terminal cancellation: The cancellation may be non-terminal. If the provider times out, the transaction remains in PENDING_CANCELLATION. Final reconciliation to CANCELLED is performed asynchronously when the provider sends the bolepix.cancelled webhook. Poll the transaction or subscribe to the transaction.status-changed webhook rather than assuming immediate finality.

Cancellation requirements

  • Payment method: Only BOLEPIX transactions can be cancelled
  • Status: Transaction must be in WAITING_PAYMENT status
  • Permissions: Requires transaction.cancel or merchant.transaction.cancel permission

Amounts in cents

All monetary values in the API are represented in cents (integer values):
  • 10000 = R$ 100.00
  • 1050 = R$ 10.50
  • 99 = R$ 0.99
Always use integers for amounts. Never use decimal values or floating-point numbers.

Minimum amount validation

Transaction amounts must be greater than the calculated fee. When creating a transaction, the system validates that the amount covers the fee based on the merchant’s fee policy. If the amount is insufficient, the API returns a validation error:
The constraints object provides:
  • minimumAmount: The minimum amount required for the transaction (calculated fee + 1 cent)
  • calculatedFee: The total fee that would be charged for this transaction
To avoid this error, ensure your transaction amount is strictly greater than the calculated fee. You can use the fee policy details to estimate fees before creating transactions.

Request ID for idempotency

The request_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.

Automatic anticipation

Each transaction includes an automatic_anticipation boolean field, set at creation time based on the affiliation’s anticipation_type. When the affiliation uses AUTOMATIC anticipation, this field is true; otherwise it is false. The value is immutable after creation. This field can be used as a condition in pricing rules to apply different fee rates depending on whether a transaction is automatically anticipated.

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)
Pricing is calculated using fee and cost policies configured for the merchant.

Refunds

You can refund approved PIX, credit card, and debit card transactions partially or fully through the same endpoint. The request body is identical regardless of payment method:

Supported payment methods

Refund rules

  • BOLEPIX transactions do not support refunds.
  • Only APPROVED or PARTIALLY_REFUNDED transactions 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 the transaction status to PARTIALLY_REFUNDED; full refunds change it to REFUNDED.
  • Only one refund can be in progress at a time per transaction (PENDING, PROCESSING, or TIMEOUT status).
  • Card transactions accept only one successful refund. Once a CREDIT_CARD or DEBIT_CARD transaction has any COMPLETED refund, it is treated as terminally refunded and any further refund request is rejected synchronously with HTTP 400. PIX transactions are not subject to this rule.
  • Balance is checked before processing refunds to ensure sufficient funds.
Card transactions accept only one successful refund. Once a CREDIT_CARD or DEBIT_CARD transaction has a refund in COMPLETED status, any additional refund request — partial or full — is rejected synchronously with HTTP 400. Plan the refund amount up front: if you need to refund a card transaction in pieces, the first successful refund must cover the full remaining amount you intend to return.Prior refunds in FAILED or CANCELLED status do not count toward this rule, so you can submit a new refund after a failed attempt.
Same-day partial refunds are not allowed for card transactions. When the refund request lands on the same calendar day as the transaction’s approved_at (D0), only a refund for the full remaining refundable amount is accepted. Partial refunds are allowed only from the next calendar day (D+1) onward.Same-day partial requests fail synchronously with HTTP 400. On D0 you can still issue a full refund, and on D+1 (or later) any partial amount up to the remaining refundable balance is accepted. See Refunding card transactions for an example.

Refund reasons

Refund processing semantics

The refund response always includes the current refund status. How that status is determined depends on the payment method.

PIX refunds

PIX refunds are processed asynchronously to improve reliability:
  1. A refund record is created with PENDING status.
  2. The transaction status changes to PENDING_REFUND.
  3. The system attempts to process the refund with the provider.
  4. On success, the refund status updates to COMPLETED.
  5. On timeout, the refund status updates to TIMEOUT and is queried again later.
  6. On other transient errors, the refund stays PENDING for automatic retry.
For PIX, transient provider errors (timeout, insufficient balance, etc.) cause the refund to be automatically retried until it succeeds or is manually cancelled.

Card refunds

Card refunds resolve as far as possible on the same API call:
  • A definitive provider response (success or rejection) returns synchronously with the refund already in its terminal state — COMPLETED for a successful cancel, FAILED for a definitive rejection (for example, an acquirer business decline). FAILED card refunds are terminal and not retried; submit a new refund request to try again.
  • An uncertain outcome (acquirer 5xx or network timeout) triggers an inline status query against the acquirer. If that query resolves the outcome, you still get COMPLETED or FAILED on the same call. Otherwise the refund moves to TIMEOUT and is reconciled asynchronously.
  • A PENDING_REFUND response on a card transaction means the request reached us but did not produce a definitive answer; we will retry the (idempotent) cancel.

Cancelling a pending refund

You can cancel a refund that is in PENDING status:
When a refund is cancelled:
  • The refund status changes to CANCELLED
  • The transaction status reverts based on remaining refunds:
    • APPROVED if no other completed refunds exist
    • PARTIALLY_REFUNDED if other completed refunds exist
Only refunds with PENDING status can be cancelled. Refunds that are PROCESSING, COMPLETED, FAILED, or TIMEOUT cannot be cancelled.

Refund information in transaction response

When you retrieve a transaction with full details, the response includes a refunds array with complete refund information:
Each refund includes:
  • 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

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.
This ensures refund statuses stay synchronized with payment providers without manual intervention.

Retrieving transactions

Get a specific transaction

You can retrieve a transaction by ID without specifying the merchant ID:
This endpoint returns full transaction details including ledger entries, refunds, and settlement information. The transaction must belong to a merchant within your authenticated organization.

List transactions for all merchants (organization)

This list covers your merchants’ transactions. Transactions your organization creates for itself are listed by GET /v1/transactions.

List transactions for a specific merchant

To list one merchant’s transactions, pass the merchant’s ID as company_id on the organization-wide list:
Every transaction in data has company_id set to the merchant you asked for. company_id only matches merchants in your organization. If it holds any other ID, such as a merchant in another organization or your organization’s own ID, the request returns 200 with an empty page:

Filtering and sorting

Transactions support extensive filtering:
  • status: Filter by transaction status (array)
  • payment_method: Filter by payment method
  • amount_from / amount_to: Filter by amount range
  • created_at_from / created_at_to: Filter by date range
  • provider: Filter by provider
  • company_id: Filter by merchant ID (organization-wide list only)
  • sort: Sort by fields (e.g., -created_at,amount)
For every filter each list accepts, see Get transactions for all merchants and Get transactions.

Transaction metadata

Store custom data with transactions using the metadata field:
Metadata is returned with the transaction and can be used for reconciliation and reporting.

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, or PARTIALLY_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

Or for a specific merchant’s transaction:

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.

Next steps

rinne-js SDK

Accept Apple Pay & Google Pay on the web

PIX Payments

Learn how to process PIX transactions

Webhooks

Receive transaction status updates

API Reference

Explore transaction endpoints