API > LROE - Cash accounting - PAYMENTS - Query payments

LROE - Cash accounting - PAYMENTS - Query payments

GET  https://{entorno}.ticketbaiws.eus/lroe-critcaja-pagos/

IMPORTANT: This method is only valid for BATUZ Bizkaia. Lets you query the payments of received invoices sent to the Batuz LROE. All parameters except the fiscal year are optional (although at least one must be specified) and can be combined, for example to search for a specific supplier's invoices between two dates. This method is for companies or self-employed individuals under the special cash accounting scheme.

GET methods accept the parameters either in the body as a JSON payload or as a query string in the URL, as shown in the cURL example.

PARAMETERS

ejercicio integer required
Fiscal year of the batch of payments, in yyyy format
2023
fecha_factura_desde string optional
Date of the full invoice in dd/mm/yyyy format
13/09/2023
fecha_factura_hasta string optional
Date of the full invoice in dd/mm/yyyy format
13/10/2023
fecha_operacion_desde string optional
Transaction date in dd/mm/yyyy format
13/09/2023
fecha_operacion_hasta string optional
Transaction date in dd/mm/yyyy format
13/10/2023
fecha_pago_desde string optional
Payment date in dd/mm/yyyy format
13/09/2023
fecha_pago_hasta string optional
Payment date in dd/mm/yyyy format
13/10/2023
concepto enum optional
When the operation has no invoice, and only for form 140 (self-employed individuals or entities without legal personality). Possible options:
600 - Purchases of goods for resale
601 - Purchases of raw materials
602 - Purchases of other supplies
606 - Early payment discounts on purchases
607 - Work performed by other companies
608 - Purchase returns and similar operations
609 - Volume discounts (rappels) on purchases
620 - Research and development expenses for the year
621 - Leases and royalties
622 - Repairs and maintenance
623 - Independent professional services
624 - Transport
625 - Insurance premiums
626 - Banking and similar services
627 - Advertising, publicity and public relations
628 - Utilities
629 - Other services
631 - Other taxes
634 - Negative adjustments to indirect taxation
639 - Positive adjustments to indirect taxation
640 - Wages and salaries
641 - Severance payments
64201 - Social security paid by the company: self-employed
64202 - Social security paid by the company: employees
643 - Long-term remuneration under defined contribution plans
644 - Long-term remuneration under defined benefit plans
649 - Other employee benefit expenses
65 - Other operating expenses
66 - Financial expenses
67 - Exceptional expenses
680 - Amortization of intangible fixed assets
681 - Depreciation of property, plant and equipment
682 - Depreciation of real estate investments
69 - Impairment losses and other provisions
02
num_factura string optional
Invoice number
2023715273
epigrafe integer optional, only for individuals (natural persons) in Bizkaia (LROE 140)
Indicates that the item belongs to a specific IAE activity code, different from the general one defined in the company profile or from the one defined on the invoice.
197210
estado string optional
Invoice status: Correcto, AceptadoConErrores, Incorrecto
Correcto
pagina integer optional
Page number of the paginated result.
1


GET https://{entorno}.ticketbaiws.eus/lroe-critcaja-pagos/
$ curl --request GET \
     --url https://api-test.ticketbaiws.eus/lroe-critcaja-pagos/ \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'Token: xxx' \
     --header 'Nif: 00000014Z'
	 --data '
{
    "ejercicio": 2023,
    "fecha_factura_desde": "01/06/2023",
    "fecha_factura_hasta": "01/10/2023",
	"pagina": 1
}'
$ composer require ticketbaiws/ticketbaiws-php
<?php
// Installation: composer require ticketbaiws/ticketbaiws-php
require 'vendor/autoload.php';

$tbai = new \TicketbaiWS\Client('xxx', '00000014Z', ['entorno' => 'test']);

$r = $tbai->lroeCriterioCajaPagos()->consultar([
    'ejercicio'           => 2023,
    'fecha_factura_desde' => '01/06/2023',
    'fecha_factura_hasta' => '01/10/2023',
    'pagina'              => 1,
]);

if ($r->isError()) {
    echo $r->getMessageText();
} else {
    print_r($r->getData());
}
$ python -m pip install requests
import requests

url = "https://api-test.ticketbaiws.eus/lroe-critcaja-pagos/"
payload = {
    "ejercicio": 2023,
    "fecha_factura_desde": "01/06/2023",
    "fecha_factura_hasta": "01/10/2023",
	"pagina": 1
}

headers = {"Accept": "application/json", "Token" : "xxx", "Nif" : "00000014Z"}
response = requests.request("GET", url, json=payload, headers=headers)

print(response.text)
CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-test.ticketbaiws.eus/lroe-critcaja-pagos/");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Accept: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_GETFIELDS, '{"ejercicio": 2023,"fecha_factura_desde": "01/06/2023","fecha_factura_hasta": "01/10/2023","pagina": 1}');

CURLcode ret = curl_easy_perform(hnd);
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{"ejercicio": 2023,"fecha_factura_desde": "01/06/2023","fecha_factura_hasta": "01/10/2023","pagina": 1}');

Request request = new Request.Builder()
  .url("https://api-test.ticketbaiws.eus/lroe-critcaja-pagos/")
  .GET(body)
  .addHeader("Accept", "application/json")
  .addHeader("Token", "xxx")
  .addHeader("Nif", "00000014Z")
  .build();
  
Response response = client.newCall(request).execute();
{ } Response JSON
HTTP/1.1 200 OK
{
    "body": {
        "result": "OK",
        "return": {
            "response": [
                {
                    "fecha_factura": "29\/11\/2023",
                    "fecha_pago": "30\/12\/2023",
                    "serie": "A",
                    "num_factura": "2023000699",
                    "importe_pagado": "100.00",
                    "iva_soportado": "21.00",
                    "iva_deducible": "21.00",
                    "forma_pago": "01",
                    "descripcion_fpago": "Transferencia",
                    "estado": "Correcto"
                },
                {
                    "fecha_factura": "29\/11\/2023",
                    "fecha_pago": "30\/12\/2023",
                    "serie": "A",
                    "num_factura": "2023000700",
                    "importe_pagado": "100.00",
                    "iva_soportado": "21.00",
                    "iva_deducible": "21.00",
                    "forma_pago": "01",
                    "descripcion_fpago": "Transferencia",
                    "estado": "Correcto"
                }
            ]
        },
        "msg": null
    },
    "status_code_header": "HTTP\/1.1 200 OK"
}

TicketBAI / Verifactu methods

Representation document

BATUZ BIZKAIA specific methods

SII (AEAT)

Customers and products (invoicing tool)

Other methods