API PÚBLICA · V1
Cobrá desde tu código
Creá un link de checkout con una llamada a la API. Tu cliente paga con los medios disponibles en su país. Vos te enterás cuando se confirma el cobro.
01 — OVERVIEW
Qué podés hacer con la API
La API es chica a propósito. Casi todo arranca creando un checkout y escuchando actualizaciones de pago.
Crear links de pago
Hacé un POST de Checkout Preference y recibís un checkout_url para mandarle a cualquier cliente.
Aceptar medios locales
El checkout detecta el país del pagador y muestra tarjeta, transferencia, PIX o crypto cuando están disponibles. La conversión de moneda la resolvemos nosotros.
Saber cuándo cobraste
Recibís webhooks en cada cambio de estado del Payment Order y después consultás la orden completa cuando la necesites.
02 — MODELO
Dos objetos que tenés que conocer
Checkout Preference es el link que creás. Payment Order es lo que aparece cuando el cliente empieza a pagar.
Creás un Checkout Preference
Tu backend llama a la API con monto, moneda y título. ONE te devuelve un checkout_url.
Tu cliente paga
Abre el link, elige un medio local y completa el pago. Ahí se crea un Payment Order.
Te llega un webhook
ONE hace POST a tu URL cuando cambia el estado de la orden (opened, closed, expired…).
Consultás la orden
Usá el entity_id del webhook para hacer GET del Payment Order y confirmar el estado final.
03 — QUICKSTART
Salí en tres pasos
No necesitás un SDK. Keys, una base URL de staging y un POST alcanzan para ver un checkout real.
- 01
Creá tus API keys
En el Dashboard de ONE andá a Integrations y generá tu x-api-key y x-api-secret.
- 02
Empezá en staging
Integrá contra api.stg.one.lat. Solo podés pedir una cuenta de staging si ya tenés una cuenta de producción aprobada y activa: escribinos a support.
- 03
Creá tu primer checkout
POST /v1/checkout_preferences, abrí el checkout_url, completá un pago de prueba y mirá llegar el webhook.
04 — AUTH
Autenticación
Cada request a la API tiene que incluir los dos headers de seguridad.
Mandá x-api-key y x-api-secret en cada llamada. Creá y rotá las keys desde el dashboard en Integrations.
05 — ENV
Ambientes
Los mismos paths en staging y production. Solo cambia el host.
Staging
https://api.stg.one.latProduction
https://api.one.lat06 — CORE
Crear un checkout
Este es el endpoint principal. Crea un pedido de pago único y te devuelve la URL con la que paga tu cliente.
/v1/checkout_preferencesBody del request
| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
amount | float | Sí | Monto del cobro. Los límites equivalentes rondan 10–1500 USD. |
currency | string | Sí | Moneda ISO del monto (USD, ARS, BRL, COP, MXN). |
title | string | Sí | Lo que ve el cliente en el checkout, p. ej. nombre del curso. |
origin | string | Sí | API |
external_id | string | No | Tu id único para reconciliar el pago después. |
expiration_date | string (RFC3339) | No | Fecha RFC3339. Máximo 1 semana. Si no la mandás, expira en 15 minutos. |
payer.email | string | No | Si la mandás, el checkout puede saltear pedir el email. |
payer.first_name | string | No | Nombre del pagador. |
payer.last_name | string | No | Apellido del pagador. |
payer.phone_number | string | No | Teléfono del pagador con código de país. |
selected_payment_method_id | string | No | Saltea la selección y fija un medio de pago específico. |
custom_urls.status_changes_webhook | string (URL) | No | Tu endpoint para notificaciones de cambio de estado del Payment Order. |
Ejemplo de request
curl 'https://api.one.lat/v1/checkout_preferences' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-api-secret: YOUR_API_SECRET' \
--header 'Content-Type: application/json' \
--data '{
"amount": 25,
"currency": "USD",
"origin": "API",
"title": "Introductory course to Blockchain",
"external_id": "order_1234",
"payer": {
"email": "luca@test.com",
"first_name": "Luca",
"last_name": "Dorain",
"phone_number": "+521142567689"
},
"custom_urls": {
"status_changes_webhook": "https://api.mycompany.io/webhook"
}
}'Ejemplo de response
Compartí checkout_url con tu cliente. El checkout solo muestra los medios disponibles en su país.
{
"id": "qwDsh9aMoywPOiUx0O",
"amount": 25,
"currency": "USD",
"created_at": "2025-02-25T14:11:29Z",
"expiration_date": "2025-02-26T15:02:50Z",
"origin": "API",
"external_id": "order_1234",
"title": "Introductory course to Blockchain",
"type": "PAYMENT",
"checkout_url": "https://one.lat/checkout/qwDsh9aMoywPOiUx0O",
"payer": {
"email": "luca@test.com",
"first_name": "Luca",
"last_name": "Dorain",
"phone_number": "+521142567689"
}
}07 — CONSULTAS
Endpoints de consulta
Usalos después de crear un checkout, o cuando un webhook te avisa que algo cambió.
Obtener un Checkout Preference
Recuperá una preference que ya creaste por id.
/v1/checkout_preferences/:idObtener un Payment Order
Un Payment Order se crea cuando el pagador entra al checkout, elige un medio y envía sus datos. Consultalo para confirmar el estado después de un webhook.
/v1/payment_orders/:id{
"id": "gRV8xTZHPv9lNxSLPw",
"amount": 16.9,
"currency": "USD",
"created_at": "2024-06-12T15:26:47Z",
"expired_at": "2024-06-12T15:56:47Z",
"updated_at": "2024-06-12T15:31:28Z",
"status": "CLOSED",
"title": "Test product",
"origin": "PAYMENT_LINK",
"external_id": "1234",
"payment_method_type": "BANK_TRANSFER",
"payer": {
"email": "payer@gmail.com",
"first_name": "Joan",
"last_name": "Kohler",
"phone_number": "+542614215688"
}
}Obtener un Refund
Cuando recibís REFUND.SUCCEEDED, usá el entity_id para consultar el refund y confirmar monto, moneda y la orden asociada.
/v1/refunds/:idcurl 'https://api.one.lat/v1/refunds/1dUPlZbsDABq3bIEOG' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-api-secret: YOUR_API_SECRET'{
"id": "1dUPlZbsDABq3bIEOG",
"payment_order_id": "IwyOQSzfuEt80W9WNS",
"amount": 100,
"currency": "USD",
"status": "SUCCEEDED",
"created_at": "2025-12-08T22:42:52Z",
"updated_at": "2025-12-08T23:12:48Z"
}Listar medios de pago
Ves qué medios están habilitados para tu cuenta, con límites, moneda y país.
/v1/payment_methods[
{
"id": "vJKtkYs8Vf",
"status": "ENABLED",
"type": "BANK_TRANSFER",
"country_id": "ARG",
"currency": "ARS",
"max_amount": 10000000,
"min_amount": 0
},
{
"id": "qacV3z31cz",
"status": "ENABLED",
"type": "CRYPTO_ONCHAIN",
"country_id": "ALL",
"currency": "USDT",
"network": { "id": "TRON", "name": "Tron" },
"min_amount": 0.1,
"max_amount": 100000
}
]Tipos comunes: BANK_TRANSFER · PIX · CRYPTO_ONCHAIN
08 — EVENTOS
Webhooks
Los webhooks son alertas de cambio de estado. Son chicos a propósito: tratalos como señal y después consultá la entidad.
Configurar la URL del webhook
Pasá custom_urls.status_changes_webhook cuando creás el Checkout Preference.
{
"custom_urls": {
"status_changes_webhook": "https://api.mycompany.io/webhook"
}
}¿Necesitás una URL para todas las notificaciones de la cuenta? Escribile a support para configurarla a nivel cuenta.
Payload de la notificación
Para eventos de Payment Order, llamá a GET /v1/payment_orders/:id con el entity_id para obtener la versión más reciente.
{
"id": "uCEarm1kXJsroMQ6dt",
"event_type": "PAYMENT_ORDER.CLOSED",
"entity_type": "PAYMENT_ORDER",
"entity_id": "rcAaNfKdKJRmrnj4l5"
}Notificaciones de refund
Cuando un refund se completa llega REFUND.SUCCEEDED. Después llamá a GET /v1/refunds/:id con el entity_id.
{
"id": "nR8kLm2pQxYtVw4HsZ",
"event_type": "REFUND.SUCCEEDED",
"entity_type": "REFUND",
"entity_id": "1dUPlZbsDABq3bIEOG"
}Tipos de evento
Payment Order
PAYMENT_ORDER.OPENEDPAYMENT_ORDER.CLOSEDPAYMENT_ORDER.REJECTEDPAYMENT_ORDER.EXPIRED
Refund
REFUND.SUCCEEDED
Tu handler del webhook tiene que ser idempotente. El campo id es único por notificación.
09 — REFERENCIA
Estados y monedas
Tablas rápidas de estados de Payment Order, refunds y monedas soportadas.
Estados del Payment Order
| Código | Descripción |
|---|---|
OPENED | Creada y esperando que el cliente pague. |
CLOSED | Pagada con éxito. El proceso terminó. |
REJECTED | Rechazada por el procesador o el banco del cliente. |
EXPIRED | Expiró antes de recibir el pago. |
Estados del Refund
| Código | Descripción |
|---|---|
SUCCEEDED | El refund se completó con éxito. |
Monedas
| Código | Descripción |
|---|---|
USD | Dólares estadounidenses |
ARS | Pesos argentinos |
BRL | Reales brasileños |
COP | Pesos colombianos |
MXN | Pesos mexicanos |