API > LROE - Cash accounting - PAYMENTS - Modify payments
LROE - Cash accounting - PAYMENTS - Modify payments
PUT https://{entorno}.ticketbaiws.eus/lroe-critcaja-pagos/
IMPORTANT: This method is only valid for BATUZ Bizkaia. Lets you modify payments 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
| |||||||||||||||||||||||||||||||||||||||
PUT https://{entorno}.ticketbaiws.eus/lroe-critcaja-pagos/
$ curl --request PUT \
--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,
"iva_soportado": 21,
"iva_deducible": 21,
"forma_pago": "01",
"descripcion_fpago": "Transferencia"
},
{
"nombre_social": "Berein Internet S.L.",
"nif": "B01489350",
"fecha_factura": "29\/11\/2023",
"fecha_pago": "30\/12\/2023",
"serie": "A",
"num_factura": "2023000700",
"importe_pagado": 100,
"iva_soportado": 21,
"iva_deducible": 21,
"forma_pago": "01",
"descripcion_fpago": "Transferencia"
}
]
}'
$ 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()->modificar([
'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, 'iva_soportado' => 21, 'iva_deducible' => 21, 'forma_pago' => '01', 'descripcion_fpago' => 'Transferencia'],
['nombre_social' => 'Berein Internet S.L.', 'nif' => 'B01489350', 'fecha_factura' => '29/11/2023', 'fecha_pago' => '30/12/2023', 'serie' => 'A', 'num_factura' => '2023000700', 'importe_pagado' => 100, 'iva_soportado' => 21, 'iva_deducible' => 21, 'forma_pago' => '01', 'descripcion_fpago' => 'Transferencia'],
],
]);
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,
"iva_soportado": 21,
"iva_deducible": 21,
"forma_pago": "01",
"descripcion_fpago": "Transferencia"
},
{
"nombre_social": "Berein Internet S.L.",
"nif": "B01489350",
"fecha_factura": "29\/11\/2023",
"fecha_pago": "30\/12\/2023",
"serie": "A",
"num_factura": "2023000700",
"importe_pagado": 100,
"iva_soportado": 21,
"iva_deducible": 21,
"forma_pago": "01",
"descripcion_fpago": "Transferencia"
}
]
}
headers = {"Accept": "application/json", "Token" : "xxx", "Nif" : "00000014Z"}
response = requests.request("PUT", url, json=payload, headers=headers)
print(response.text)
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
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_POSTFIELDS, '{"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,"iva_soportado": 21,"iva_deducible": 21,"forma_pago": "01","descripcion_fpago": "Transferencia"},{"nombre_social": "Berein Internet S.L.","nif": "B01489350","fecha_factura": "29\/11\/2023","fecha_pago": "30\/12\/2023","serie": "A","num_factura": "2023000700","importe_pagado": 100,"iva_soportado": 21,"iva_deducible": 21,"forma_pago": "01","descripcion_fpago": "Transferencia"}]}');
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,"iva_soportado": 21,"iva_deducible": 21,"forma_pago": "01","descripcion_fpago": "Transferencia"},{"nombre_social": "Berein Internet S.L.","nif": "B01489350","fecha_factura": "29\/11\/2023","fecha_pago": "30\/12\/2023","serie": "A","num_factura": "2023000700","importe_pagado": 100,"iva_soportado": 21,"iva_deducible": 21,"forma_pago": "01","descripcion_fpago": "Transferencia"}]}');
Request request = new Request.Builder()
.url("https://api-test.ticketbaiws.eus/lroe-critcaja-pagos/")
.put(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"
},
{
"fecha_factura": "29-11-2023",
"fecha_pago": "05-12-2023",
"serie": "A",
"num_factura": "2023000699",
"estado": "Correcto"
}
],
"status": "OK"
},
"msg": null
}
TicketBAI / Verifactu methods
- POST New invoice / resubmission (zuzendu) TicketBAI / Verifactu
- POST Complete a simplified invoice
- GET Get a TicketBAI / Verifactu invoice
- GET List TicketBAI / Verifactu invoices
- GET Download TicketBAI / Verifactu XML
- GET Download invoice in FacturaE format
- GET Download invoice as PDF
- GET System status
- DEL Cancel a TicketBAI / Verifactu invoice
- PUT Force TicketBAI / Verifactu resend
- POST Validate a NIF with the AEAT
- POST Validate a VAT number in VIES
Representation document
- GET Representation document - Download template
- POST Representation document - Upload document
- GET Representation document - Download uploaded document
- DELETE Representation document - Revoke uploaded document
BATUZ BIZKAIA specific methods
- GET List IAE activity codes
- POST LROE - Received invoices - Submit (BATUZ)
- PUT LROE - Received invoices - Update (BATUZ)
- GET LROE - Received invoices - Query (BATUZ)
- DEL LROE - Received invoices - Cancel (BATUZ)
- POST LROE - Expenses without invoice - Submit (BATUZ, form 140)
- PUT LROE - Expenses without invoice - Update (BATUZ, form 140)
- GET LROE - Expenses without invoice - Query (BATUZ, form 140)
- DEL LROE - Expenses without invoice - Cancel (BATUZ, form 140)
- POST LROE - Cash accounting COLLECTIONS - Submit (BATUZ)
- PUT LROE - Cash accounting COLLECTIONS - Update (BATUZ)
- GET LROE - Cash accounting COLLECTIONS - Query (BATUZ)
- DEL LROE - Cash accounting COLLECTIONS - Cancel (BATUZ)
- POST LROE - Cash accounting PAYMENTS - Submit (BATUZ)
- PUT LROE - Cash accounting PAYMENTS - Update (BATUZ)
- GET LROE - Cash accounting PAYMENTS - Query (BATUZ)
- DEL LROE - Cash accounting PAYMENTS - Cancel (BATUZ)
SII (AEAT)
Customers and products (invoicing tool)
- GET Customers - Search / get customers
- POST Customers - New customer
- PUT Customers - Update customer
- GET Products - Search / get products
