## 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. Ejemplo: `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. Ejemplo: `197210`
  - `fecha_pago` (string, required): Date on which the payment was made, in dd/mm/yyyy format. Ejemplo: `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**. Ejemplo: `con_factura`
  - `nif` (string, required): NIF (Spanish tax ID) of the invoice issuer. Ejemplo: `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) Ejemplo: `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. Ejemplo: `02`
  - `nombre_social` (string, required): Company name of the supplier issuing the invoice. Ejemplo: `Empresa de ejemplo S.L.`
  - `serie` (string, optional for operations WITH invoice): Series of the invoice issuer. Ejemplo: `A`
  - `num_factura` (string, required for operations WITH invoice): Number of the invoice the payment relates to. Ejemplo: `2300017`
  - `fecha_factura` (string, required for operations WITH invoice): Date of the invoice for the payment, in dd/mm/yyyy format. Ejemplo: `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. Ejemplo: `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. Ejemplo: `13/11/2023`
  - `linea` (integer, required for operations WITHOUT invoice and form 140): Sequence number identifying the expense entry. Ejemplo: `1`
  - `importe_pagado` (float, required): Amount paid. Ejemplo: `1210.00`
  - `iva_soportado` (float, optional): Amount of input VAT. Ejemplo: `210.00`
  - `iva_deducible` (float, optional): Deductible VAT amount. Ejemplo: `210.00`
  - `gasto_irpf` (float, optional for form 140): Expense to be allocated for IRPF (personal income tax) Ejemplo: `1000.00`
  - `forma_pago` (enum, optional): Payment method used. Options:
    **01**  - Bank transfer
    **02**  - Check
    **03**  - Not collected / paid (accrual deadline / forced accrual in insolvency proceedings)
    **04**  - Other means of collection or payment
    **05**  - Direct debit. Ejemplo: `04`
  - `descripcion_fpago` (string, optional): Description of the payment method. Ejemplo: `Paypal`

**PUT** `https://{entorno}.ticketbaiws.eus/lroe-critcaja-pagos/`

```bash
$ 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"
        }
    ]
}'
```

Respuesta:

```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
}
```

Fuente: https://ticketbaiws.eus/en/lroe-critcaja-pagos-put/
