Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Transactions and statuses

    The statement and the rules an import must meet, the transaction object, its status and kind, and what each refusal of an import means.

    On this page

    A statement holds the lines your bank booked for one account over one period. You send those lines with importStatement, and every line becomes a transaction. The statement keeps the chain of balances; the transaction keeps the line and the state of its match.

    The statement and its chain

    FieldMeaning
    fromThe first day of the period. to is the last day.
    openingBalanceThe balance at the start of the period.
    closingBalanceThe balance at the end of the period.
    lineCountHow many lines the statement holds.
    importedAtWhen the statement was imported.

    Every statement of an account must fit the one before it. Four rules hold, and an import that breaks one is refused and stores nothing.

    1. The opening balance is the closing balance of the previous statement of the account.
    2. The opening balance plus the lines that are not pending is the closing balance.
    3. Every line is booked inside the period, from from to to.
    4. Every bankReference appears once for the account.

    curl

    curl -X POST "$RDC_BASE_URL/banking/v1/accounts/258f8664-ff43-4e53-b688-ad5a4a97ede6/statements" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "80cd1346-fac0-457b-9c65-741c7d8c82f1",
      "periodFrom": "2026-11-20",
      "periodTo": "2026-11-22",
      "openingBalance": "154289.67",
      "closingBalance": "180250.47",
      "lines": [
        {
          "bankReference": "BK26112001",
          "bookedOn": "2026-11-20",
          "valueOn": "2026-11-20",
          "counterparty": "Moara Vadului SRL",
          "reference": "RETUR MV-2026-1187 PP-1002",
          "amount": "24102.50",
          "kind": "transfer",
          "status": "returned",
          "returnOf": "BK26111802",
          "returnReason": "Beneficiary account closed"
        },
        {
          "bankReference": "BK26111902",
          "bookedOn": "2026-11-20",
          "valueOn": "2026-11-20",
          "counterparty": "Silozurile Zănești SRL",
          "reference": "TRANSFER",
          "amount": "1873.30",
          "kind": "transfer",
          "status": "booked"
        },
        {
          "bankReference": "BK26112002",
          "bookedOn": "2026-11-20",
          "valueOn": "2026-11-20",
          "counterparty": "Bank fee",
          "reference": "COMISION OPERATIUNE RETUR",
          "amount": "-15.00",
          "kind": "fee",
          "status": "booked"
        }
      ]
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/accounts/258f8664-ff43-4e53-b688-ad5a4a97ede6/statements`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "80cd1346-fac0-457b-9c65-741c7d8c82f1",
        "periodFrom": "2026-11-20",
        "periodTo": "2026-11-22",
        "openingBalance": "154289.67",
        "closingBalance": "180250.47",
        "lines": [
          {
            "bankReference": "BK26112001",
            "bookedOn": "2026-11-20",
            "valueOn": "2026-11-20",
            "counterparty": "Moara Vadului SRL",
            "reference": "RETUR MV-2026-1187 PP-1002",
            "amount": "24102.50",
            "kind": "transfer",
            "status": "returned",
            "returnOf": "BK26111802",
            "returnReason": "Beneficiary account closed"
          },
          {
            "bankReference": "BK26111902",
            "bookedOn": "2026-11-20",
            "valueOn": "2026-11-20",
            "counterparty": "Silozurile Zănești SRL",
            "reference": "TRANSFER",
            "amount": "1873.30",
            "kind": "transfer",
            "status": "booked"
          },
          {
            "bankReference": "BK26112002",
            "bookedOn": "2026-11-20",
            "valueOn": "2026-11-20",
            "counterparty": "Bank fee",
            "reference": "COMISION OPERATIUNE RETUR",
            "amount": "-15.00",
            "kind": "fee",
            "status": "booked"
          }
        ]
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/banking/v1/accounts/258f8664-ff43-4e53-b688-ad5a4a97ede6/statements',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '80cd1346-fac0-457b-9c65-741c7d8c82f1',
            'periodFrom': '2026-11-20',
            'periodTo': '2026-11-22',
            'openingBalance': '154289.67',
            'closingBalance': '180250.47',
            'lines': [
                {
                    'bankReference': 'BK26112001',
                    'bookedOn': '2026-11-20',
                    'valueOn': '2026-11-20',
                    'counterparty': 'Moara Vadului SRL',
                    'reference': 'RETUR MV-2026-1187 PP-1002',
                    'amount': '24102.50',
                    'kind': 'transfer',
                    'status': 'returned',
                    'returnOf': 'BK26111802',
                    'returnReason': 'Beneficiary account closed',
                },
                {
                    'bankReference': 'BK26111902',
                    'bookedOn': '2026-11-20',
                    'valueOn': '2026-11-20',
                    'counterparty': 'Silozurile Zănești SRL',
                    'reference': 'TRANSFER',
                    'amount': '1873.30',
                    'kind': 'transfer',
                    'status': 'booked',
                },
                {
                    'bankReference': 'BK26112002',
                    'bookedOn': '2026-11-20',
                    'valueOn': '2026-11-20',
                    'counterparty': 'Bank fee',
                    'reference': 'COMISION OPERATIUNE RETUR',
                    'amount': '-15.00',
                    'kind': 'fee',
                    'status': 'booked',
                },
            ],
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "80cd1346-fac0-457b-9c65-741c7d8c82f1",
      "periodFrom": "2026-11-20",
      "periodTo": "2026-11-22",
      "openingBalance": "154289.67",
      "closingBalance": "180250.47",
      "lines": [
        {
          "bankReference": "BK26112001",
          "bookedOn": "2026-11-20",
          "valueOn": "2026-11-20",
          "counterparty": "Moara Vadului SRL",
          "reference": "RETUR MV-2026-1187 PP-1002",
          "amount": "24102.50",
          "kind": "transfer",
          "status": "returned",
          "returnOf": "BK26111802",
          "returnReason": "Beneficiary account closed"
        },
        {
          "bankReference": "BK26111902",
          "bookedOn": "2026-11-20",
          "valueOn": "2026-11-20",
          "counterparty": "Silozurile Zănești SRL",
          "reference": "TRANSFER",
          "amount": "1873.30",
          "kind": "transfer",
          "status": "booked"
        },
        {
          "bankReference": "BK26112002",
          "bookedOn": "2026-11-20",
          "valueOn": "2026-11-20",
          "counterparty": "Bank fee",
          "reference": "COMISION OPERATIUNE RETUR",
          "amount": "-15.00",
          "kind": "fee",
          "status": "booked"
        }
      ]
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/accounts/258f8664-ff43-4e53-b688-ad5a4a97ede6/statements');
    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/accounts/258f8664-ff43-4e53-b688-ad5a4a97ede6/statements");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "80cd1346-fac0-457b-9c65-741c7d8c82f1",
      "periodFrom": "2026-11-20",
      "periodTo": "2026-11-22",
      "openingBalance": "154289.67",
      "closingBalance": "180250.47",
      "lines": [
        {
          "bankReference": "BK26112001",
          "bookedOn": "2026-11-20",
          "valueOn": "2026-11-20",
          "counterparty": "Moara Vadului SRL",
          "reference": "RETUR MV-2026-1187 PP-1002",
          "amount": "24102.50",
          "kind": "transfer",
          "status": "returned",
          "returnOf": "BK26111802",
          "returnReason": "Beneficiary account closed"
        },
        {
          "bankReference": "BK26111902",
          "bookedOn": "2026-11-20",
          "valueOn": "2026-11-20",
          "counterparty": "Silozurile Zănești SRL",
          "reference": "TRANSFER",
          "amount": "1873.30",
          "kind": "transfer",
          "status": "booked"
        },
        {
          "bankReference": "BK26112002",
          "bookedOn": "2026-11-20",
          "valueOn": "2026-11-20",
          "counterparty": "Bank fee",
          "reference": "COMISION OPERATIUNE RETUR",
          "amount": "-15.00",
          "kind": "fee",
          "status": "booked"
        }
      ]
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "80cd1346-fac0-457b-9c65-741c7d8c82f1",
      "status": "accepted",
      "aggregateId": "f5b1321e-fbb0-4771-8393-9e4090091108",
      "aggregateRevision": 1
    }

    The transaction object

    FieldMeaning
    idIdentifier of the transaction. It stays the same when a pending line is booked.
    accountIdThe account of the transaction.
    statementIdThe statement that holds the transaction.
    bookedOnThe day the bank booked the transaction. valueOn is the value date.
    counterpartyThe other party, as the bank prints it.
    referenceThe details of the payment, as the bank prints them.
    amountPositive for a credit, negative for a debit. currency is RON.
    kindtransfer, card, direct_debit or fee.
    statuspending, booked or returned.
    bankReferenceThe reference the bank gives the line. It is unique for the account.
    returnOfFor a line that returns a payment, the transaction it returns, else null. In the file you import, it is the bankReference of that line.
    returnReasonThe reason the bank gave, as written, else null.
    attachmentsNames of the files attached to the transaction.
    matchStateThe state of its match. matchId is the match.
    revisionGrows with every change. Send it as expectedRevision when you change the match.

    Status

    StatusMeaning
    pending The bank has not booked the line yet. It has no match and nothing can be done with it until a later statement books it. A pending debit lowers availableBalance.
    booked The bank booked the line. It counts in the closing balance, and a match is proposed for it.
    returned The line returns a payment, or it is the payment line that the bank returned. returnOf and returnReason tell which and why.

    Kind

    KindWordMeaning
    transferTransferA transfer in or out. It is matched to an invoice, a bill, or the opposite line of another account of yours.
    cardCardA card payment, or the settlement of a day’s card takings.
    direct_debitDirect debitA direct debit. A rule of your company can book it to an entry.
    feeFeeA fee charged by the bank. It is proposed for the entry bank_fee.

    A pending line that the bank books

    A pending line is not part of the closing balance. When a later statement carries the same bankReference as a booked line, the stored transaction is updated, not added: it keeps its id, its status becomes booked, it moves to the new statement, and a match is proposed for it. The earlier statement no longer counts it.

    Every change on a pending transaction is refused with transaction_pending.

    A returned line

    When the bank returns a payment, the statement carries a line with status returned, returnOf set to the bankReference of the payment line, and returnReason with the bank’s own words. The import marks the payment line returned too, and the payment proposal behind it moves to rejected_by_bank. The returned line gets a suggested match that reverses the payment; see Match methods and reasons.

    What an import refuses

    The checks run in this order, and the first one that fails answers.

    CodeHTTPWhat it meansWhat you do
    statement_duplicate422A statement of this account for the same period is already imported.Nothing to do: read the statement that is stored.
    statement_gap422The opening balance of the file is not the closing balance of the last statement of the account.Import the statement that comes before it first.
    statement_out_of_period422A line is dated outside the period of the statement.Export the statement again for the period you mean.
    statement_duplicate_line422A bank reference appears twice in the file or is already stored for the account.Remove the repeated line or import only the days that are new.
    statement_unbalanced422The opening balance plus the booked lines is not the closing balance of the file.Check that the file is complete and export it again from your bank.

    See Import a statement for the steps and Error codes for every code.