Skip to main content
POST
/
invoices
Crear factura
curl --request POST \
  --url https://api.onepay.la/v1/invoices \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-idempotency: <x-idempotency>' \
  --data '{
  "reference": "<string>",
  "provider_id": "<string>",
  "provider": "<string>",
  "amount": 123,
  "name": "<string>",
  "phone": "<string>",
  "email": "<string>",
  "document_url": "<string>",
  "metadata": {}
}'
{
  "id": "9da58912-101d-46f8-86c9-20a52119c0bf",
  "name": "Internet plan - Octubre",
  "provider": "biller",
  "provider_id": "987654",
  "reference": "1060500333",
  "status": "CREATED",
  "remarks": null,
  "created_at": "2025-10-20T15:06:00Z",
  "updated_at": "2025-10-20T15:06:00Z",
  "metadata": {
    "key": "value"
  },
  "payment": {
    "id": "c1f4b0aa-6a12-4471-8a3d-1a2b3c4d5e6f",
    "title": "Internet plan - Octubre",
    "description": "Internet plan - Octubre",
    "currency": "COP",
    "amount": 50000,
    "amount_label": "50.000",
    "phone": "+573167591030",
    "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/c1f4b0aa",
    "redirect_url": null,
    "created_at": "2025-10-20T15:06:00Z"
  }
}

Headers

x-idempotency
string
required
Token único para garantizar la idempotencia de la petición

Body

reference
string
required
Referencia de pago por la que el usuario puede interactuar con el portal de recaudo.
provider_id
string
Referencia unica que identifica la factura en tu sistema.
provider
string
required
Proveedor de la factura.
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.
phone
string
required
Número de teléfono del cliente en formato E.164.
email
string
required
Correo electrónico del cliente.
document_url
string
required
URL del documento adjunto.
metadata
object
Metadatos adicionales de la factura.

Response

{
  "id": "9da58912-101d-46f8-86c9-20a52119c0bf",
  "name": "Internet plan - Octubre",
  "provider": "biller",
  "provider_id": "987654",
  "reference": "1060500333",
  "status": "CREATED",
  "remarks": null,
  "created_at": "2025-10-20T15:06:00Z",
  "updated_at": "2025-10-20T15:06:00Z",
  "metadata": {
    "key": "value"
  },
  "payment": {
    "id": "c1f4b0aa-6a12-4471-8a3d-1a2b3c4d5e6f",
    "title": "Internet plan - Octubre",
    "description": "Internet plan - Octubre",
    "currency": "COP",
    "amount": 50000,
    "amount_label": "50.000",
    "phone": "+573167591030",
    "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/c1f4b0aa",
    "redirect_url": null,
    "created_at": "2025-10-20T15:06:00Z"
  }
}