API > LROE - Cash accounting - PAYMENTS - Cancel payments

LROE - Cash accounting - PAYMENTS - Cancel payments

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

IMPORTANT: This method is only valid for BATUZ Bizkaia. Lets you cancel payments that were previously sent to the Batuz LROE. This method is for companies or self-employed individuals under the special cash accounting scheme

PARAMETERS

ejercicio integer required
Fiscal year of the batch of payments, in yyyy format
2023
pagos object array required (max 1000) records
epigrafe string optional
For form 140 (self-employed individuals or entities without legal personality), if the IAE activity code differs from the main one predefined in the company profile
197210
fecha_pago string required
Date on which the payment was made, in dd/mm/yyyy format
13/11/2023
tipo_operacion string required for form 140
Payment for an operation with or without an invoice. Possible values:
con_factura , sin_factura
con_factura
nif string required
NIF (Spanish tax ID) of the invoice issuer
B01000012
pais string optional
Two-letter country code of the invoice issuer if the supplier's tax ID is foreign (ISO-3166 Alpha-2 code format)
ES
tipo_documento string optional
Type of identification document of a foreign supplier (when pais is not ES). Defaults to 02.
Possible values:
02 => VAT ID (NIF-IVA)
03 => Passport
04 => Official identity document issued by the country or territory of residence,
05 => Certificate of residence
06 => Other supporting document
02
nombre_social string required
Company name of the supplier issuing the invoice
Empresa de ejemplo S.L.
serie string optional for operations WITH invoice
Series of the invoice issuer
A
num_factura string required for operations WITH invoice or form 240
Number of the invoice the payment relates to
2300017
fecha_factura string required for operations WITH invoice or form 240
Date of the invoice for the payment, in dd/mm/yyyy format
13/11/2023
concepto enum required for operations WITHOUT invoice and form 140
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
600
fecha_operacion string required for operations WITHOUT invoice and form 140
Date of the operation without invoice (that of the registered expense entry) in dd/mm/yyyy format
13/11/2023
linea integer required for operations WITHOUT invoice and form 140
Sequence number identifying the expense entry
1


DEL https://{entorno}.ticketbaiws.eus/lroe-critcaja-pagos/
$ curl --request DELETE \
     --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,
    "pagos": [
        {
            "nombre_social": "Berein Internet S.L.",
            "nif": "B01489350",
            "fecha_factura": "29\/11\/2023",
            "fecha_pago": "30\/12\/2023",
            "serie": "A",
            "num_factura": "2023000699",
            "importe_pagado": 100
        }
    ]
}'
$ 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()->anular([
    'ejercicio' => 2023,
    'pagos'     => [
        ['nombre_social' => 'Berein Internet S.L.', 'nif' => 'B01489350', 'fecha_factura' => '29/11/2023', 'fecha_pago' => '30/12/2023', 'serie' => 'A', 'num_factura' => '2023000699', 'importe_pagado' => 100],
    ],
]);

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,
    "pagos": [
        {
            "nombre_social": "Berein Internet S.L.",
            "nif": "B01489350",
            "fecha_factura": "29\/11\/2023",
            "fecha_pago": "30\/12\/2023",
            "serie": "A",
            "num_factura": "2023000699",
            "importe_pagado": 100
        }
    ]
}

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

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

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
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_delFIELDS, '{"ejercicio": 2023,"pagos": [{"nombre_social": "Berein Internet S.L.","nif": "B01489350","fecha_factura": "29\/11\/2023","fecha_pago": "30\/12\/2023","serie": "A","num_factura": "2023000699","importe_pagado": 100}]}');

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

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{"ejercicio": 2023,"pagos": [{"nombre_social": "Berein Internet S.L.","nif": "B01489350","fecha_factura": "29\/11\/2023","fecha_pago": "30\/12\/2023","serie": "A","num_factura": "2023000699","importe_pagado": 100}]}');

Request request = new Request.Builder()
  .url("https://api-test.ticketbaiws.eus/lroe-critcaja-pagos/")
  .delete(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
{
    "result": "OK",
    "return": {
        "response": [
            {
                "fecha_factura": "29-11-2023",
                "fecha_pago": "04-12-2023",
                "serie": "A",
                "num_factura": "2023000699",
                "estado": "Correcto"
            }
        ],
        "status": "OK"
    },
    "msg": null
}

TicketBAI / Verifactu methods

Representation document

BATUZ BIZKAIA specific methods

SII (AEAT)

Customers and products (invoicing tool)

Other methods