Skip to main content
GET
/
cards
Listar tarjetas
curl --request GET \
  --url https://api.onepay.la/v1/cards \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "9e01eeae-2868-4564-9d04-84d1d1d027d2",
      "brand": "Mastercard",
      "label": "Mastercard • 8099",
      "last_four": "8099",
      "expiration_date": "9/2026",
      "customer_id": "9df8018b-6a28-4696-b7b2-63615f34a2f5",
      "created_at": "2025-01-19T18:29:25.000000Z",
      "country": "CO"
    },
    {
      "id": "9e01eeae-4569-4564-9d04-84d1d1d027a3",
      "brand": "Visa",
      "label": "Visa • 4242",
      "last_four": "4242",
      "expiration_date": "12/2027",
      "customer_id": "9df8018b-6a28-4696-b7b2-63615f34a2f5",
      "created_at": "2025-01-20T10:15:30.000000Z",
      "country": "CO"
    }
  ],
  "current_page": 1,
  "from": 1,
  "last_page": 3,
  "per_page": 15,
  "to": 15,
  "total": 42
}

Documentation Index

Fetch the complete documentation index at: https://docs.onepay.la/llms.txt

Use this file to discover all available pages before exploring further.

Query Parameters

filter[customer_id]
string
Filtra tarjetas por ID de cliente.
sort
string
default:"-created_at"
Ordenamiento por fecha de creación. Usa created_at para ascendente y -created_at para descendente (más reciente primero).
per_page
integer
default:"15"
Cantidad de resultados por página.
page
integer
default:"1"
Número de página para paginación.

Ejemplos de uso

curl https://api.onepay.la/v1/cards \
  -X GET \
  -H "Authorization: Bearer sk_test_xxx"
Con filtro por cliente:
curl "https://api.onepay.la/v1/cards?filter[customer_id]=9dd4158b-0e45-42bc-b56f-a4c1f856814d" \
  -X GET \
  -H "Authorization: Bearer sk_test_xxx"

Response

data
array
Lista de tarjetas.
current_page
integer
Página actual.
from
integer
Índice del primer registro en la página actual.
last_page
integer
Última página disponible.
per_page
integer
Cantidad de registros por página.
to
integer
Índice del último registro en la página actual.
total
integer
Total de tarjetas.

Ejemplo de respuesta

{
  "data": [
    {
      "id": "9e01eeae-2868-4564-9d04-84d1d1d027d2",
      "brand": "Mastercard",
      "label": "Mastercard • 8099",
      "last_four": "8099",
      "expiration_date": "9/2026",
      "customer_id": "9df8018b-6a28-4696-b7b2-63615f34a2f5",
      "created_at": "2025-01-19T18:29:25.000000Z",
      "country": "CO"
    },
    {
      "id": "9e01eeae-4569-4564-9d04-84d1d1d027a3",
      "brand": "Visa",
      "label": "Visa • 4242",
      "last_four": "4242",
      "expiration_date": "12/2027",
      "customer_id": "9df8018b-6a28-4696-b7b2-63615f34a2f5",
      "created_at": "2025-01-20T10:15:30.000000Z",
      "country": "CO"
    }
  ],
  "current_page": 1,
  "from": 1,
  "last_page": 3,
  "per_page": 15,
  "to": 15,
  "total": 42
}