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
}
]
}
'import requests
url = "https://api-sandbox.rinne.com.br/core/v1/pricing/fee-policies"
payload = {
"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
}
]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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}
]
})
};
fetch('https://api-sandbox.rinne.com.br/core/v1/pricing/fee-policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.rinne.com.br/core/v1/pricing/fee-policies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.rinne.com.br/core/v1/pricing/fee-policies"
payload := strings.NewReader("{\n \"name\": \"standard-card-fees\",\n \"description\": \"Standard fee structure for card transactions\",\n \"is_active\": true,\n \"cashout_price\": 350,\n \"rules\": [\n {\n \"conditions\": [\n {\n \"field\": \"transaction.payment_method\",\n \"operator\": \"EQUALS\",\n \"value\": \"CREDIT_CARD\"\n },\n {\n \"field\": \"transaction.installments\",\n \"operator\": \"EQUALS\",\n \"value\": 1\n }\n ],\n \"price\": {\n \"percentage\": 2.3\n },\n \"priority\": 1\n },\n {\n \"conditions\": [\n {\n \"field\": \"transaction.payment_method\",\n \"operator\": \"EQUALS\",\n \"value\": \"DEBIT_CARD\"\n }\n ],\n \"price\": {\n \"percentage\": 1.8\n },\n \"priority\": 2\n },\n {\n \"conditions\": [],\n \"price\": {\n \"percentage\": 3\n },\n \"priority\": 99\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.rinne.com.br/core/v1/pricing/fee-policies")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"standard-card-fees\",\n \"description\": \"Standard fee structure for card transactions\",\n \"is_active\": true,\n \"cashout_price\": 350,\n \"rules\": [\n {\n \"conditions\": [\n {\n \"field\": \"transaction.payment_method\",\n \"operator\": \"EQUALS\",\n \"value\": \"CREDIT_CARD\"\n },\n {\n \"field\": \"transaction.installments\",\n \"operator\": \"EQUALS\",\n \"value\": 1\n }\n ],\n \"price\": {\n \"percentage\": 2.3\n },\n \"priority\": 1\n },\n {\n \"conditions\": [\n {\n \"field\": \"transaction.payment_method\",\n \"operator\": \"EQUALS\",\n \"value\": \"DEBIT_CARD\"\n }\n ],\n \"price\": {\n \"percentage\": 1.8\n },\n \"priority\": 2\n },\n {\n \"conditions\": [],\n \"price\": {\n \"percentage\": 3\n },\n \"priority\": 99\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.rinne.com.br/core/v1/pricing/fee-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"standard-card-fees\",\n \"description\": \"Standard fee structure for card transactions\",\n \"is_active\": true,\n \"cashout_price\": 350,\n \"rules\": [\n {\n \"conditions\": [\n {\n \"field\": \"transaction.payment_method\",\n \"operator\": \"EQUALS\",\n \"value\": \"CREDIT_CARD\"\n },\n {\n \"field\": \"transaction.installments\",\n \"operator\": \"EQUALS\",\n \"value\": 1\n }\n ],\n \"price\": {\n \"percentage\": 2.3\n },\n \"priority\": 1\n },\n {\n \"conditions\": [\n {\n \"field\": \"transaction.payment_method\",\n \"operator\": \"EQUALS\",\n \"value\": \"DEBIT_CARD\"\n }\n ],\n \"price\": {\n \"percentage\": 1.8\n },\n \"priority\": 2\n },\n {\n \"conditions\": [],\n \"price\": {\n \"percentage\": 3\n },\n \"priority\": 99\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2793",
"name": "standard-card-fees",
"description": "Standard fee structure for card transactions",
"is_active": true,
"cashout_price": 350,
"automatic_anticipation_percentage": 2.4999,
"spot_anticipation_percentage": 2.4999,
"organization_id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2794",
"rules": [
{
"conditions": [
{
"field": "transaction.card_data.brand",
"operator": "EQUALS",
"value": "CREDIT_CARD"
}
],
"price": {
"percentage": 2.5,
"flat": 50,
"minimum_price": 100
},
"priority": 1,
"id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2793",
"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"
}{
"error": {
"code": "AUTHORIZATION_ERROR",
"message": "You need 'admin' permissions to access this resource",
"status": 403,
"path": "/companies",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}Create a new fee policy
Requires the fee_policy.create permission.
Creates a new fee policy for the authenticated company with pricing rules
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
}
]
}
'import requests
url = "https://api-sandbox.rinne.com.br/core/v1/pricing/fee-policies"
payload = {
"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
}
]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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}
]
})
};
fetch('https://api-sandbox.rinne.com.br/core/v1/pricing/fee-policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.rinne.com.br/core/v1/pricing/fee-policies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.rinne.com.br/core/v1/pricing/fee-policies"
payload := strings.NewReader("{\n \"name\": \"standard-card-fees\",\n \"description\": \"Standard fee structure for card transactions\",\n \"is_active\": true,\n \"cashout_price\": 350,\n \"rules\": [\n {\n \"conditions\": [\n {\n \"field\": \"transaction.payment_method\",\n \"operator\": \"EQUALS\",\n \"value\": \"CREDIT_CARD\"\n },\n {\n \"field\": \"transaction.installments\",\n \"operator\": \"EQUALS\",\n \"value\": 1\n }\n ],\n \"price\": {\n \"percentage\": 2.3\n },\n \"priority\": 1\n },\n {\n \"conditions\": [\n {\n \"field\": \"transaction.payment_method\",\n \"operator\": \"EQUALS\",\n \"value\": \"DEBIT_CARD\"\n }\n ],\n \"price\": {\n \"percentage\": 1.8\n },\n \"priority\": 2\n },\n {\n \"conditions\": [],\n \"price\": {\n \"percentage\": 3\n },\n \"priority\": 99\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.rinne.com.br/core/v1/pricing/fee-policies")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"standard-card-fees\",\n \"description\": \"Standard fee structure for card transactions\",\n \"is_active\": true,\n \"cashout_price\": 350,\n \"rules\": [\n {\n \"conditions\": [\n {\n \"field\": \"transaction.payment_method\",\n \"operator\": \"EQUALS\",\n \"value\": \"CREDIT_CARD\"\n },\n {\n \"field\": \"transaction.installments\",\n \"operator\": \"EQUALS\",\n \"value\": 1\n }\n ],\n \"price\": {\n \"percentage\": 2.3\n },\n \"priority\": 1\n },\n {\n \"conditions\": [\n {\n \"field\": \"transaction.payment_method\",\n \"operator\": \"EQUALS\",\n \"value\": \"DEBIT_CARD\"\n }\n ],\n \"price\": {\n \"percentage\": 1.8\n },\n \"priority\": 2\n },\n {\n \"conditions\": [],\n \"price\": {\n \"percentage\": 3\n },\n \"priority\": 99\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.rinne.com.br/core/v1/pricing/fee-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"standard-card-fees\",\n \"description\": \"Standard fee structure for card transactions\",\n \"is_active\": true,\n \"cashout_price\": 350,\n \"rules\": [\n {\n \"conditions\": [\n {\n \"field\": \"transaction.payment_method\",\n \"operator\": \"EQUALS\",\n \"value\": \"CREDIT_CARD\"\n },\n {\n \"field\": \"transaction.installments\",\n \"operator\": \"EQUALS\",\n \"value\": 1\n }\n ],\n \"price\": {\n \"percentage\": 2.3\n },\n \"priority\": 1\n },\n {\n \"conditions\": [\n {\n \"field\": \"transaction.payment_method\",\n \"operator\": \"EQUALS\",\n \"value\": \"DEBIT_CARD\"\n }\n ],\n \"price\": {\n \"percentage\": 1.8\n },\n \"priority\": 2\n },\n {\n \"conditions\": [],\n \"price\": {\n \"percentage\": 3\n },\n \"priority\": 99\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2793",
"name": "standard-card-fees",
"description": "Standard fee structure for card transactions",
"is_active": true,
"cashout_price": 350,
"automatic_anticipation_percentage": 2.4999,
"spot_anticipation_percentage": 2.4999,
"organization_id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2794",
"rules": [
{
"conditions": [
{
"field": "transaction.card_data.brand",
"operator": "EQUALS",
"value": "CREDIT_CARD"
}
],
"price": {
"percentage": 2.5,
"flat": 50,
"minimum_price": 100
},
"priority": 1,
"id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2793",
"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"
}{
"error": {
"code": "AUTHORIZATION_ERROR",
"message": "You need 'admin' permissions to access this resource",
"status": 403,
"path": "/companies",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}Authorizations
Company API key for authentication
Body
Fee policy creation request
Policy name (alphanumeric, underscores, hyphens only)
1 - 100^[a-zA-Z0-9_-]+$"standard-card-fees"
Cashout price in cents (fixed fee for cashout operations)
x >= 0350
1Show child attributes
Show child attributes
Optional policy description
500"Standard fee structure for card transactions"
Whether the policy is active
true
Monthly anticipation rate as a percentage (up to 4 decimal places)
0 <= x <= 100Must be a multiple of 0.00012.4999
Monthly anticipation rate as a percentage (up to 4 decimal places)
0 <= x <= 100Must be a multiple of 0.00012.4999
Response
Fee policy created successfully
Fee policy response
Policy ID
"a3dbd0c2-9f79-4f86-8caa-47779b3f2793"
"standard-card-fees"
"Standard fee structure for card transactions"
true
Cashout price in cents (fixed fee for cashout operations)
350
Monthly anticipation rate as a percentage (up to 4 decimal places)
0 <= x <= 100Must be a multiple of 0.00012.4999
Monthly anticipation rate as a percentage (up to 4 decimal places)
0 <= x <= 100Must be a multiple of 0.00012.4999
Organization company ID
"a3dbd0c2-9f79-4f86-8caa-47779b3f2794"
Show child attributes
Show child attributes

