Obtener factura
curl --request GET \
--url https://api.onepay.la/v1/invoices/{invoice_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onepay.la/v1/invoices/{invoice_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.onepay.la/v1/invoices/{invoice_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onepay.la/v1/invoices/{invoice_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.onepay.la/v1/invoices/{invoice_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.onepay.la/v1/invoices/{invoice_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onepay.la/v1/invoices/{invoice_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "2f2b1e5a-1a2b-4c33-8a18-5e9f3b9f4b1a",
"name": "Internet plan - Octubre",
"amount": 50000,
"provider": "biller",
"provider_id": "987654",
"reference": "INV-12345678",
"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": "+573167591038",
"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
}
}
{
"id": "2f2b1e5a-1a2b-4c33-8a18-5e9f3b9f4b1a",
"name": "Internet plan - Octubre",
"amount": 50000,
"provider": "biller",
"provider_id": "987654",
"reference": "INV-12345678",
"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": {
"min_amount_in_cents": 1000000,
"max_amount_in_cents": null,
"max_payment_methods": 3,
"timeout_hours": 24
},
"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": "+573167591038",
"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": "partially_paid",
"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,
"partial_payment": {
"total_paid_in_cents": 1000000,
"total_paid_label": "$ 10.000",
"remaining_amount_in_cents": 4000000,
"remaining_label": "$ 40.000",
"progress_percentage": 20.0,
"is_fully_paid": false,
"min_amount_in_cents": 1000000,
"max_amount_in_cents": null,
"max_payment_methods": 3,
"timeout_hours": 24,
"partial_expires_at": "2025-10-21T15:06:00+00:00",
"charges": [
{
"id": "3f8b7a21-1d4a-4d2e-8f1a-17e2f1e6b9ab",
"amount_in_cents": 1000000,
"amount_label": "$ 10.000",
"payment_method_type": "account",
"payment_method": "PSE - Bancolombia",
"paid_at": "2025-10-20T16:00:00+00:00"
}
]
}
}
}
Obtener factura
Devuelve el detalle de una factura, incluyendo el Payment asociado.
GET
/
invoices
/
{invoice_id}
Obtener factura
curl --request GET \
--url https://api.onepay.la/v1/invoices/{invoice_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onepay.la/v1/invoices/{invoice_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.onepay.la/v1/invoices/{invoice_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onepay.la/v1/invoices/{invoice_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.onepay.la/v1/invoices/{invoice_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.onepay.la/v1/invoices/{invoice_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onepay.la/v1/invoices/{invoice_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "2f2b1e5a-1a2b-4c33-8a18-5e9f3b9f4b1a",
"name": "Internet plan - Octubre",
"amount": 50000,
"provider": "biller",
"provider_id": "987654",
"reference": "INV-12345678",
"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": "+573167591038",
"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
}
}
{
"id": "2f2b1e5a-1a2b-4c33-8a18-5e9f3b9f4b1a",
"name": "Internet plan - Octubre",
"amount": 50000,
"provider": "biller",
"provider_id": "987654",
"reference": "INV-12345678",
"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": {
"min_amount_in_cents": 1000000,
"max_amount_in_cents": null,
"max_payment_methods": 3,
"timeout_hours": 24
},
"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": "+573167591038",
"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": "partially_paid",
"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,
"partial_payment": {
"total_paid_in_cents": 1000000,
"total_paid_label": "$ 10.000",
"remaining_amount_in_cents": 4000000,
"remaining_label": "$ 40.000",
"progress_percentage": 20.0,
"is_fully_paid": false,
"min_amount_in_cents": 1000000,
"max_amount_in_cents": null,
"max_payment_methods": 3,
"timeout_hours": 24,
"partial_expires_at": "2025-10-21T15:06:00+00:00",
"charges": [
{
"id": "3f8b7a21-1d4a-4d2e-8f1a-17e2f1e6b9ab",
"amount_in_cents": 1000000,
"amount_label": "$ 10.000",
"payment_method_type": "account",
"payment_method": "PSE - Bancolombia",
"paid_at": "2025-10-20T16:00:00+00:00"
}
]
}
}
}
Path params
string
required
ID de la factura creada previamente. Ver cómo crear una factura.
Response
string
Identificador único de la factura
string
Nombre o concepto de la factura
number
Monto de la factura en pesos
string
Proveedor de la factura (ej:
"biller")string
ID de la factura en tu sistema
string
Referencia de pago de la factura
string
Estado de la factura:
CREATED, PAID, FAILED, CANCELLEDstring
Notas o comentarios adicionales
object
Metadatos adicionales de la factura
string
Fecha de vencimiento de la factura (ISO 8601)
string
Fecha de creación (ISO 8601)
string
Fecha de última actualización (ISO 8601)
string
ID del cobro asociado a esta factura
boolean
Indica si la factura fue creada en modo prueba
object
object
Cobro asociado a la factura (objeto completo
PaymentJsonResource). Ver crear cobro para detalle de campos.Response Example
{
"id": "2f2b1e5a-1a2b-4c33-8a18-5e9f3b9f4b1a",
"name": "Internet plan - Octubre",
"amount": 50000,
"provider": "biller",
"provider_id": "987654",
"reference": "INV-12345678",
"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": "+573167591038",
"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
}
}
{
"id": "2f2b1e5a-1a2b-4c33-8a18-5e9f3b9f4b1a",
"name": "Internet plan - Octubre",
"amount": 50000,
"provider": "biller",
"provider_id": "987654",
"reference": "INV-12345678",
"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": {
"min_amount_in_cents": 1000000,
"max_amount_in_cents": null,
"max_payment_methods": 3,
"timeout_hours": 24
},
"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": "+573167591038",
"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": "partially_paid",
"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,
"partial_payment": {
"total_paid_in_cents": 1000000,
"total_paid_label": "$ 10.000",
"remaining_amount_in_cents": 4000000,
"remaining_label": "$ 40.000",
"progress_percentage": 20.0,
"is_fully_paid": false,
"min_amount_in_cents": 1000000,
"max_amount_in_cents": null,
"max_payment_methods": 3,
"timeout_hours": 24,
"partial_expires_at": "2025-10-21T15:06:00+00:00",
"charges": [
{
"id": "3f8b7a21-1d4a-4d2e-8f1a-17e2f1e6b9ab",
"amount_in_cents": 1000000,
"amount_label": "$ 10.000",
"payment_method_type": "account",
"payment_method": "PSE - Bancolombia",
"paid_at": "2025-10-20T16:00:00+00:00"
}
]
}
}
}
- 401 Unauthorized: token ausente o inválido.
- 403 Forbidden: compañía inactiva o sin permisos.
- 404 Not Found: la factura no existe o pertenece a otra compañía.
Was this page helpful?
⌘I