Skip to main content
GET
/
products
curl "https://api.onepay.la/v1/products?per_page=15&page=1" \
  -H "Authorization: Bearer sk_test_xxx"
const response = await fetch('https://api.onepay.la/v1/products?per_page=15&page=1', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer sk_test_xxx'
  }
});
const data = await response.json();
console.log(data.data); // Array de productos
console.log(data.total); // Total de productos
import requests

response = requests.get(
    'https://api.onepay.la/v1/products',
    headers={'Authorization': 'Bearer sk_test_xxx'},
    params={
        'per_page': 15,
        'page': 1
    }
)
data = response.json()
print(data['data'])  # Array de productos
print(data['total'])  # Total de productos
<?php
$curl = curl_init();

$url = "https://api.onepay.la/v1/products?" . http_build_query([
    "per_page" => 15,
    "page" => 1
]);

curl_setopt_array($curl, [
    CURLOPT_URL => $url,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer sk_test_xxx"
    ]
]);

$data = json_decode(curl_exec($curl), true);
curl_close($curl);

print_r($data["data"]); // Array de productos
echo $data["total"];    // Total de productos
?>
{
  "data": [
    {
      "id": "9f5d85a0-1111-7000-aaaa-000000000001",
      "object": "product",
      "name": "OnePay Pro",
      "description": "Para negocios en crecimiento.",
      "active": true,
      "internal_id": "pro",
      "unit_label": null,
      "tax_rate": 19,
      "default_price": "9f5d85a0-2222-7000-aaaa-000000000002",
      "marketing_features": [
        { "name": "Clientes ilimitados" },
        { "name": "Reintentos inteligentes" }
      ],
      "metadata": null,
      "created_at": "2026-07-13T12:00:00.000000Z",
      "updated_at": "2026-07-13T12:00:00.000000Z"
    }
  ],
  "current_page": 1,
  "from": 1,
  "last_page": 1,
  "per_page": 15,
  "to": 1,
  "total": 1
}
Obtiene los productos activos de tu empresa, ordenados del más reciente al más antiguo, dentro del envelope de paginación estándar.

Query Parameters

per_page
number
default:15
Cantidad de registros por página.
page
number
default:1
Página que deseas consultar.
curl "https://api.onepay.la/v1/products?per_page=15&page=1" \
  -H "Authorization: Bearer sk_test_xxx"
const response = await fetch('https://api.onepay.la/v1/products?per_page=15&page=1', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer sk_test_xxx'
  }
});
const data = await response.json();
console.log(data.data); // Array de productos
console.log(data.total); // Total de productos
import requests

response = requests.get(
    'https://api.onepay.la/v1/products',
    headers={'Authorization': 'Bearer sk_test_xxx'},
    params={
        'per_page': 15,
        'page': 1
    }
)
data = response.json()
print(data['data'])  # Array de productos
print(data['total'])  # Total de productos
<?php
$curl = curl_init();

$url = "https://api.onepay.la/v1/products?" . http_build_query([
    "per_page" => 15,
    "page" => 1
]);

curl_setopt_array($curl, [
    CURLOPT_URL => $url,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer sk_test_xxx"
    ]
]);

$data = json_decode(curl_exec($curl), true);
curl_close($curl);

print_r($data["data"]); // Array de productos
echo $data["total"];    // Total de productos
?>

Response

data
array
Colección de productos.
current_page
number
Página actual del listado.
from
number
Número del primer registro de la página.
last_page
number
Última página disponible.
per_page
number
Cantidad de registros por página.
to
number
Número del último registro de la página.
total
number
Total de productos disponibles.
{
  "data": [
    {
      "id": "9f5d85a0-1111-7000-aaaa-000000000001",
      "object": "product",
      "name": "OnePay Pro",
      "description": "Para negocios en crecimiento.",
      "active": true,
      "internal_id": "pro",
      "unit_label": null,
      "tax_rate": 19,
      "default_price": "9f5d85a0-2222-7000-aaaa-000000000002",
      "marketing_features": [
        { "name": "Clientes ilimitados" },
        { "name": "Reintentos inteligentes" }
      ],
      "metadata": null,
      "created_at": "2026-07-13T12:00:00.000000Z",
      "updated_at": "2026-07-13T12:00:00.000000Z"
    }
  ],
  "current_page": 1,
  "from": 1,
  "last_page": 1,
  "per_page": 15,
  "to": 1,
  "total": 1
}