curl https://api.onepay.la/v1/payments/9e5ccd4a-d2f0-49dd-87fc-a0da752bd166 \
-H "Authorization: Bearer sk_test_xxx"
const paymentId = '9e5ccd4a-d2f0-49dd-87fc-a0da752bd166';
const response = await fetch(`https://api.onepay.la/v1/payments/${paymentId}`, {
method: 'GET',
headers: {
'Authorization': 'Bearer sk_test_xxx'
}
});
const payment = await response.json();
console.log(payment.status); // Estado del cobro
console.log(payment.payment_link); // Link de pago
import requests
payment_id = "9e5ccd4a-d2f0-49dd-87fc-a0da752bd166"
url = f"https://api.onepay.la/v1/payments/{payment_id}"
headers = {
"Authorization": "Bearer sk_test_xxx"
}
response = requests.get(url, headers=headers)
payment = response.json()
print(payment["status"]) # Estado del cobro
print(payment["payment_link"]) # Link de pago
<?php
$paymentId = "9e5ccd4a-d2f0-49dd-87fc-a0da752bd166";
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://api.onepay.la/v1/payments/{$paymentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer sk_test_xxx"
]
]);
$response = curl_exec($ch);
$payment = json_decode($response, true);
echo $payment["status"]; // Estado del cobro
echo $payment["payment_link"]; // Link de pago
curl_close($ch);
?>
{
"id": "9bf2bc44-28d4-4693-9896-7fc1fe1f5b65",
"source": "Factura Movistar Noviembre",
"currency": "COP",
"amount": 63040,
"amount_label": "$ 63.040",
"title": "Factura Movistar Noviembre",
"description": "Factura Movistar Noviembre",
"phone": "+573138977841",
"expiration_at": "2024-05-03T16:47:09.000000Z",
"due_date": null,
"document_link": null,
"external_id": null,
"allows": {
"cards": true,
"accounts": true,
"card_extra": false,
"realtime": false,
"pse": true,
"transfiya": true
},
"status": "approved",
"is_test": false,
"created_at": "2024-05-02T16:47:09.000000Z",
"paid_at": "2024-05-02T18:00:00.000000Z",
"payment_link": null,
"redirect_url": null,
"provider_id": null,
"metadata": null,
"customer": {
"id": "4e5f6a7b-8c9d-0e1f-2345-6789abcdef01",
"first_name": "Juan",
"last_name": "Demo",
"email": "hola@onepay.la",
"phone": "+573167591039",
"document_type": "CC",
"document_number": "1234567890",
"created_at": "2024-04-01T10:00:00.000000Z",
"is_test": false
},
"method": null,
"splits": [],
"company": null,
"commission": null
}
{
"id": "9e5ccd4a-d2f0-49dd-87fc-a0da752bd166",
"source": "Suscripción Premium",
"currency": "COP",
"amount": 500000,
"amount_label": "$ 500.000",
"title": "Suscripción Premium",
"description": null,
"phone": "+573201112233",
"expiration_at": "2025-04-20T22:36:24.000000Z",
"due_date": null,
"document_link": null,
"external_id": null,
"allows": {
"cards": true,
"accounts": true,
"card_extra": false,
"realtime": false,
"pse": true,
"transfiya": true
},
"status": "partially_paid",
"is_test": false,
"created_at": "2025-04-15T10:00:00.000000Z",
"paid_at": null,
"payment_link": "https://pagos.onepay.la/payment/9e5ccd4a-d2f0-49dd-87fc-a0da752bd166",
"redirect_url": null,
"provider_id": null,
"metadata": null,
"customer": null,
"method": null,
"splits": [],
"company": null,
"commission": null,
"partial_payment": {
"total_paid_in_cents": 20000000,
"total_paid_label": "$ 200.000",
"remaining_amount_in_cents": 30000000,
"remaining_label": "$ 300.000",
"progress_percentage": 40.0,
"is_fully_paid": false,
"min_amount_in_cents": 5000000,
"max_amount_in_cents": null,
"max_payment_methods": 3,
"timeout_hours": 24,
"partial_expires_at": "2025-04-16T10:00:00+00:00",
"charges": [
{
"id": "3f8b7a21-1d4a-4d2e-8f1a-17e2f1e6b9ab",
"amount_in_cents": 20000000,
"amount_label": "$ 200.000",
"payment_method_type": "account",
"payment_method": "PSE - Bancolombia",
"paid_at": "2025-04-15T10:30:00+00:00"
}
]
}
}
Ver cobro
Este endpoint te permite obtener el detalle de un cobro.
GET
/
payments
/
{payment_id}
curl https://api.onepay.la/v1/payments/9e5ccd4a-d2f0-49dd-87fc-a0da752bd166 \
-H "Authorization: Bearer sk_test_xxx"
const paymentId = '9e5ccd4a-d2f0-49dd-87fc-a0da752bd166';
const response = await fetch(`https://api.onepay.la/v1/payments/${paymentId}`, {
method: 'GET',
headers: {
'Authorization': 'Bearer sk_test_xxx'
}
});
const payment = await response.json();
console.log(payment.status); // Estado del cobro
console.log(payment.payment_link); // Link de pago
import requests
payment_id = "9e5ccd4a-d2f0-49dd-87fc-a0da752bd166"
url = f"https://api.onepay.la/v1/payments/{payment_id}"
headers = {
"Authorization": "Bearer sk_test_xxx"
}
response = requests.get(url, headers=headers)
payment = response.json()
print(payment["status"]) # Estado del cobro
print(payment["payment_link"]) # Link de pago
<?php
$paymentId = "9e5ccd4a-d2f0-49dd-87fc-a0da752bd166";
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://api.onepay.la/v1/payments/{$paymentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer sk_test_xxx"
]
]);
$response = curl_exec($ch);
$payment = json_decode($response, true);
echo $payment["status"]; // Estado del cobro
echo $payment["payment_link"]; // Link de pago
curl_close($ch);
?>
{
"id": "9bf2bc44-28d4-4693-9896-7fc1fe1f5b65",
"source": "Factura Movistar Noviembre",
"currency": "COP",
"amount": 63040,
"amount_label": "$ 63.040",
"title": "Factura Movistar Noviembre",
"description": "Factura Movistar Noviembre",
"phone": "+573138977841",
"expiration_at": "2024-05-03T16:47:09.000000Z",
"due_date": null,
"document_link": null,
"external_id": null,
"allows": {
"cards": true,
"accounts": true,
"card_extra": false,
"realtime": false,
"pse": true,
"transfiya": true
},
"status": "approved",
"is_test": false,
"created_at": "2024-05-02T16:47:09.000000Z",
"paid_at": "2024-05-02T18:00:00.000000Z",
"payment_link": null,
"redirect_url": null,
"provider_id": null,
"metadata": null,
"customer": {
"id": "4e5f6a7b-8c9d-0e1f-2345-6789abcdef01",
"first_name": "Juan",
"last_name": "Demo",
"email": "hola@onepay.la",
"phone": "+573167591039",
"document_type": "CC",
"document_number": "1234567890",
"created_at": "2024-04-01T10:00:00.000000Z",
"is_test": false
},
"method": null,
"splits": [],
"company": null,
"commission": null
}
{
"id": "9e5ccd4a-d2f0-49dd-87fc-a0da752bd166",
"source": "Suscripción Premium",
"currency": "COP",
"amount": 500000,
"amount_label": "$ 500.000",
"title": "Suscripción Premium",
"description": null,
"phone": "+573201112233",
"expiration_at": "2025-04-20T22:36:24.000000Z",
"due_date": null,
"document_link": null,
"external_id": null,
"allows": {
"cards": true,
"accounts": true,
"card_extra": false,
"realtime": false,
"pse": true,
"transfiya": true
},
"status": "partially_paid",
"is_test": false,
"created_at": "2025-04-15T10:00:00.000000Z",
"paid_at": null,
"payment_link": "https://pagos.onepay.la/payment/9e5ccd4a-d2f0-49dd-87fc-a0da752bd166",
"redirect_url": null,
"provider_id": null,
"metadata": null,
"customer": null,
"method": null,
"splits": [],
"company": null,
"commission": null,
"partial_payment": {
"total_paid_in_cents": 20000000,
"total_paid_label": "$ 200.000",
"remaining_amount_in_cents": 30000000,
"remaining_label": "$ 300.000",
"progress_percentage": 40.0,
"is_fully_paid": false,
"min_amount_in_cents": 5000000,
"max_amount_in_cents": null,
"max_payment_methods": 3,
"timeout_hours": 24,
"partial_expires_at": "2025-04-16T10:00:00+00:00",
"charges": [
{
"id": "3f8b7a21-1d4a-4d2e-8f1a-17e2f1e6b9ab",
"amount_in_cents": 20000000,
"amount_label": "$ 200.000",
"payment_method_type": "account",
"payment_method": "PSE - Bancolombia",
"paid_at": "2025-04-15T10:30:00+00:00"
}
]
}
}
string
required
ID del cobro creado previamente. Ver cómo crear un cobro.
curl https://api.onepay.la/v1/payments/9e5ccd4a-d2f0-49dd-87fc-a0da752bd166 \
-H "Authorization: Bearer sk_test_xxx"
const paymentId = '9e5ccd4a-d2f0-49dd-87fc-a0da752bd166';
const response = await fetch(`https://api.onepay.la/v1/payments/${paymentId}`, {
method: 'GET',
headers: {
'Authorization': 'Bearer sk_test_xxx'
}
});
const payment = await response.json();
console.log(payment.status); // Estado del cobro
console.log(payment.payment_link); // Link de pago
import requests
payment_id = "9e5ccd4a-d2f0-49dd-87fc-a0da752bd166"
url = f"https://api.onepay.la/v1/payments/{payment_id}"
headers = {
"Authorization": "Bearer sk_test_xxx"
}
response = requests.get(url, headers=headers)
payment = response.json()
print(payment["status"]) # Estado del cobro
print(payment["payment_link"]) # Link de pago
<?php
$paymentId = "9e5ccd4a-d2f0-49dd-87fc-a0da752bd166";
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://api.onepay.la/v1/payments/{$paymentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer sk_test_xxx"
]
]);
$response = curl_exec($ch);
$payment = json_decode($response, true);
echo $payment["status"]; // Estado del cobro
echo $payment["payment_link"]; // Link de pago
curl_close($ch);
?>
Response
string
Identificador único del cobro
string
Título del cobro (mismo valor que
title)string
Código de moneda ISO (ej:
COP)number
Monto del cobro en pesos
string
Monto formateado (ej:
"$ 1.400.000")string
Título del cobro
string
Descripción del cobro
string
Número de teléfono del cliente
string
Fecha de expiración del cobro (ISO 8601)
string
Fecha de vencimiento (ISO 8601)
string
URL del documento adjunto
string
ID externo del cobro en tu sistema
object
Métodos de pago habilitados para este cobro
string
Estado actual del cobro:
pending, approved, declined, cancelled, expired, in_progress, refunded, partially_paid, partial_expiredboolean
Indica si el cobro fue creado en modo prueba
string
Fecha de creación (ISO 8601)
string
Fecha de pago (ISO 8601).
null si aún no ha sido pagado.string
URL del link de pago
string
URL de redirección tras el pago
string
ID del proveedor de pago
object
Metadatos adicionales del cobro
object
Datos del cliente que realizó el pago.
null si aún no ha pagado.object
Método de pago utilizado.
null si aún no ha pagado.array
Reglas de split aplicadas al cobro
object
Datos de la empresa. Presente cuando se consulta con credenciales que incluyen la empresa.
object
Comisión aplicada.
null si no aplica.object
Información de pago parcial. Solo presente cuando el cobro tiene
partial_payment_config configurado. Ver crear cobro para detalle de campos.Response Example
{
"id": "9bf2bc44-28d4-4693-9896-7fc1fe1f5b65",
"source": "Factura Movistar Noviembre",
"currency": "COP",
"amount": 63040,
"amount_label": "$ 63.040",
"title": "Factura Movistar Noviembre",
"description": "Factura Movistar Noviembre",
"phone": "+573138977841",
"expiration_at": "2024-05-03T16:47:09.000000Z",
"due_date": null,
"document_link": null,
"external_id": null,
"allows": {
"cards": true,
"accounts": true,
"card_extra": false,
"realtime": false,
"pse": true,
"transfiya": true
},
"status": "approved",
"is_test": false,
"created_at": "2024-05-02T16:47:09.000000Z",
"paid_at": "2024-05-02T18:00:00.000000Z",
"payment_link": null,
"redirect_url": null,
"provider_id": null,
"metadata": null,
"customer": {
"id": "4e5f6a7b-8c9d-0e1f-2345-6789abcdef01",
"first_name": "Juan",
"last_name": "Demo",
"email": "hola@onepay.la",
"phone": "+573167591039",
"document_type": "CC",
"document_number": "1234567890",
"created_at": "2024-04-01T10:00:00.000000Z",
"is_test": false
},
"method": null,
"splits": [],
"company": null,
"commission": null
}
{
"id": "9e5ccd4a-d2f0-49dd-87fc-a0da752bd166",
"source": "Suscripción Premium",
"currency": "COP",
"amount": 500000,
"amount_label": "$ 500.000",
"title": "Suscripción Premium",
"description": null,
"phone": "+573201112233",
"expiration_at": "2025-04-20T22:36:24.000000Z",
"due_date": null,
"document_link": null,
"external_id": null,
"allows": {
"cards": true,
"accounts": true,
"card_extra": false,
"realtime": false,
"pse": true,
"transfiya": true
},
"status": "partially_paid",
"is_test": false,
"created_at": "2025-04-15T10:00:00.000000Z",
"paid_at": null,
"payment_link": "https://pagos.onepay.la/payment/9e5ccd4a-d2f0-49dd-87fc-a0da752bd166",
"redirect_url": null,
"provider_id": null,
"metadata": null,
"customer": null,
"method": null,
"splits": [],
"company": null,
"commission": null,
"partial_payment": {
"total_paid_in_cents": 20000000,
"total_paid_label": "$ 200.000",
"remaining_amount_in_cents": 30000000,
"remaining_label": "$ 300.000",
"progress_percentage": 40.0,
"is_fully_paid": false,
"min_amount_in_cents": 5000000,
"max_amount_in_cents": null,
"max_payment_methods": 3,
"timeout_hours": 24,
"partial_expires_at": "2025-04-16T10:00:00+00:00",
"charges": [
{
"id": "3f8b7a21-1d4a-4d2e-8f1a-17e2f1e6b9ab",
"amount_in_cents": 20000000,
"amount_label": "$ 200.000",
"payment_method_type": "account",
"payment_method": "PSE - Bancolombia",
"paid_at": "2025-04-15T10:30:00+00:00"
}
]
}
}
Was this page helpful?
⌘I