curl --request POST \
--url https://economy.synxbr.com/api/v1/payables/{id}/settlements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"date": "2023-12-25",
"amount": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({date: '2023-12-25', amount: '<string>'})
};
fetch('https://economy.synxbr.com/api/v1/payables/{id}/settlements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://economy.synxbr.com/api/v1/payables/{id}/settlements"
payload = {
"date": "2023-12-25",
"amount": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://economy.synxbr.com/api/v1/payables/{id}/settlements",
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([
'date' => '2023-12-25',
'amount' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "cash",
"date": "2023-12-25",
"amount": "1234.56",
"note": "<string>",
"closes": true,
"payable": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_ref": "<string>",
"description": "<string>",
"status": "pending",
"amount": "1234.56",
"discount": "1234.56",
"interest": "1234.56",
"interest_type": "interest",
"settled_amount": "1234.56",
"open_amount": "1234.56",
"issue_date": "2023-12-25",
"due_date": "2023-12-25",
"competence_date": "2023-12-25",
"settled_at": "2023-11-07T05:31:56Z",
"canceled_at": "2023-11-07T05:31:56Z",
"document": {
"number": "<string>",
"type": "bank_slip",
"has_fiscal_note": true
},
"payment_method": "pix",
"branch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"category": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"subcategory": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"cost_center": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"bank_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"recurrence": {
"is_recurring": true,
"occurrence_number": 123,
"rule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"splits": [
{
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"branch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"employee": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"category": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"subcategory": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"amount": "1234.56"
}
],
"settlements": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "bank_statement",
"date": "2023-12-25",
"amount": "1234.56",
"bank_transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"note": "<string>"
}
],
"notes": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"tax_id": "<string>"
},
"payment_instructions": {
"barcode": "<string>",
"pix_key": "<string>"
}
},
"receivable": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_ref": "<string>",
"description": "<string>",
"status": "pending",
"amount": "1234.56",
"discount": "1234.56",
"interest": "1234.56",
"interest_type": "interest",
"settled_amount": "1234.56",
"open_amount": "1234.56",
"issue_date": "2023-12-25",
"due_date": "2023-12-25",
"competence_date": "2023-12-25",
"settled_at": "2023-11-07T05:31:56Z",
"canceled_at": "2023-11-07T05:31:56Z",
"document": {
"number": "<string>",
"type": "bank_slip",
"has_fiscal_note": true
},
"payment_method": "pix",
"branch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"category": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"subcategory": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"cost_center": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"bank_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"recurrence": {
"is_recurring": true,
"occurrence_number": 123,
"rule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"splits": [
{
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"branch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"employee": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"category": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"subcategory": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"amount": "1234.56"
}
],
"settlements": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "bank_statement",
"date": "2023-12-25",
"amount": "1234.56",
"bank_transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"note": "<string>"
}
],
"notes": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"customer": {
"name": "<string>",
"tax_id": "<string>",
"email": "<string>",
"phone": "<string>"
}
}
},
"meta": {
"request_id": "<string>",
"installments": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"generated_titles": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}Registra um pagamento feito fora do extrato (em dinheiro ou por outro meio).
Só cash (em dinheiro) e external (outra conta ou meio fora do SynX): pela conta com extrato no SynX a baixa é o vínculo com a linha do extrato, feito na Conciliação. As regras são as da tela: data até hoje, mês fechado recusado (409 period_closed), conta a pagar em envio ao banco recusada (409 title_locked), conta quitada recusada. Valor diferente do que falta pede difference. Quitada, a conta gera o evento payable.settled / receivable.settled.
Permissão exigida: Registrar pagamento (payables.pay).
curl --request POST \
--url https://economy.synxbr.com/api/v1/payables/{id}/settlements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"date": "2023-12-25",
"amount": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({date: '2023-12-25', amount: '<string>'})
};
fetch('https://economy.synxbr.com/api/v1/payables/{id}/settlements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://economy.synxbr.com/api/v1/payables/{id}/settlements"
payload = {
"date": "2023-12-25",
"amount": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://economy.synxbr.com/api/v1/payables/{id}/settlements",
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([
'date' => '2023-12-25',
'amount' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "cash",
"date": "2023-12-25",
"amount": "1234.56",
"note": "<string>",
"closes": true,
"payable": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_ref": "<string>",
"description": "<string>",
"status": "pending",
"amount": "1234.56",
"discount": "1234.56",
"interest": "1234.56",
"interest_type": "interest",
"settled_amount": "1234.56",
"open_amount": "1234.56",
"issue_date": "2023-12-25",
"due_date": "2023-12-25",
"competence_date": "2023-12-25",
"settled_at": "2023-11-07T05:31:56Z",
"canceled_at": "2023-11-07T05:31:56Z",
"document": {
"number": "<string>",
"type": "bank_slip",
"has_fiscal_note": true
},
"payment_method": "pix",
"branch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"category": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"subcategory": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"cost_center": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"bank_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"recurrence": {
"is_recurring": true,
"occurrence_number": 123,
"rule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"splits": [
{
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"branch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"employee": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"category": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"subcategory": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"amount": "1234.56"
}
],
"settlements": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "bank_statement",
"date": "2023-12-25",
"amount": "1234.56",
"bank_transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"note": "<string>"
}
],
"notes": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"tax_id": "<string>"
},
"payment_instructions": {
"barcode": "<string>",
"pix_key": "<string>"
}
},
"receivable": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_ref": "<string>",
"description": "<string>",
"status": "pending",
"amount": "1234.56",
"discount": "1234.56",
"interest": "1234.56",
"interest_type": "interest",
"settled_amount": "1234.56",
"open_amount": "1234.56",
"issue_date": "2023-12-25",
"due_date": "2023-12-25",
"competence_date": "2023-12-25",
"settled_at": "2023-11-07T05:31:56Z",
"canceled_at": "2023-11-07T05:31:56Z",
"document": {
"number": "<string>",
"type": "bank_slip",
"has_fiscal_note": true
},
"payment_method": "pix",
"branch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"category": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"subcategory": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"cost_center": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"bank_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"recurrence": {
"is_recurring": true,
"occurrence_number": 123,
"rule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"splits": [
{
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"branch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"employee": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"category": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"subcategory": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"amount": "1234.56"
}
],
"settlements": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "bank_statement",
"date": "2023-12-25",
"amount": "1234.56",
"bank_transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"note": "<string>"
}
],
"notes": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"customer": {
"name": "<string>",
"tax_id": "<string>",
"email": "<string>",
"phone": "<string>"
}
}
},
"meta": {
"request_id": "<string>",
"installments": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"generated_titles": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"fields": {},
"required_permissions": [
"<string>"
]
}
}Autorizações
Cabeçalhos
Um identificador único deste pedido (um UUID serve), de 8 a 100 caracteres. Repetir o pedido com a mesma chave devolve a mesma resposta, sem criar outro registro (24 h); a mesma chave com outro conteúdo é recusada (422). A resposta repetida vem com o cabeçalho Idempotent-Replayed: true.
8 - 100Corpo
Uma baixa fora do extrato. Pela conta com extrato no SynX a baixa é o vínculo com a linha do extrato, feito na Conciliação (bank_statement é recusado).