Skip to main content
POST
/
v1
/
pricing
/
fee-policies
Create a new fee policy
curl --request POST \
  --url https://api-sandbox.rinne.com.br/core/v1/pricing/fee-policies \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "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": "DEBIT_CARD"
        }
      ],
      "price": {
        "percentage": 1.8
      },
      "priority": 2
    },
    {
      "conditions": [],
      "price": {
        "percentage": 3
      },
      "priority": 99
    }
  ]
}'
{
  "id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2793",
  "name": "standard-card-fees",
  "description": "Standard fee structure for card transactions",
  "is_active": true,
  "cashout_price": 350,
  "organization_id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2794",
  "rules": [
    {
      "id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2793",
      "conditions": [
        {
          "field": "transaction.payment_method",
          "operator": "EQUALS",
          "value": "credit_card"
        }
      ],
      "price": {
        "percentage": 2.5,
        "flat": 50,
        "minimum_price": 100
      },
      "priority": 1,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required

Company API key for authentication

Body

application/json

Fee policy creation request

name
string
required

Policy name (alphanumeric, underscores, hyphens only)

Required string length: 1 - 100
Example:

"standard-card-fees"

cashout_price
integer
required

Cashout price in cents (fixed fee for cashout operations)

Required range: x >= 0
Example:

350

rules
object[]
required
Minimum length: 1
description
string

Optional policy description

Maximum length: 500
Example:

"Standard fee structure for card transactions"

is_active
boolean
default:true

Whether the policy is active

Example:

true

Response

Fee policy created successfully

Fee policy response

id
string

Policy ID

Example:

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

name
string
Example:

"standard-card-fees"

description
string | null
Example:

"Standard fee structure for card transactions"

is_active
boolean
Example:

true

cashout_price
integer

Cashout price in cents (fixed fee for cashout operations)

Example:

350

organization_id
string

Organization company ID

Example:

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

rules
object[]
created_at
string<date-time>
updated_at
string<date-time>