Skip to main content
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

product
string
Filtra los precios por el ID de un producto tuyo. Ver productos.
active
boolean
Filtra por estado. true devuelve solo los precios vigentes.
lookup_keys
array
Resuelve uno o varios precios por su lookup_key. Se envía como arreglo, por ejemplo ?lookup_keys[]=pro_monthly&lookup_keys[]=pro_yearly.
per_page
integer
default:"15"
Cantidad de registros por página.
page
integer
default:"1"
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

data
array
Colección de precios de la página actual.
current_page
integer
Página actual devuelta.
from
integer
Índice del primer registro de la página.
last_page
integer
Última página disponible.
per_page
integer
Cantidad de registros por página.
to
integer
Índice del último registro de la página.
total
integer
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
}