Create Pix charge with due date
curl --request POST \
--url https://api.fincle.com.br/pix/in/cob \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amountInCents": 15000,
"description": "Installment 11/12 of agreement no. 4587",
"customer": {
"name": "Helena Martins Andrade",
"email": "helena.andrade@example.com",
"documentType": "cpf",
"document": "31845792041",
"phone": "11932104567"
},
"cob": {
"expirationDate": "2026-12-10T00:00:00.000Z",
"daysAfterDueDate": 5,
"fine": {
"type": "percent",
"value": 2
},
"interest": {
"type": "percent",
"basis": "month",
"calendar": "calendar",
"value": 1
}
}
}
'import requests
url = "https://api.fincle.com.br/pix/in/cob"
payload = {
"amountInCents": 15000,
"description": "Installment 11/12 of agreement no. 4587",
"customer": {
"name": "Helena Martins Andrade",
"email": "helena.andrade@example.com",
"documentType": "cpf",
"document": "31845792041",
"phone": "11932104567"
},
"cob": {
"expirationDate": "2026-12-10T00:00:00.000Z",
"daysAfterDueDate": 5,
"fine": {
"type": "percent",
"value": 2
},
"interest": {
"type": "percent",
"basis": "month",
"calendar": "calendar",
"value": 1
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amountInCents: 15000,
description: 'Installment 11/12 of agreement no. 4587',
customer: {
name: 'Helena Martins Andrade',
email: 'helena.andrade@example.com',
documentType: 'cpf',
document: '31845792041',
phone: '11932104567'
},
cob: {
expirationDate: '2026-12-10T00:00:00.000Z',
daysAfterDueDate: 5,
fine: {type: 'percent', value: 2},
interest: {type: 'percent', basis: 'month', calendar: 'calendar', value: 1}
}
})
};
fetch('https://api.fincle.com.br/pix/in/cob', 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.fincle.com.br/pix/in/cob",
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([
'amountInCents' => 15000,
'description' => 'Installment 11/12 of agreement no. 4587',
'customer' => [
'name' => 'Helena Martins Andrade',
'email' => 'helena.andrade@example.com',
'documentType' => 'cpf',
'document' => '31845792041',
'phone' => '11932104567'
],
'cob' => [
'expirationDate' => '2026-12-10T00:00:00.000Z',
'daysAfterDueDate' => 5,
'fine' => [
'type' => 'percent',
'value' => 2
],
'interest' => [
'type' => 'percent',
'basis' => 'month',
'calendar' => 'calendar',
'value' => 1
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.fincle.com.br/pix/in/cob"
payload := strings.NewReader("{\n \"amountInCents\": 15000,\n \"description\": \"Installment 11/12 of agreement no. 4587\",\n \"customer\": {\n \"name\": \"Helena Martins Andrade\",\n \"email\": \"helena.andrade@example.com\",\n \"documentType\": \"cpf\",\n \"document\": \"31845792041\",\n \"phone\": \"11932104567\"\n },\n \"cob\": {\n \"expirationDate\": \"2026-12-10T00:00:00.000Z\",\n \"daysAfterDueDate\": 5,\n \"fine\": {\n \"type\": \"percent\",\n \"value\": 2\n },\n \"interest\": {\n \"type\": \"percent\",\n \"basis\": \"month\",\n \"calendar\": \"calendar\",\n \"value\": 1\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.fincle.com.br/pix/in/cob")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amountInCents\": 15000,\n \"description\": \"Installment 11/12 of agreement no. 4587\",\n \"customer\": {\n \"name\": \"Helena Martins Andrade\",\n \"email\": \"helena.andrade@example.com\",\n \"documentType\": \"cpf\",\n \"document\": \"31845792041\",\n \"phone\": \"11932104567\"\n },\n \"cob\": {\n \"expirationDate\": \"2026-12-10T00:00:00.000Z\",\n \"daysAfterDueDate\": 5,\n \"fine\": {\n \"type\": \"percent\",\n \"value\": 2\n },\n \"interest\": {\n \"type\": \"percent\",\n \"basis\": \"month\",\n \"calendar\": \"calendar\",\n \"value\": 1\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fincle.com.br/pix/in/cob")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amountInCents\": 15000,\n \"description\": \"Installment 11/12 of agreement no. 4587\",\n \"customer\": {\n \"name\": \"Helena Martins Andrade\",\n \"email\": \"helena.andrade@example.com\",\n \"documentType\": \"cpf\",\n \"document\": \"31845792041\",\n \"phone\": \"11932104567\"\n },\n \"cob\": {\n \"expirationDate\": \"2026-12-10T00:00:00.000Z\",\n \"daysAfterDueDate\": 5,\n \"fine\": {\n \"type\": \"percent\",\n \"value\": 2\n },\n \"interest\": {\n \"type\": \"percent\",\n \"basis\": \"month\",\n \"calendar\": \"calendar\",\n \"value\": 1\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Transação criada com sucesso",
"data": {
"id": "cmddiqpxo09zf1yju2kqkhgga",
"pix": {
"emv": "00020126870014br.gov.bcb.pix2565pix.example.com/qr/v3/at/7fab0715...6304F801",
"qrCode": "data:image/png;base64,iVBORw0KGgo..."
},
"status": "pending",
"fees": 150
}
}{
"success": false,
"message": "Documento inválido para o tipo selecionado"
}{
"success": false,
"message": "Não autorizado"
}{
"success": true,
"message": "<string>"
}Charges
Create Pix charge with due date
Creates a Pix charge with a due date, with optional fine, interest, discount and rebate.
POST
/
pix
/
in
/
cob
Create Pix charge with due date
curl --request POST \
--url https://api.fincle.com.br/pix/in/cob \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amountInCents": 15000,
"description": "Installment 11/12 of agreement no. 4587",
"customer": {
"name": "Helena Martins Andrade",
"email": "helena.andrade@example.com",
"documentType": "cpf",
"document": "31845792041",
"phone": "11932104567"
},
"cob": {
"expirationDate": "2026-12-10T00:00:00.000Z",
"daysAfterDueDate": 5,
"fine": {
"type": "percent",
"value": 2
},
"interest": {
"type": "percent",
"basis": "month",
"calendar": "calendar",
"value": 1
}
}
}
'import requests
url = "https://api.fincle.com.br/pix/in/cob"
payload = {
"amountInCents": 15000,
"description": "Installment 11/12 of agreement no. 4587",
"customer": {
"name": "Helena Martins Andrade",
"email": "helena.andrade@example.com",
"documentType": "cpf",
"document": "31845792041",
"phone": "11932104567"
},
"cob": {
"expirationDate": "2026-12-10T00:00:00.000Z",
"daysAfterDueDate": 5,
"fine": {
"type": "percent",
"value": 2
},
"interest": {
"type": "percent",
"basis": "month",
"calendar": "calendar",
"value": 1
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amountInCents: 15000,
description: 'Installment 11/12 of agreement no. 4587',
customer: {
name: 'Helena Martins Andrade',
email: 'helena.andrade@example.com',
documentType: 'cpf',
document: '31845792041',
phone: '11932104567'
},
cob: {
expirationDate: '2026-12-10T00:00:00.000Z',
daysAfterDueDate: 5,
fine: {type: 'percent', value: 2},
interest: {type: 'percent', basis: 'month', calendar: 'calendar', value: 1}
}
})
};
fetch('https://api.fincle.com.br/pix/in/cob', 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.fincle.com.br/pix/in/cob",
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([
'amountInCents' => 15000,
'description' => 'Installment 11/12 of agreement no. 4587',
'customer' => [
'name' => 'Helena Martins Andrade',
'email' => 'helena.andrade@example.com',
'documentType' => 'cpf',
'document' => '31845792041',
'phone' => '11932104567'
],
'cob' => [
'expirationDate' => '2026-12-10T00:00:00.000Z',
'daysAfterDueDate' => 5,
'fine' => [
'type' => 'percent',
'value' => 2
],
'interest' => [
'type' => 'percent',
'basis' => 'month',
'calendar' => 'calendar',
'value' => 1
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.fincle.com.br/pix/in/cob"
payload := strings.NewReader("{\n \"amountInCents\": 15000,\n \"description\": \"Installment 11/12 of agreement no. 4587\",\n \"customer\": {\n \"name\": \"Helena Martins Andrade\",\n \"email\": \"helena.andrade@example.com\",\n \"documentType\": \"cpf\",\n \"document\": \"31845792041\",\n \"phone\": \"11932104567\"\n },\n \"cob\": {\n \"expirationDate\": \"2026-12-10T00:00:00.000Z\",\n \"daysAfterDueDate\": 5,\n \"fine\": {\n \"type\": \"percent\",\n \"value\": 2\n },\n \"interest\": {\n \"type\": \"percent\",\n \"basis\": \"month\",\n \"calendar\": \"calendar\",\n \"value\": 1\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.fincle.com.br/pix/in/cob")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amountInCents\": 15000,\n \"description\": \"Installment 11/12 of agreement no. 4587\",\n \"customer\": {\n \"name\": \"Helena Martins Andrade\",\n \"email\": \"helena.andrade@example.com\",\n \"documentType\": \"cpf\",\n \"document\": \"31845792041\",\n \"phone\": \"11932104567\"\n },\n \"cob\": {\n \"expirationDate\": \"2026-12-10T00:00:00.000Z\",\n \"daysAfterDueDate\": 5,\n \"fine\": {\n \"type\": \"percent\",\n \"value\": 2\n },\n \"interest\": {\n \"type\": \"percent\",\n \"basis\": \"month\",\n \"calendar\": \"calendar\",\n \"value\": 1\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fincle.com.br/pix/in/cob")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amountInCents\": 15000,\n \"description\": \"Installment 11/12 of agreement no. 4587\",\n \"customer\": {\n \"name\": \"Helena Martins Andrade\",\n \"email\": \"helena.andrade@example.com\",\n \"documentType\": \"cpf\",\n \"document\": \"31845792041\",\n \"phone\": \"11932104567\"\n },\n \"cob\": {\n \"expirationDate\": \"2026-12-10T00:00:00.000Z\",\n \"daysAfterDueDate\": 5,\n \"fine\": {\n \"type\": \"percent\",\n \"value\": 2\n },\n \"interest\": {\n \"type\": \"percent\",\n \"basis\": \"month\",\n \"calendar\": \"calendar\",\n \"value\": 1\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Transação criada com sucesso",
"data": {
"id": "cmddiqpxo09zf1yju2kqkhgga",
"pix": {
"emv": "00020126870014br.gov.bcb.pix2565pix.example.com/qr/v3/at/7fab0715...6304F801",
"qrCode": "data:image/png;base64,iVBORw0KGgo..."
},
"status": "pending",
"fees": 150
}
}{
"success": false,
"message": "Documento inválido para o tipo selecionado"
}{
"success": false,
"message": "Não autorizado"
}{
"success": true,
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Idempotency key of the request. Repeating the request with the same key returns the transaction already recorded, without creating a new charge. A universally unique identifier (UUID) is recommended.
Body
application/json