curl "https://api.onepay.la/v1/prices?product=9f5d85a0-1111-7000-aaaa-000000000001&active=true&per_page=15&page=1" \
-H "Authorization: Bearer sk_test_xxx"
const params = new URLSearchParams({
product: '9f5d85a0-1111-7000-aaaa-000000000001',
active: 'true',
per_page: '15',
page: '1'
});
const response = await fetch(`https://api.onepay.la/v1/prices?${params}`, {
method: 'GET',
headers: {
'Authorization': 'Bearer sk_test_xxx'
}
});
const data = await response.json();
console.log(data.data); // Array de precios
console.log(data.current_page); // Página actual
import requests
response = requests.get(
'https://api.onepay.la/v1/prices',
params={
'product': '9f5d85a0-1111-7000-aaaa-000000000001',
'active': True,
'per_page': 15,
'page': 1
},
headers={
'Authorization': 'Bearer sk_test_xxx'
}
)
data = response.json()
print(data['data']) # Array de precios
print(data['current_page']) # Página actual
<?php
$curl = curl_init();
$query = http_build_query([
"product" => "9f5d85a0-1111-7000-aaaa-000000000001",
"active" => "true",
"per_page" => 15,
"page" => 1
]);
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onepay.la/v1/prices?" . $query,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer sk_test_xxx"
]
]);
$data = json_decode(curl_exec($curl), true);
print_r($data["data"]); // Array de precios
echo $data["current_page"]; // Página actual
?>
{
"data": [
{
"id": "9f5d85a0-2222-7000-aaaa-000000000002",
"object": "price",
"product": "9f5d85a0-1111-7000-aaaa-000000000001",
"active": true,
"nickname": "Mensual",
"lookup_key": "pro_monthly",
"currency": "COP",
"unit_amount_in_cents": 7990000,
"type": "recurring",
"recurring": {
"interval": "month",
"interval_count": 1,
"total_cycles": null,
"trial_period_days": 0
},
"created_at": "2026-07-13T12:00:00.000000Z"
}
],
"current_page": 1,
"from": 1,
"last_page": 1,
"per_page": 15,
"to": 1,
"total": 1
}
Obtiene los precios del catálogo de tu empresa con filtros y paginación.
GET
/
prices
curl "https://api.onepay.la/v1/prices?product=9f5d85a0-1111-7000-aaaa-000000000001&active=true&per_page=15&page=1" \
-H "Authorization: Bearer sk_test_xxx"
const params = new URLSearchParams({
product: '9f5d85a0-1111-7000-aaaa-000000000001',
active: 'true',
per_page: '15',
page: '1'
});
const response = await fetch(`https://api.onepay.la/v1/prices?${params}`, {
method: 'GET',
headers: {
'Authorization': 'Bearer sk_test_xxx'
}
});
const data = await response.json();
console.log(data.data); // Array de precios
console.log(data.current_page); // Página actual
import requests
response = requests.get(
'https://api.onepay.la/v1/prices',
params={
'product': '9f5d85a0-1111-7000-aaaa-000000000001',
'active': True,
'per_page': 15,
'page': 1
},
headers={
'Authorization': 'Bearer sk_test_xxx'
}
)
data = response.json()
print(data['data']) # Array de precios
print(data['current_page']) # Página actual
<?php
$curl = curl_init();
$query = http_build_query([
"product" => "9f5d85a0-1111-7000-aaaa-000000000001",
"active" => "true",
"per_page" => 15,
"page" => 1
]);
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onepay.la/v1/prices?" . $query,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer sk_test_xxx"
]
]);
$data = json_decode(curl_exec($curl), true);
print_r($data["data"]); // Array de precios
echo $data["current_page"]; // Página actual
?>
{
"data": [
{
"id": "9f5d85a0-2222-7000-aaaa-000000000002",
"object": "price",
"product": "9f5d85a0-1111-7000-aaaa-000000000001",
"active": true,
"nickname": "Mensual",
"lookup_key": "pro_monthly",
"currency": "COP",
"unit_amount_in_cents": 7990000,
"type": "recurring",
"recurring": {
"interval": "month",
"interval_count": 1,
"total_cycles": null,
"trial_period_days": 0
},
"created_at": "2026-07-13T12:00:00.000000Z"
}
],
"current_page": 1,
"from": 1,
"last_page": 1,
"per_page": 15,
"to": 1,
"total": 1
}
Obtiene los precios registrados en tu cuenta de OnePay. Solo se devuelven los precios del catálogo (aquellos asociados a un producto), ordenados del más reciente al más antiguo, dentro de un envelope de paginación.
Query Parameters
Filtra los precios por el ID de un producto tuyo. Ver productos.
Filtra por estado.
true devuelve solo los precios vigentes.Resuelve uno o varios precios por su
lookup_key. Se envía como arreglo, por ejemplo ?lookup_keys[]=pro_monthly&lookup_keys[]=pro_yearly.Cantidad de registros por página.
Número de página a consultar.
curl "https://api.onepay.la/v1/prices?product=9f5d85a0-1111-7000-aaaa-000000000001&active=true&per_page=15&page=1" \
-H "Authorization: Bearer sk_test_xxx"
const params = new URLSearchParams({
product: '9f5d85a0-1111-7000-aaaa-000000000001',
active: 'true',
per_page: '15',
page: '1'
});
const response = await fetch(`https://api.onepay.la/v1/prices?${params}`, {
method: 'GET',
headers: {
'Authorization': 'Bearer sk_test_xxx'
}
});
const data = await response.json();
console.log(data.data); // Array de precios
console.log(data.current_page); // Página actual
import requests
response = requests.get(
'https://api.onepay.la/v1/prices',
params={
'product': '9f5d85a0-1111-7000-aaaa-000000000001',
'active': True,
'per_page': 15,
'page': 1
},
headers={
'Authorization': 'Bearer sk_test_xxx'
}
)
data = response.json()
print(data['data']) # Array de precios
print(data['current_page']) # Página actual
<?php
$curl = curl_init();
$query = http_build_query([
"product" => "9f5d85a0-1111-7000-aaaa-000000000001",
"active" => "true",
"per_page" => 15,
"page" => 1
]);
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onepay.la/v1/prices?" . $query,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer sk_test_xxx"
]
]);
$data = json_decode(curl_exec($curl), true);
print_r($data["data"]); // Array de precios
echo $data["current_page"]; // Página actual
?>
Response
Colección de precios de la página actual.
Show Propiedades
Show Propiedades
Identificador único del precio (UUID).
Tipo de objeto, siempre
price.ID del producto padre al que pertenece el precio.
Indica si el precio está vigente. Un precio archivado es
false.Etiqueta interna del precio. Puede ser
null.Clave estable para re-apuntar el precio vigente sin cambiar tu código. Puede ser
null.Moneda ISO del cobro (por ejemplo
COP).Monto a cobrar, expresado en centavos.
Tipo de precio, siempre
recurring.Fecha de creación en formato ISO 8601.
Página actual devuelta.
Índice del primer registro de la página.
Última página disponible.
Cantidad de registros por página.
Índice del último registro de la página.
Total de precios que coinciden con el filtro.
{
"data": [
{
"id": "9f5d85a0-2222-7000-aaaa-000000000002",
"object": "price",
"product": "9f5d85a0-1111-7000-aaaa-000000000001",
"active": true,
"nickname": "Mensual",
"lookup_key": "pro_monthly",
"currency": "COP",
"unit_amount_in_cents": 7990000,
"type": "recurring",
"recurring": {
"interval": "month",
"interval_count": 1,
"total_cycles": null,
"trial_period_days": 0
},
"created_at": "2026-07-13T12:00:00.000000Z"
}
],
"current_page": 1,
"from": 1,
"last_page": 1,
"per_page": 15,
"to": 1,
"total": 1
}
Was this page helpful?
⌘I