Reconcile a month
Work through the transactions of one account until every booked line is matched, then check the counters of the account.
On this page
Reconciling an account means giving every booked transaction a match that is accepted. After an import, most lines already carry a suggestion. You accept the right ones and decide the others one by one. This guide is the loop for one account.
1. Find what is left
List the transactions of the account with matchState set to suggested, then to open. A suggested match waits for your decision; an open one has no suggestion yet. A pending line has no match: it is matched after a statement books it.
curl
curl "$RDC_BASE_URL/banking/v1/transactions?accountId=258f8664-ff43-4e53-b688-ad5a4a97ede6&matchState=suggested" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/transactions?accountId=258f8664-ff43-4e53-b688-ad5a4a97ede6&matchState=suggested`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/banking/v1/transactions?accountId=258f8664-ff43-4e53-b688-ad5a4a97ede6&matchState=suggested',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/transactions?accountId=258f8664-ff43-4e53-b688-ad5a4a97ede6&matchState=suggested');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/transactions?accountId=258f8664-ff43-4e53-b688-ad5a4a97ede6&matchState=suggested");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"items": [
{
"id": "0dea7dcc-e56e-4654-bdf3-95fbedf34baf",
"accountId": "258f8664-ff43-4e53-b688-ad5a4a97ede6",
"statementId": "efdd0f10-eb9d-4569-837f-992ae1bdf44e",
"bookedOn": "2026-11-18",
"valueOn": "2026-11-18",
"counterparty": "Hanul Ozana SRL",
"reference": "FCT-2026-00418",
"amount": "3168.42",
"currency": "RON",
"kind": "transfer",
"status": "booked",
"bankReference": "BK26111801",
"returnOf": null,
"returnReason": null,
"attachments": [
"FCT-2026-00418.pdf"
],
"matchState": "suggested",
"matchId": "d976e350-d423-4499-ac3d-207185a9bd4b",
"revision": 1
},
{
"id": "eb7c7917-db20-48ad-a29f-f3b08206f633",
"accountId": "258f8664-ff43-4e53-b688-ad5a4a97ede6",
"statementId": "efdd0f10-eb9d-4569-837f-992ae1bdf44e",
"bookedOn": "2026-11-17",
"valueOn": "2026-11-17",
"counterparty": "Cofetăria Vălul Alb SRL",
"reference": "PLATA PARTIALA 396",
"amount": "3000.00",
"currency": "RON",
"kind": "transfer",
"status": "booked",
"bankReference": "BK26111701",
"returnOf": null,
"returnReason": null,
"attachments": [],
"matchState": "suggested",
"matchId": "0a72c26f-af85-4602-857c-1b5a033e09f6",
"revision": 1
},
{
"id": "4d285753-c13f-44e2-a3fb-ab6043e969d7",
"accountId": "258f8664-ff43-4e53-b688-ad5a4a97ede6",
"statementId": "efdd0f10-eb9d-4569-837f-992ae1bdf44e",
"bookedOn": "2026-11-16",
"valueOn": "2026-11-16",
"counterparty": "Market Trei Brazi SRL",
"reference": "FACT 402 409",
"amount": "20804.25",
"currency": "RON",
"kind": "transfer",
"status": "booked",
"bankReference": "BK26111601",
"returnOf": null,
"returnReason": null,
"attachments": [],
"matchState": "suggested",
"matchId": "d3c1d37c-0bf1-4603-b3e7-5c5c5361ad00",
"revision": 1
}
],
"nextCursor": null
} 2. Read the match
Every transaction has matchId. `getMatch` returns the match with its method (rule, exact, partner or manual), a reason of one sentence with a stable code, the allocations and the remainder. Here exact says what the match found. The meaning of each method is in Match methods and reasons.
curl
curl "$RDC_BASE_URL/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"id": "d976e350-d423-4499-ac3d-207185a9bd4b",
"transactionId": "0dea7dcc-e56e-4654-bdf3-95fbedf34baf",
"state": "suggested",
"method": "exact",
"reason": {
"code": "exact",
"text": "The amount RON 3,168.42 equals FCT-2026-00418 and the reference names it."
},
"allocations": [
{
"kind": "item",
"openItemId": "6023b97b-b8aa-40bf-bf95-706a76377739",
"amount": "3168.42"
}
],
"remainder": "0.00",
"note": null,
"revision": 1
} Send the revision of the match you read as expectedRevision in every change below. If someone changed the match since, Treasury refuses the change with revision_conflict and applies nothing. Read the match again, decide whether the change still applies and send it with a new operationId.
3. Decide
Accept the suggestion
`acceptMatch` makes the allocations final. They must add up to the amount of the transaction, and no invoice or bill receives more than it still owes.
curl
curl -X POST "$RDC_BASE_URL/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b/accept" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "afbcc71e-ab42-4c5a-9c97-23ab1eae4574",
"expectedRevision": 1
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b/accept`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "afbcc71e-ab42-4c5a-9c97-23ab1eae4574",
"expectedRevision": 1
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b/accept',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'afbcc71e-ab42-4c5a-9c97-23ab1eae4574',
'expectedRevision': 1,
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "afbcc71e-ab42-4c5a-9c97-23ab1eae4574",
"expectedRevision": 1
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b/accept');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b/accept");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "afbcc71e-ab42-4c5a-9c97-23ab1eae4574",
"expectedRevision": 1
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "afbcc71e-ab42-4c5a-9c97-23ab1eae4574",
"status": "accepted",
"aggregateId": "d976e350-d423-4499-ac3d-207185a9bd4b",
"aggregateRevision": 2
} Split it
`splitMatch` replaces the allocations with the parts you send and sets the state split. The parts may cover less than the transaction; accept the match when they cover all of it.
curl
curl -X POST "$RDC_BASE_URL/banking/v1/matches/339a0218-95da-458f-955b-2b01fc139f2c/split" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "31d60505-de07-4975-98ee-56b9af7f0d9a",
"expectedRevision": 1,
"allocations": [
{
"kind": "item",
"openItemId": "3d5fa931-a391-4956-b9a6-4e42de152a4a",
"amount": "5140.00"
}
]
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/matches/339a0218-95da-458f-955b-2b01fc139f2c/split`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "31d60505-de07-4975-98ee-56b9af7f0d9a",
"expectedRevision": 1,
"allocations": [
{
"kind": "item",
"openItemId": "3d5fa931-a391-4956-b9a6-4e42de152a4a",
"amount": "5140.00"
}
]
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/banking/v1/matches/339a0218-95da-458f-955b-2b01fc139f2c/split',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '31d60505-de07-4975-98ee-56b9af7f0d9a',
'expectedRevision': 1,
'allocations': [
{
'kind': 'item',
'openItemId': '3d5fa931-a391-4956-b9a6-4e42de152a4a',
'amount': '5140.00',
},
],
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "31d60505-de07-4975-98ee-56b9af7f0d9a",
"expectedRevision": 1,
"allocations": [
{
"kind": "item",
"openItemId": "3d5fa931-a391-4956-b9a6-4e42de152a4a",
"amount": "5140.00"
}
]
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/matches/339a0218-95da-458f-955b-2b01fc139f2c/split');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/matches/339a0218-95da-458f-955b-2b01fc139f2c/split");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "31d60505-de07-4975-98ee-56b9af7f0d9a",
"expectedRevision": 1,
"allocations": [
{
"kind": "item",
"openItemId": "3d5fa931-a391-4956-b9a6-4e42de152a4a",
"amount": "5140.00"
}
]
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "31d60505-de07-4975-98ee-56b9af7f0d9a",
"status": "accepted",
"aggregateId": "339a0218-95da-458f-955b-2b01fc139f2c",
"aggregateRevision": 2
} Book it to an entry
`bookToEntry` books the whole transaction to a ledger entry, such as bank_fee, and accepts the match. A debit takes an expense entry and a credit an income entry.
curl
curl -X POST "$RDC_BASE_URL/banking/v1/matches/220ef7ff-2759-4b88-92b7-245be51fa5f7/entry" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "a9291819-9e8f-4069-bfd6-7530ea36eb6d",
"expectedRevision": 1,
"entry": "vehicle"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/matches/220ef7ff-2759-4b88-92b7-245be51fa5f7/entry`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "a9291819-9e8f-4069-bfd6-7530ea36eb6d",
"expectedRevision": 1,
"entry": "vehicle"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/banking/v1/matches/220ef7ff-2759-4b88-92b7-245be51fa5f7/entry',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'a9291819-9e8f-4069-bfd6-7530ea36eb6d',
'expectedRevision': 1,
'entry': 'vehicle',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "a9291819-9e8f-4069-bfd6-7530ea36eb6d",
"expectedRevision": 1,
"entry": "vehicle"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/matches/220ef7ff-2759-4b88-92b7-245be51fa5f7/entry');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/matches/220ef7ff-2759-4b88-92b7-245be51fa5f7/entry");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "a9291819-9e8f-4069-bfd6-7530ea36eb6d",
"expectedRevision": 1,
"entry": "vehicle"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "a9291819-9e8f-4069-bfd6-7530ea36eb6d",
"status": "accepted",
"aggregateId": "220ef7ff-2759-4b88-92b7-245be51fa5f7",
"aggregateRevision": 2
} Match a transfer between your accounts
`matchTransfer` marks the transaction and the opposite transaction of another account as the two sides of one transfer, and accepts both. Send the other one as counterTransactionId.
curl
curl -X POST "$RDC_BASE_URL/banking/v1/matches/aeb0905b-f721-4fad-95e0-a7148970ef4c/transfer" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "9ce22f1c-3e17-49e5-be8d-a5668b1dad61",
"expectedRevision": 1,
"counterTransactionId": "03c46c39-8f73-4477-ab71-41a96b92fb0c"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/matches/aeb0905b-f721-4fad-95e0-a7148970ef4c/transfer`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "9ce22f1c-3e17-49e5-be8d-a5668b1dad61",
"expectedRevision": 1,
"counterTransactionId": "03c46c39-8f73-4477-ab71-41a96b92fb0c"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/banking/v1/matches/aeb0905b-f721-4fad-95e0-a7148970ef4c/transfer',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '9ce22f1c-3e17-49e5-be8d-a5668b1dad61',
'expectedRevision': 1,
'counterTransactionId': '03c46c39-8f73-4477-ab71-41a96b92fb0c',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "9ce22f1c-3e17-49e5-be8d-a5668b1dad61",
"expectedRevision": 1,
"counterTransactionId": "03c46c39-8f73-4477-ab71-41a96b92fb0c"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/matches/aeb0905b-f721-4fad-95e0-a7148970ef4c/transfer');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/matches/aeb0905b-f721-4fad-95e0-a7148970ef4c/transfer");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "9ce22f1c-3e17-49e5-be8d-a5668b1dad61",
"expectedRevision": 1,
"counterTransactionId": "03c46c39-8f73-4477-ab71-41a96b92fb0c"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "9ce22f1c-3e17-49e5-be8d-a5668b1dad61",
"status": "accepted",
"aggregateId": "aeb0905b-f721-4fad-95e0-a7148970ef4c",
"aggregateRevision": 2
} Leave it, reopen it, dismiss it
`leaveMatch` puts a transaction aside with a note. A transaction that was left still counts among the lines left, so reopen it later with `reopenMatch`. `dismissMatch` drops a suggestion or a split and brings the match back to open.
curl
curl -X POST "$RDC_BASE_URL/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b/leave" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "0367068a-1774-43b2-b719-57bd8e87ba75",
"expectedRevision": 1,
"note": "waiting for the remittance advice"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b/leave`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "0367068a-1774-43b2-b719-57bd8e87ba75",
"expectedRevision": 1,
"note": "waiting for the remittance advice"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b/leave',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '0367068a-1774-43b2-b719-57bd8e87ba75',
'expectedRevision': 1,
'note': 'waiting for the remittance advice',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "0367068a-1774-43b2-b719-57bd8e87ba75",
"expectedRevision": 1,
"note": "waiting for the remittance advice"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b/leave');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b/leave");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "0367068a-1774-43b2-b719-57bd8e87ba75",
"expectedRevision": 1,
"note": "waiting for the remittance advice"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "0367068a-1774-43b2-b719-57bd8e87ba75",
"status": "accepted",
"aggregateId": "d976e350-d423-4499-ac3d-207185a9bd4b",
"aggregateRevision": 2
} curl
curl -X POST "$RDC_BASE_URL/banking/v1/matches/481f8a88-29b0-4129-b050-385d4e57c03f/reopen" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "dae0e7d4-c64d-4aa0-b552-37a5737bcbb2",
"expectedRevision": 1
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/matches/481f8a88-29b0-4129-b050-385d4e57c03f/reopen`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "dae0e7d4-c64d-4aa0-b552-37a5737bcbb2",
"expectedRevision": 1
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/banking/v1/matches/481f8a88-29b0-4129-b050-385d4e57c03f/reopen',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'dae0e7d4-c64d-4aa0-b552-37a5737bcbb2',
'expectedRevision': 1,
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "dae0e7d4-c64d-4aa0-b552-37a5737bcbb2",
"expectedRevision": 1
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/matches/481f8a88-29b0-4129-b050-385d4e57c03f/reopen');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/matches/481f8a88-29b0-4129-b050-385d4e57c03f/reopen");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "dae0e7d4-c64d-4aa0-b552-37a5737bcbb2",
"expectedRevision": 1
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "dae0e7d4-c64d-4aa0-b552-37a5737bcbb2",
"status": "accepted",
"aggregateId": "481f8a88-29b0-4129-b050-385d4e57c03f",
"aggregateRevision": 2
} curl
curl -X POST "$RDC_BASE_URL/banking/v1/matches/d3c1d37c-0bf1-4603-b3e7-5c5c5361ad00/dismiss" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "848a21ea-ba15-4257-86fa-53fc7a28cfcc",
"expectedRevision": 1
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/matches/d3c1d37c-0bf1-4603-b3e7-5c5c5361ad00/dismiss`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "848a21ea-ba15-4257-86fa-53fc7a28cfcc",
"expectedRevision": 1
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/banking/v1/matches/d3c1d37c-0bf1-4603-b3e7-5c5c5361ad00/dismiss',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '848a21ea-ba15-4257-86fa-53fc7a28cfcc',
'expectedRevision': 1,
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "848a21ea-ba15-4257-86fa-53fc7a28cfcc",
"expectedRevision": 1
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/matches/d3c1d37c-0bf1-4603-b3e7-5c5c5361ad00/dismiss');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/matches/d3c1d37c-0bf1-4603-b3e7-5c5c5361ad00/dismiss");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "848a21ea-ba15-4257-86fa-53fc7a28cfcc",
"expectedRevision": 1
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "848a21ea-ba15-4257-86fa-53fc7a28cfcc",
"status": "accepted",
"aggregateId": "d3c1d37c-0bf1-4603-b3e7-5c5c5361ad00",
"aggregateRevision": 2
} How each change is refused
Every change can also answer operation_reused. The codes are explained in Error codes.
| Operation | Codes |
|---|---|
acceptMatch | match_not_found, revision_conflict, transaction_pending, already_matched, nothing_to_accept, transfer_unavailable, open_item_exceeded, allocation_mismatch |
splitMatch | match_not_found, open_item_not_found, revision_conflict, transaction_pending, already_matched, invalid_match_state, open_item_exceeded, allocation_empty, allocation_mismatch, allocation_exceeds_line, allocation_kind, wrong_side |
bookToEntry | match_not_found, revision_conflict, transaction_pending, already_matched, invalid_match_state, unknown_entry, entry_wrong_side |
matchTransfer | match_not_found, transaction_not_found, revision_conflict, transaction_pending, already_matched, invalid_match_state, transfer_unavailable, transfer_same_account, transfer_mismatch |
leaveMatch | match_not_found, revision_conflict, transaction_pending, already_matched, invalid_match_state |
reopenMatch | match_not_found, revision_conflict, invalid_match_state |
dismissMatch | match_not_found, revision_conflict, transaction_pending, invalid_match_state |
already_matched: an accepted match is final. To undo a payment, use the return of the bank, which reverses it.nothing_to_accept: the match has no suggestion. Split the transaction or book it to an entry.transaction_pending: import the statement that books the line, then match it.open_item_exceeded: read the open amount of the invoice or bill and assign no more than that.
4. Know the month is done
Read the account with `getAccount`. The month is reconciled when linesLeft is 0 and difference is 0.00: the ledger balance equals the statement balance. The counters are explained in Accounts and balances.
curl
curl "$RDC_BASE_URL/banking/v1/accounts/258f8664-ff43-4e53-b688-ad5a4a97ede6" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/accounts/258f8664-ff43-4e53-b688-ad5a4a97ede6`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/banking/v1/accounts/258f8664-ff43-4e53-b688-ad5a4a97ede6',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/accounts/258f8664-ff43-4e53-b688-ad5a4a97ede6');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/accounts/258f8664-ff43-4e53-b688-ad5a4a97ede6");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"id": "258f8664-ff43-4e53-b688-ad5a4a97ede6",
"companyId": "3e738c06-3df7-4eb7-bfe2-259b8ba481f9",
"name": "Operating account",
"iban": "RO** **** **** **** **** 0000",
"currency": "RON",
"bookedBalance": "154289.67",
"availableBalance": "153394.27",
"statementBalance": "154289.67",
"ledgerBalance": "156199.80",
"difference": "-1910.13",
"linesLeft": 8,
"nonWorkingDays": [
"2026-11-30",
"2026-12-01"
]
} Next: Prepare and approve payments.