curl --request POST \
--url https://api.sandbox.trio.com.br/banking/cashin/pix/recurrences \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"amounts": {
"minimum": 100
},
"contract_number": "123456789",
"counterparty": {
"bank_account": {
"branch": "1234",
"digit": "1",
"ispb": "12345678",
"number": "123456"
},
"name": "John Doe",
"tax_number": "05964110000197"
},
"description": "Monthly payment for services",
"external_id": "external_id_123",
"first_payment": {
"amount": 100,
"dict_key": "pixkey@mail.com",
"due_detail": {
"discount": 2,
"discount_amounts": [],
"discount_antecipation_type": "per_day_antecipated",
"discount_calculation_days": "working",
"discount_calculation_type": "amount",
"discount_dates": [],
"due_date": "2026-07-02",
"fine": 10,
"fine_calculation_type": "percentage",
"interest": 20,
"interest_calculation_days": "calendar",
"interest_calculation_period": "month",
"interest_calculation_type": "amount",
"rebate": 50,
"rebate_calculation_type": "percentage"
}
},
"options": {
"authorization_type": "app",
"automatic_schedule": false,
"next_working_day": true,
"qrcode_expiration_seconds": 86400,
"retry_policy": "3r_7d"
},
"periodicity": "mnth",
"start_date": "2026-07-02T19:00:15.192371Z",
"virtual_account_id": "019f2433-fed8-9e20-0fc5-e0c4e7b7f6e4"
}
'import requests
url = "https://api.sandbox.trio.com.br/banking/cashin/pix/recurrences"
payload = {
"amounts": { "minimum": 100 },
"contract_number": "123456789",
"counterparty": {
"bank_account": {
"branch": "1234",
"digit": "1",
"ispb": "12345678",
"number": "123456"
},
"name": "John Doe",
"tax_number": "05964110000197"
},
"description": "Monthly payment for services",
"external_id": "external_id_123",
"first_payment": {
"amount": 100,
"dict_key": "pixkey@mail.com",
"due_detail": {
"discount": 2,
"discount_amounts": [],
"discount_antecipation_type": "per_day_antecipated",
"discount_calculation_days": "working",
"discount_calculation_type": "amount",
"discount_dates": [],
"due_date": "2026-07-02",
"fine": 10,
"fine_calculation_type": "percentage",
"interest": 20,
"interest_calculation_days": "calendar",
"interest_calculation_period": "month",
"interest_calculation_type": "amount",
"rebate": 50,
"rebate_calculation_type": "percentage"
}
},
"options": {
"authorization_type": "app",
"automatic_schedule": False,
"next_working_day": True,
"qrcode_expiration_seconds": 86400,
"retry_policy": "3r_7d"
},
"periodicity": "mnth",
"start_date": "2026-07-02T19:00:15.192371Z",
"virtual_account_id": "019f2433-fed8-9e20-0fc5-e0c4e7b7f6e4"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amounts: {minimum: 100},
contract_number: '123456789',
counterparty: {
bank_account: {branch: '1234', digit: '1', ispb: '12345678', number: '123456'},
name: 'John Doe',
tax_number: '05964110000197'
},
description: 'Monthly payment for services',
external_id: 'external_id_123',
first_payment: {
amount: 100,
dict_key: 'pixkey@mail.com',
due_detail: {
discount: 2,
discount_amounts: [],
discount_antecipation_type: 'per_day_antecipated',
discount_calculation_days: 'working',
discount_calculation_type: 'amount',
discount_dates: [],
due_date: '2026-07-02',
fine: 10,
fine_calculation_type: 'percentage',
interest: 20,
interest_calculation_days: 'calendar',
interest_calculation_period: 'month',
interest_calculation_type: 'amount',
rebate: 50,
rebate_calculation_type: 'percentage'
}
},
options: {
authorization_type: 'app',
automatic_schedule: false,
next_working_day: true,
qrcode_expiration_seconds: 86400,
retry_policy: '3r_7d'
},
periodicity: 'mnth',
start_date: '2026-07-02T19:00:15.192371Z',
virtual_account_id: '019f2433-fed8-9e20-0fc5-e0c4e7b7f6e4'
})
};
fetch('https://api.sandbox.trio.com.br/banking/cashin/pix/recurrences', 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.trio.com.br/banking/cashin/pix/recurrences",
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([
'amounts' => [
'minimum' => 100
],
'contract_number' => '123456789',
'counterparty' => [
'bank_account' => [
'branch' => '1234',
'digit' => '1',
'ispb' => '12345678',
'number' => '123456'
],
'name' => 'John Doe',
'tax_number' => '05964110000197'
],
'description' => 'Monthly payment for services',
'external_id' => 'external_id_123',
'first_payment' => [
'amount' => 100,
'dict_key' => 'pixkey@mail.com',
'due_detail' => [
'discount' => 2,
'discount_amounts' => [
],
'discount_antecipation_type' => 'per_day_antecipated',
'discount_calculation_days' => 'working',
'discount_calculation_type' => 'amount',
'discount_dates' => [
],
'due_date' => '2026-07-02',
'fine' => 10,
'fine_calculation_type' => 'percentage',
'interest' => 20,
'interest_calculation_days' => 'calendar',
'interest_calculation_period' => 'month',
'interest_calculation_type' => 'amount',
'rebate' => 50,
'rebate_calculation_type' => 'percentage'
]
],
'options' => [
'authorization_type' => 'app',
'automatic_schedule' => false,
'next_working_day' => true,
'qrcode_expiration_seconds' => 86400,
'retry_policy' => '3r_7d'
],
'periodicity' => 'mnth',
'start_date' => '2026-07-02T19:00:15.192371Z',
'virtual_account_id' => '019f2433-fed8-9e20-0fc5-e0c4e7b7f6e4'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$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.trio.com.br/banking/cashin/pix/recurrences"
payload := strings.NewReader("{\n \"amounts\": {\n \"minimum\": 100\n },\n \"contract_number\": \"123456789\",\n \"counterparty\": {\n \"bank_account\": {\n \"branch\": \"1234\",\n \"digit\": \"1\",\n \"ispb\": \"12345678\",\n \"number\": \"123456\"\n },\n \"name\": \"John Doe\",\n \"tax_number\": \"05964110000197\"\n },\n \"description\": \"Monthly payment for services\",\n \"external_id\": \"external_id_123\",\n \"first_payment\": {\n \"amount\": 100,\n \"dict_key\": \"pixkey@mail.com\",\n \"due_detail\": {\n \"discount\": 2,\n \"discount_amounts\": [],\n \"discount_antecipation_type\": \"per_day_antecipated\",\n \"discount_calculation_days\": \"working\",\n \"discount_calculation_type\": \"amount\",\n \"discount_dates\": [],\n \"due_date\": \"2026-07-02\",\n \"fine\": 10,\n \"fine_calculation_type\": \"percentage\",\n \"interest\": 20,\n \"interest_calculation_days\": \"calendar\",\n \"interest_calculation_period\": \"month\",\n \"interest_calculation_type\": \"amount\",\n \"rebate\": 50,\n \"rebate_calculation_type\": \"percentage\"\n }\n },\n \"options\": {\n \"authorization_type\": \"app\",\n \"automatic_schedule\": false,\n \"next_working_day\": true,\n \"qrcode_expiration_seconds\": 86400,\n \"retry_policy\": \"3r_7d\"\n },\n \"periodicity\": \"mnth\",\n \"start_date\": \"2026-07-02T19:00:15.192371Z\",\n \"virtual_account_id\": \"019f2433-fed8-9e20-0fc5-e0c4e7b7f6e4\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.trio.com.br/banking/cashin/pix/recurrences")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"amounts\": {\n \"minimum\": 100\n },\n \"contract_number\": \"123456789\",\n \"counterparty\": {\n \"bank_account\": {\n \"branch\": \"1234\",\n \"digit\": \"1\",\n \"ispb\": \"12345678\",\n \"number\": \"123456\"\n },\n \"name\": \"John Doe\",\n \"tax_number\": \"05964110000197\"\n },\n \"description\": \"Monthly payment for services\",\n \"external_id\": \"external_id_123\",\n \"first_payment\": {\n \"amount\": 100,\n \"dict_key\": \"pixkey@mail.com\",\n \"due_detail\": {\n \"discount\": 2,\n \"discount_amounts\": [],\n \"discount_antecipation_type\": \"per_day_antecipated\",\n \"discount_calculation_days\": \"working\",\n \"discount_calculation_type\": \"amount\",\n \"discount_dates\": [],\n \"due_date\": \"2026-07-02\",\n \"fine\": 10,\n \"fine_calculation_type\": \"percentage\",\n \"interest\": 20,\n \"interest_calculation_days\": \"calendar\",\n \"interest_calculation_period\": \"month\",\n \"interest_calculation_type\": \"amount\",\n \"rebate\": 50,\n \"rebate_calculation_type\": \"percentage\"\n }\n },\n \"options\": {\n \"authorization_type\": \"app\",\n \"automatic_schedule\": false,\n \"next_working_day\": true,\n \"qrcode_expiration_seconds\": 86400,\n \"retry_policy\": \"3r_7d\"\n },\n \"periodicity\": \"mnth\",\n \"start_date\": \"2026-07-02T19:00:15.192371Z\",\n \"virtual_account_id\": \"019f2433-fed8-9e20-0fc5-e0c4e7b7f6e4\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.trio.com.br/banking/cashin/pix/recurrences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amounts\": {\n \"minimum\": 100\n },\n \"contract_number\": \"123456789\",\n \"counterparty\": {\n \"bank_account\": {\n \"branch\": \"1234\",\n \"digit\": \"1\",\n \"ispb\": \"12345678\",\n \"number\": \"123456\"\n },\n \"name\": \"John Doe\",\n \"tax_number\": \"05964110000197\"\n },\n \"description\": \"Monthly payment for services\",\n \"external_id\": \"external_id_123\",\n \"first_payment\": {\n \"amount\": 100,\n \"dict_key\": \"pixkey@mail.com\",\n \"due_detail\": {\n \"discount\": 2,\n \"discount_amounts\": [],\n \"discount_antecipation_type\": \"per_day_antecipated\",\n \"discount_calculation_days\": \"working\",\n \"discount_calculation_type\": \"amount\",\n \"discount_dates\": [],\n \"due_date\": \"2026-07-02\",\n \"fine\": 10,\n \"fine_calculation_type\": \"percentage\",\n \"interest\": 20,\n \"interest_calculation_days\": \"calendar\",\n \"interest_calculation_period\": \"month\",\n \"interest_calculation_type\": \"amount\",\n \"rebate\": 50,\n \"rebate_calculation_type\": \"percentage\"\n }\n },\n \"options\": {\n \"authorization_type\": \"app\",\n \"automatic_schedule\": false,\n \"next_working_day\": true,\n \"qrcode_expiration_seconds\": 86400,\n \"retry_policy\": \"3r_7d\"\n },\n \"periodicity\": \"mnth\",\n \"start_date\": \"2026-07-02T19:00:15.192371Z\",\n \"virtual_account_id\": \"019f2433-fed8-9e20-0fc5-e0c4e7b7f6e4\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"counterparty_bank_account_id": "019f2433-fe07-5f35-54f6-4a305e17cc78",
"start_date": "2026-07-02T19:00:14.983685Z",
"counterparty_id": "019f2433-fe07-b1fc-c037-076bca4192e6",
"type": "in",
"entity_id": "019f2433-fe07-1908-f771-055c0cbd759c",
"reference_id": "019f2433-fe07-d705-a3dd-49aa251c3eeb",
"minimum_amount": {
"amount": 10,
"currency": "BRL"
},
"ispb": "19947272",
"first_payment_date": "2026-07-02T19:00:14.983681Z",
"virtual_account_id": "019f2433-fe07-c3a0-0cd9-d48cb9882b4f",
"company_id": "019f2433-fe07-209c-d0ff-2586f01636c4",
"automatic_schedule": false,
"automated_attempt_retry": true,
"end_date": "2026-07-02T19:00:14.983686Z",
"status": "approved",
"next_working_day": true,
"description": "Descrição da recorrência",
"id": "019f2433-fe07-b59d-13e1-50e9363c91bc",
"id_rec": "019f2433-fe07-b576-1678-4d507e601b35",
"fixed_amount": {
"amount": 10,
"currency": "BRL"
},
"contract_number": "123",
"txid": "HASHEDER3E1287317823",
"journey": "aut1",
"external_id": "Teste 1",
"retry_policy": "none",
"timestamp": "2026-07-02T19:00:14.983669Z",
"org_id": "019f2433-fe07-792a-d6f7-5c402eb44c06",
"first_payment_amount": {
"amount": 10,
"currency": "BRL"
},
"maximum_amount": {
"amount": 10,
"currency": "BRL"
},
"reference_type": "qrdn",
"periodicity": "week",
"qrcode": {
"hash": "0000BResdasadjvajsidunajkTTrioTecnologia",
"id": "019f2433-fe07-e587-cda1-5c292d1e8e80",
"type": "dynamic"
},
"bank_account_id": "019f2433-fe07-577b-629a-8c33e20ab286",
"counterparty_info_id": "019f2433-fe07-6443-55ef-6584f0a49b46",
"counterparty_seq": "12"
}
}{
"errors": [
{
"detail": "null value where string expected",
"source": {
"pointer": "/data/attributes/petName"
},
"title": "Invalid value"
}
]
}{
"errors": [
{
"detail": "null value where string expected",
"source": {
"pointer": "/data/attributes/petName"
},
"title": "Invalid value"
}
]
}Generate a Recurrence
Generate a recurrence
curl --request POST \
--url https://api.sandbox.trio.com.br/banking/cashin/pix/recurrences \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"amounts": {
"minimum": 100
},
"contract_number": "123456789",
"counterparty": {
"bank_account": {
"branch": "1234",
"digit": "1",
"ispb": "12345678",
"number": "123456"
},
"name": "John Doe",
"tax_number": "05964110000197"
},
"description": "Monthly payment for services",
"external_id": "external_id_123",
"first_payment": {
"amount": 100,
"dict_key": "pixkey@mail.com",
"due_detail": {
"discount": 2,
"discount_amounts": [],
"discount_antecipation_type": "per_day_antecipated",
"discount_calculation_days": "working",
"discount_calculation_type": "amount",
"discount_dates": [],
"due_date": "2026-07-02",
"fine": 10,
"fine_calculation_type": "percentage",
"interest": 20,
"interest_calculation_days": "calendar",
"interest_calculation_period": "month",
"interest_calculation_type": "amount",
"rebate": 50,
"rebate_calculation_type": "percentage"
}
},
"options": {
"authorization_type": "app",
"automatic_schedule": false,
"next_working_day": true,
"qrcode_expiration_seconds": 86400,
"retry_policy": "3r_7d"
},
"periodicity": "mnth",
"start_date": "2026-07-02T19:00:15.192371Z",
"virtual_account_id": "019f2433-fed8-9e20-0fc5-e0c4e7b7f6e4"
}
'import requests
url = "https://api.sandbox.trio.com.br/banking/cashin/pix/recurrences"
payload = {
"amounts": { "minimum": 100 },
"contract_number": "123456789",
"counterparty": {
"bank_account": {
"branch": "1234",
"digit": "1",
"ispb": "12345678",
"number": "123456"
},
"name": "John Doe",
"tax_number": "05964110000197"
},
"description": "Monthly payment for services",
"external_id": "external_id_123",
"first_payment": {
"amount": 100,
"dict_key": "pixkey@mail.com",
"due_detail": {
"discount": 2,
"discount_amounts": [],
"discount_antecipation_type": "per_day_antecipated",
"discount_calculation_days": "working",
"discount_calculation_type": "amount",
"discount_dates": [],
"due_date": "2026-07-02",
"fine": 10,
"fine_calculation_type": "percentage",
"interest": 20,
"interest_calculation_days": "calendar",
"interest_calculation_period": "month",
"interest_calculation_type": "amount",
"rebate": 50,
"rebate_calculation_type": "percentage"
}
},
"options": {
"authorization_type": "app",
"automatic_schedule": False,
"next_working_day": True,
"qrcode_expiration_seconds": 86400,
"retry_policy": "3r_7d"
},
"periodicity": "mnth",
"start_date": "2026-07-02T19:00:15.192371Z",
"virtual_account_id": "019f2433-fed8-9e20-0fc5-e0c4e7b7f6e4"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amounts: {minimum: 100},
contract_number: '123456789',
counterparty: {
bank_account: {branch: '1234', digit: '1', ispb: '12345678', number: '123456'},
name: 'John Doe',
tax_number: '05964110000197'
},
description: 'Monthly payment for services',
external_id: 'external_id_123',
first_payment: {
amount: 100,
dict_key: 'pixkey@mail.com',
due_detail: {
discount: 2,
discount_amounts: [],
discount_antecipation_type: 'per_day_antecipated',
discount_calculation_days: 'working',
discount_calculation_type: 'amount',
discount_dates: [],
due_date: '2026-07-02',
fine: 10,
fine_calculation_type: 'percentage',
interest: 20,
interest_calculation_days: 'calendar',
interest_calculation_period: 'month',
interest_calculation_type: 'amount',
rebate: 50,
rebate_calculation_type: 'percentage'
}
},
options: {
authorization_type: 'app',
automatic_schedule: false,
next_working_day: true,
qrcode_expiration_seconds: 86400,
retry_policy: '3r_7d'
},
periodicity: 'mnth',
start_date: '2026-07-02T19:00:15.192371Z',
virtual_account_id: '019f2433-fed8-9e20-0fc5-e0c4e7b7f6e4'
})
};
fetch('https://api.sandbox.trio.com.br/banking/cashin/pix/recurrences', 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.trio.com.br/banking/cashin/pix/recurrences",
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([
'amounts' => [
'minimum' => 100
],
'contract_number' => '123456789',
'counterparty' => [
'bank_account' => [
'branch' => '1234',
'digit' => '1',
'ispb' => '12345678',
'number' => '123456'
],
'name' => 'John Doe',
'tax_number' => '05964110000197'
],
'description' => 'Monthly payment for services',
'external_id' => 'external_id_123',
'first_payment' => [
'amount' => 100,
'dict_key' => 'pixkey@mail.com',
'due_detail' => [
'discount' => 2,
'discount_amounts' => [
],
'discount_antecipation_type' => 'per_day_antecipated',
'discount_calculation_days' => 'working',
'discount_calculation_type' => 'amount',
'discount_dates' => [
],
'due_date' => '2026-07-02',
'fine' => 10,
'fine_calculation_type' => 'percentage',
'interest' => 20,
'interest_calculation_days' => 'calendar',
'interest_calculation_period' => 'month',
'interest_calculation_type' => 'amount',
'rebate' => 50,
'rebate_calculation_type' => 'percentage'
]
],
'options' => [
'authorization_type' => 'app',
'automatic_schedule' => false,
'next_working_day' => true,
'qrcode_expiration_seconds' => 86400,
'retry_policy' => '3r_7d'
],
'periodicity' => 'mnth',
'start_date' => '2026-07-02T19:00:15.192371Z',
'virtual_account_id' => '019f2433-fed8-9e20-0fc5-e0c4e7b7f6e4'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$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.trio.com.br/banking/cashin/pix/recurrences"
payload := strings.NewReader("{\n \"amounts\": {\n \"minimum\": 100\n },\n \"contract_number\": \"123456789\",\n \"counterparty\": {\n \"bank_account\": {\n \"branch\": \"1234\",\n \"digit\": \"1\",\n \"ispb\": \"12345678\",\n \"number\": \"123456\"\n },\n \"name\": \"John Doe\",\n \"tax_number\": \"05964110000197\"\n },\n \"description\": \"Monthly payment for services\",\n \"external_id\": \"external_id_123\",\n \"first_payment\": {\n \"amount\": 100,\n \"dict_key\": \"pixkey@mail.com\",\n \"due_detail\": {\n \"discount\": 2,\n \"discount_amounts\": [],\n \"discount_antecipation_type\": \"per_day_antecipated\",\n \"discount_calculation_days\": \"working\",\n \"discount_calculation_type\": \"amount\",\n \"discount_dates\": [],\n \"due_date\": \"2026-07-02\",\n \"fine\": 10,\n \"fine_calculation_type\": \"percentage\",\n \"interest\": 20,\n \"interest_calculation_days\": \"calendar\",\n \"interest_calculation_period\": \"month\",\n \"interest_calculation_type\": \"amount\",\n \"rebate\": 50,\n \"rebate_calculation_type\": \"percentage\"\n }\n },\n \"options\": {\n \"authorization_type\": \"app\",\n \"automatic_schedule\": false,\n \"next_working_day\": true,\n \"qrcode_expiration_seconds\": 86400,\n \"retry_policy\": \"3r_7d\"\n },\n \"periodicity\": \"mnth\",\n \"start_date\": \"2026-07-02T19:00:15.192371Z\",\n \"virtual_account_id\": \"019f2433-fed8-9e20-0fc5-e0c4e7b7f6e4\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.trio.com.br/banking/cashin/pix/recurrences")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"amounts\": {\n \"minimum\": 100\n },\n \"contract_number\": \"123456789\",\n \"counterparty\": {\n \"bank_account\": {\n \"branch\": \"1234\",\n \"digit\": \"1\",\n \"ispb\": \"12345678\",\n \"number\": \"123456\"\n },\n \"name\": \"John Doe\",\n \"tax_number\": \"05964110000197\"\n },\n \"description\": \"Monthly payment for services\",\n \"external_id\": \"external_id_123\",\n \"first_payment\": {\n \"amount\": 100,\n \"dict_key\": \"pixkey@mail.com\",\n \"due_detail\": {\n \"discount\": 2,\n \"discount_amounts\": [],\n \"discount_antecipation_type\": \"per_day_antecipated\",\n \"discount_calculation_days\": \"working\",\n \"discount_calculation_type\": \"amount\",\n \"discount_dates\": [],\n \"due_date\": \"2026-07-02\",\n \"fine\": 10,\n \"fine_calculation_type\": \"percentage\",\n \"interest\": 20,\n \"interest_calculation_days\": \"calendar\",\n \"interest_calculation_period\": \"month\",\n \"interest_calculation_type\": \"amount\",\n \"rebate\": 50,\n \"rebate_calculation_type\": \"percentage\"\n }\n },\n \"options\": {\n \"authorization_type\": \"app\",\n \"automatic_schedule\": false,\n \"next_working_day\": true,\n \"qrcode_expiration_seconds\": 86400,\n \"retry_policy\": \"3r_7d\"\n },\n \"periodicity\": \"mnth\",\n \"start_date\": \"2026-07-02T19:00:15.192371Z\",\n \"virtual_account_id\": \"019f2433-fed8-9e20-0fc5-e0c4e7b7f6e4\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.trio.com.br/banking/cashin/pix/recurrences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amounts\": {\n \"minimum\": 100\n },\n \"contract_number\": \"123456789\",\n \"counterparty\": {\n \"bank_account\": {\n \"branch\": \"1234\",\n \"digit\": \"1\",\n \"ispb\": \"12345678\",\n \"number\": \"123456\"\n },\n \"name\": \"John Doe\",\n \"tax_number\": \"05964110000197\"\n },\n \"description\": \"Monthly payment for services\",\n \"external_id\": \"external_id_123\",\n \"first_payment\": {\n \"amount\": 100,\n \"dict_key\": \"pixkey@mail.com\",\n \"due_detail\": {\n \"discount\": 2,\n \"discount_amounts\": [],\n \"discount_antecipation_type\": \"per_day_antecipated\",\n \"discount_calculation_days\": \"working\",\n \"discount_calculation_type\": \"amount\",\n \"discount_dates\": [],\n \"due_date\": \"2026-07-02\",\n \"fine\": 10,\n \"fine_calculation_type\": \"percentage\",\n \"interest\": 20,\n \"interest_calculation_days\": \"calendar\",\n \"interest_calculation_period\": \"month\",\n \"interest_calculation_type\": \"amount\",\n \"rebate\": 50,\n \"rebate_calculation_type\": \"percentage\"\n }\n },\n \"options\": {\n \"authorization_type\": \"app\",\n \"automatic_schedule\": false,\n \"next_working_day\": true,\n \"qrcode_expiration_seconds\": 86400,\n \"retry_policy\": \"3r_7d\"\n },\n \"periodicity\": \"mnth\",\n \"start_date\": \"2026-07-02T19:00:15.192371Z\",\n \"virtual_account_id\": \"019f2433-fed8-9e20-0fc5-e0c4e7b7f6e4\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"counterparty_bank_account_id": "019f2433-fe07-5f35-54f6-4a305e17cc78",
"start_date": "2026-07-02T19:00:14.983685Z",
"counterparty_id": "019f2433-fe07-b1fc-c037-076bca4192e6",
"type": "in",
"entity_id": "019f2433-fe07-1908-f771-055c0cbd759c",
"reference_id": "019f2433-fe07-d705-a3dd-49aa251c3eeb",
"minimum_amount": {
"amount": 10,
"currency": "BRL"
},
"ispb": "19947272",
"first_payment_date": "2026-07-02T19:00:14.983681Z",
"virtual_account_id": "019f2433-fe07-c3a0-0cd9-d48cb9882b4f",
"company_id": "019f2433-fe07-209c-d0ff-2586f01636c4",
"automatic_schedule": false,
"automated_attempt_retry": true,
"end_date": "2026-07-02T19:00:14.983686Z",
"status": "approved",
"next_working_day": true,
"description": "Descrição da recorrência",
"id": "019f2433-fe07-b59d-13e1-50e9363c91bc",
"id_rec": "019f2433-fe07-b576-1678-4d507e601b35",
"fixed_amount": {
"amount": 10,
"currency": "BRL"
},
"contract_number": "123",
"txid": "HASHEDER3E1287317823",
"journey": "aut1",
"external_id": "Teste 1",
"retry_policy": "none",
"timestamp": "2026-07-02T19:00:14.983669Z",
"org_id": "019f2433-fe07-792a-d6f7-5c402eb44c06",
"first_payment_amount": {
"amount": 10,
"currency": "BRL"
},
"maximum_amount": {
"amount": 10,
"currency": "BRL"
},
"reference_type": "qrdn",
"periodicity": "week",
"qrcode": {
"hash": "0000BResdasadjvajsidunajkTTrioTecnologia",
"id": "019f2433-fe07-e587-cda1-5c292d1e8e80",
"type": "dynamic"
},
"bank_account_id": "019f2433-fe07-577b-629a-8c33e20ab286",
"counterparty_info_id": "019f2433-fe07-6443-55ef-6584f0a49b46",
"counterparty_seq": "12"
}
}{
"errors": [
{
"detail": "null value where string expected",
"source": {
"pointer": "/data/attributes/petName"
},
"title": "Invalid value"
}
]
}{
"errors": [
{
"detail": "null value where string expected",
"source": {
"pointer": "/data/attributes/petName"
},
"title": "Invalid value"
}
]
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
The recurrence generate attributes
GenerateRecurrenceParameters
Contract Number
35Counterparty
Show child attributes
Show child attributes
Description
35'week': every week, 'mnth': every month, 'qurt': every 3 months, 'mian': every 6 months, 'year': every year
week, mnth, qurt, mian, year Recurrence Start Date
Virtual Account ID
Recurrence Amount, use fixed for fixed amount recurences. For variable amount recurrences, a minimum can be defined. If defined, the counterparty cannot define a limit lower than the minimum. Variable amount recurrences need to be updated with the amount before each collecting date. If left blank, a variable amount recurrence will be created with no minimum
Show child attributes
Show child attributes
Recurrence End Date
Recurrence External ID
Schema for the first payment with due detail
Show child attributes
Show child attributes
Recurrence options
Show child attributes
Show child attributes
Response
Generate Recurrence Response
Generate Recurrence response
Generate recurrence response data
Show child attributes
Show child attributes

