Skip to main content
Rinne uses a dynamic pricing system based on policies and rules. This allows you to configure different pricing for various transaction types, payment methods, and merchant categories.

Pricing components

Every transaction has two pricing components:

Entity relationships

Fee policies

Fees are what you charge to merchants for processing transactions. Fee policies are configured at the organization level and inherited by merchants.
{
  "fee": {
    "percentage": 3.5,
    "flat": 0,
    "minimum_price": 100
  }
}

Cost policies

Costs are what providers charge you for processing transactions. Cost policies are configured per provider and MCC (Merchant Category Code).
{
  "cost": {
    "percentage": 0.5,
    "flat": 0,
    "minimum_price": 50
  }
}

Pricing structure

Each pricing value can include:
  • percentage: Percentage of transaction amount (e.g., 3.5%)
  • flat: Fixed amount in cents (e.g., 50 cents)
  • minimum_price: Minimum fee/cost in cents
At least one component must be specified.

Rule-based pricing

Pricing policies use rules with conditions to apply different pricing based on transaction attributes.

Example fee policy

{
  "name": "standard-card-fees",
  "description": "Standard fee structure for card transactions",
  "is_active": true,
  "cashout_price": 350,
  "rules": [
    {
      "conditions": [
        {
          "field": "transaction.payment_method",
          "operator": "EQUALS",
          "value": "CREDIT_CARD"
        },
        {
          "field": "transaction.installments",
          "operator": "EQUALS",
          "value": 1
        }
      ],
      "price": {
        "percentage": 2.3
      },
      "priority": 1
    },
    {
      "conditions": [
        {
          "field": "transaction.payment_method",
          "operator": "EQUALS",
          "value": "PIX"
        }
      ],
      "price": {
        "percentage": 0.99
      },
      "priority": 2
    },
    {
      "conditions": [],
      "price": {
        "percentage": 3.0
      },
      "priority": 99
    }
  ]
}

How rules work

  1. Rules are evaluated in priority order (1 = highest)
  2. First rule where all conditions match is applied
  3. Empty conditions array = default rule (matches everything)
  4. Each policy should have a default rule with lowest priority

Rule evaluation flow

Condition operators

OperatorDescriptionExample
EQUALSExact matchpayment_method = "PIX"
NOT_EQUALSNot equalpayment_method != "PIX"
GREATER_THANGreater thanamount > 10000
LESS_THANLess thanamount < 50000
GREATER_OR_EQUALGreater or equalinstallments >= 3
LESS_OR_EQUALLess or equalinstallments <= 12
INIn arraypayment_method IN ["PIX", "CREDIT_CARD"]
NOT_INNot in arraypayment_method NOT IN ["BOLETO"]

Transaction fields

You can create conditions based on these transaction fields:
  • transaction.amount: Transaction amount in cents
  • transaction.payment_method: Payment method (PIX, CREDIT_CARD, etc.)
  • transaction.installments: Number of installments
  • transaction.capture_method: Capture method (ECOMMERCE, EMV, etc.)

Cashout pricing

Both fee and cost policies include a cashout_price field (in cents) that defines the fixed fee/cost for cashout operations:
{
  "cashout_price": 350
}
This is charged when merchants transfer funds from their provider account to external bank accounts.

Creating fee policies

Organizations can create custom fee policies:
curl -X POST https://api-sandbox.rinne.com.br/core/v1/pricing/fee-policies \
  -H "x-api-key: YOUR_ORG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "premium-merchant-fees",
    "description": "Reduced fees for premium merchants",
    "is_active": true,
    "cashout_price": 250,
    "rules": [
      {
        "conditions": [
          {
            "field": "transaction.payment_method",
            "operator": "EQUALS",
            "value": "PIX"
          }
        ],
        "price": {
          "percentage": 0.5
        },
        "priority": 1
      },
      {
        "conditions": [],
        "price": {
          "percentage": 2.0
        },
        "priority": 99
      }
    ]
  }'

Cost policies

Cost policies are configured by Rinne administrators for each provider and MCC combination. They define what the provider charges for processing transactions. Organizations can view their cost policies:
curl "https://api-sandbox.rinne.com.br/core/v1/pricing/cost-policies?provider=CELCOIN&mcc=5912" \
  -H "x-api-key: YOUR_API_KEY"

MCC (Merchant Category Code)

Each merchant is assigned an MCC that categorizes their business type. The MCC determines which cost policy applies to their transactions. Common MCCs:
  • 5912: Drug stores and pharmacies
  • 5411: Grocery stores and supermarkets
  • 5812: Restaurants
  • 5999: Miscellaneous retail
List available MCCs for your organization:
curl https://api-sandbox.rinne.com.br/core/v1/companies/mccs \
  -H "x-api-key: YOUR_API_KEY"

Per-transaction fee policy

You can override the default fee policy for specific transactions:
{
  "fee_policy_id": "custom-fee-policy-123",
  "amount": 10000,
  "payment_method": "PIX"
}
The specified fee policy must belong to your organization.

Next steps