Skip to main content
PUT
/
invoices
/
{invoice_id}
Actualizar factura
curl --request PUT \
  --url https://api.onepay.la/v1/invoices/{invoice_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "reference": "<string>",
  "provider_id": "<string>",
  "amount": 123,
  "name": "<string>",
  "description": "<string>",
  "phone": "<string>",
  "email": "<string>"
}
'
{
  "id": "2f2b1e5a-1a2b-4c33-8a18-5e9f3b9f4b1a",
  "name": "Internet plan - Actualizado",
  "description": "Factura de internet actualizada para octubre 2025",
  "provider": "biller",
  "provider_id": "987654",
  "reference": "INV-12345678",
  "status": "CREATED",
  "remarks": null,
  "created_at": "2025-10-20T15:06:00Z",
  "updated_at": "2025-10-20T15:06:00Z",
  "metadata": {
    "key": "value"
  },
  "payment": {
    "id": "new-payment-id",
    "title": "Internet plan - Actualizado",
    "description": "Internet plan - Actualizado",
    "currency": "COP",
    "amount": 75000,
    "amount_label": "75.000",
    "phone": "+573167591039",
    "external_id": "987654",
    "allows": { "accounts": true, "cards": true, "card_extra": false, "realtime": false },
    "status": "pending",
    "is_test": false,
    "payment_link": "https://pay.onepay.test/p/new-payment-id",
    "redirect_url": null,
    "created_at": "2025-10-20T15:25:00Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.onepay.la/llms.txt

Use this file to discover all available pages before exploring further.

Facturas con pagos parciales: Si la factura tiene un Payment en estado partially_paid, actualizarla cancelará ese Payment (y perderá todos los abonos registrados) y creará uno nuevo sin configuración de pagos parciales. Solo actualiza facturas parcialmente pagadas si estás seguro de que quieres reiniciar el proceso de cobro.Si el Payment ya está approved, la actualización solo modifica los metadatos de la factura sin cancelar ni reemplazar el Payment.

Path params

invoice_id
string
required
ID de la factura a actualizar. Crear factura.

Body

reference
string
required
Referencia única de la factura dentro de tu compañía. Mínimo 5 y máximo 100 caracteres.
provider_id
string
Identificador opcional que asocias a tu proveedor externo.
amount
number
required
Monto de la factura en pesos (COP). Debe estar entre 5.000 y 100.000.000.
name
string
required
Nombre o concepto de la factura. Mínimo 5 y máximo 100 caracteres.
description
string
Descripción detallada de la factura. Se propaga al nuevo Payment generado. Mínimo 4 y máximo 2000 caracteres.
phone
string
Número de teléfono del cliente en formato E.164. Opcional.
email
string
Correo electrónico del cliente. Opcional.

Response

{
  "id": "2f2b1e5a-1a2b-4c33-8a18-5e9f3b9f4b1a",
  "name": "Internet plan - Actualizado",
  "description": "Factura de internet actualizada para octubre 2025",
  "provider": "biller",
  "provider_id": "987654",
  "reference": "INV-12345678",
  "status": "CREATED",
  "remarks": null,
  "created_at": "2025-10-20T15:06:00Z",
  "updated_at": "2025-10-20T15:06:00Z",
  "metadata": {
    "key": "value"
  },
  "payment": {
    "id": "new-payment-id",
    "title": "Internet plan - Actualizado",
    "description": "Internet plan - Actualizado",
    "currency": "COP",
    "amount": 75000,
    "amount_label": "75.000",
    "phone": "+573167591039",
    "external_id": "987654",
    "allows": { "accounts": true, "cards": true, "card_extra": false, "realtime": false },
    "status": "pending",
    "is_test": false,
    "payment_link": "https://pay.onepay.test/p/new-payment-id",
    "redirect_url": null,
    "created_at": "2025-10-20T15:25:00Z"
  }
}