curl https://api.onepay.la/v1/invoices \
-X POST \
-H "Authorization: Bearer sk_test_xxx" \
-H "Content-Type: application/json" \
-H "x-idempotency: invoice-001" \
-d '{
"reference": "1060500333",
"provider_id": "987654",
"provider": "biller",
"amount": 50000,
"name": "Internet plan - Octubre",
"phone": "+573167591030",
"email": "cliente@ejemplo.com",
"due_date": "2025-10-20",
"document_url": "https://example.com/document.pdf",
"metadata": {
"key": "value"
}
}'
{
"id": "9da58912-101d-46f8-86c9-20a52119c0bf",
"name": "Internet plan - Octubre",
"amount": 50000,
"provider": "biller",
"provider_id": "987654",
"reference": "1060500333",
"status": "CREATED",
"remarks": null,
"metadata": { "key": "value" },
"due_date": null,
"created_at": "2025-10-20T15:06:00.000000Z",
"updated_at": "2025-10-20T15:06:00.000000Z",
"payment_id": "c1f4b0aa-6a12-4471-8a3d-1a2b3c4d5e6f",
"is_test": false,
"partial_payment_config": null,
"payment": {
"id": "c1f4b0aa-6a12-4471-8a3d-1a2b3c4d5e6f",
"source": "Internet plan - Octubre",
"currency": "COP",
"amount": 50000,
"amount_label": "$ 50.000",
"title": "Internet plan - Octubre",
"description": "Internet plan - Octubre",
"phone": "+573167591030",
"expiration_at": null,
"due_date": null,
"document_link": "https://example.com/document.pdf",
"external_id": "987654",
"allows": { "accounts": true, "cards": true, "card_extra": false, "realtime": false },
"status": "pending",
"is_test": false,
"created_at": "2025-10-20T15:06:00.000000Z",
"paid_at": null,
"payment_link": "https://pagos.onepay.la/payment/c1f4b0aa-6a12-4471-8a3d-1a2b3c4d5e6f",
"redirect_url": null,
"provider_id": null,
"metadata": null,
"customer": null,
"method": null,
"splits": [],
"company": null,
"commission": null
}
}
Crea una nueva factura y su Payment asociado.
curl https://api.onepay.la/v1/invoices \
-X POST \
-H "Authorization: Bearer sk_test_xxx" \
-H "Content-Type: application/json" \
-H "x-idempotency: invoice-001" \
-d '{
"reference": "1060500333",
"provider_id": "987654",
"provider": "biller",
"amount": 50000,
"name": "Internet plan - Octubre",
"phone": "+573167591030",
"email": "cliente@ejemplo.com",
"due_date": "2025-10-20",
"document_url": "https://example.com/document.pdf",
"metadata": {
"key": "value"
}
}'
{
"id": "9da58912-101d-46f8-86c9-20a52119c0bf",
"name": "Internet plan - Octubre",
"amount": 50000,
"provider": "biller",
"provider_id": "987654",
"reference": "1060500333",
"status": "CREATED",
"remarks": null,
"metadata": { "key": "value" },
"due_date": null,
"created_at": "2025-10-20T15:06:00.000000Z",
"updated_at": "2025-10-20T15:06:00.000000Z",
"payment_id": "c1f4b0aa-6a12-4471-8a3d-1a2b3c4d5e6f",
"is_test": false,
"partial_payment_config": null,
"payment": {
"id": "c1f4b0aa-6a12-4471-8a3d-1a2b3c4d5e6f",
"source": "Internet plan - Octubre",
"currency": "COP",
"amount": 50000,
"amount_label": "$ 50.000",
"title": "Internet plan - Octubre",
"description": "Internet plan - Octubre",
"phone": "+573167591030",
"expiration_at": null,
"due_date": null,
"document_link": "https://example.com/document.pdf",
"external_id": "987654",
"allows": { "accounts": true, "cards": true, "card_extra": false, "realtime": false },
"status": "pending",
"is_test": false,
"created_at": "2025-10-20T15:06:00.000000Z",
"paid_at": null,
"payment_link": "https://pagos.onepay.la/payment/c1f4b0aa-6a12-4471-8a3d-1a2b3c4d5e6f",
"redirect_url": null,
"provider_id": null,
"metadata": null,
"customer": null,
"method": null,
"splits": [],
"company": null,
"commission": null
}
}
Show Propiedades
min_amount. Si no se envía, el máximo es el saldo restante.curl https://api.onepay.la/v1/invoices \
-X POST \
-H "Authorization: Bearer sk_test_xxx" \
-H "Content-Type: application/json" \
-H "x-idempotency: invoice-001" \
-d '{
"reference": "1060500333",
"provider_id": "987654",
"provider": "biller",
"amount": 50000,
"name": "Internet plan - Octubre",
"phone": "+573167591030",
"email": "cliente@ejemplo.com",
"due_date": "2025-10-20",
"document_url": "https://example.com/document.pdf",
"metadata": {
"key": "value"
}
}'
{
"id": "9da58912-101d-46f8-86c9-20a52119c0bf",
"name": "Internet plan - Octubre",
"amount": 50000,
"provider": "biller",
"provider_id": "987654",
"reference": "1060500333",
"status": "CREATED",
"remarks": null,
"metadata": { "key": "value" },
"due_date": null,
"created_at": "2025-10-20T15:06:00.000000Z",
"updated_at": "2025-10-20T15:06:00.000000Z",
"payment_id": "c1f4b0aa-6a12-4471-8a3d-1a2b3c4d5e6f",
"is_test": false,
"partial_payment_config": null,
"payment": {
"id": "c1f4b0aa-6a12-4471-8a3d-1a2b3c4d5e6f",
"source": "Internet plan - Octubre",
"currency": "COP",
"amount": 50000,
"amount_label": "$ 50.000",
"title": "Internet plan - Octubre",
"description": "Internet plan - Octubre",
"phone": "+573167591030",
"expiration_at": null,
"due_date": null,
"document_link": "https://example.com/document.pdf",
"external_id": "987654",
"allows": { "accounts": true, "cards": true, "card_extra": false, "realtime": false },
"status": "pending",
"is_test": false,
"created_at": "2025-10-20T15:06:00.000000Z",
"paid_at": null,
"payment_link": "https://pagos.onepay.la/payment/c1f4b0aa-6a12-4471-8a3d-1a2b3c4d5e6f",
"redirect_url": null,
"provider_id": null,
"metadata": null,
"customer": null,
"method": null,
"splits": [],
"company": null,
"commission": null
}
}
Was this page helpful?