ONE

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.

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.

01

Crear links de pago

Hacé un POST de Checkout Preference y recibís un checkout_url para mandarle a cualquier cliente.

02

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.

03

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.

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.

  1. Creás un Checkout Preference

    Tu backend llama a la API con monto, moneda y título. ONE te devuelve un checkout_url.

  2. Tu cliente paga

    Abre el link, elige un medio local y completa el pago. Ahí se crea un Payment Order.

  3. Te llega un webhook

    ONE hace POST a tu URL cuando cambia el estado de la orden (opened, closed, expired…).

  4. Consultás la orden

    Usá el entity_id del webhook para hacer GET del Payment Order y confirmar el estado final.

Salí en tres pasos

No necesitás un SDK. Keys, una base URL de staging y un POST alcanzan para ver un checkout real.

  1. 01

    Creá tus API keys

    En el Dashboard de ONE andá a Integrations y generá tu x-api-key y x-api-secret.

  2. 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.

  3. 03

    Creá tu primer checkout

    POST /v1/checkout_preferences, abrí el checkout_url, completá un pago de prueba y mirá llegar el webhook.

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.

Ambientes

Los mismos paths en staging y production. Solo cambia el host.

https://api.stg.one.lat
https://api.one.lat

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.

POST/v1/checkout_preferences

Body del request

CampoTipoRequeridoDescripción
amountfloatMonto del cobro. Los límites equivalentes rondan 10–1500 USD.
currencystringMoneda ISO del monto (USD, ARS, BRL, COP, MXN).
titlestringLo que ve el cliente en el checkout, p. ej. nombre del curso.
originstringAPI
external_idstringNoTu id único para reconciliar el pago después.
expiration_datestring (RFC3339)NoFecha RFC3339. Máximo 1 semana. Si no la mandás, expira en 15 minutos.
payer.emailstringNoSi la mandás, el checkout puede saltear pedir el email.
payer.first_namestringNoNombre del pagador.
payer.last_namestringNoApellido del pagador.
payer.phone_numberstringNoTeléfono del pagador con código de país.
selected_payment_method_idstringNoSaltea la selección y fija un medio de pago específico.
custom_urls.status_changes_webhookstring (URL)NoTu endpoint para notificaciones de cambio de estado del Payment Order.

Ejemplo de request

cURL
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.

200 JSON
{
  "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"
  }
}

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.

GET/v1/checkout_preferences/:id

Obtener 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.

GET/v1/payment_orders/:id
200 JSON
{
  "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.

GET/v1/refunds/:id
cURL
curl 'https://api.one.lat/v1/refunds/1dUPlZbsDABq3bIEOG' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'x-api-secret: YOUR_API_SECRET'
200 JSON
{
  "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.

GET/v1/payment_methods
200 JSON
[
  {
    "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

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.

JSON
{
  "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.

PAYMENT_ORDER
{
  "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.

REFUND
{
  "id": "nR8kLm2pQxYtVw4HsZ",
  "event_type": "REFUND.SUCCEEDED",
  "entity_type": "REFUND",
  "entity_id": "1dUPlZbsDABq3bIEOG"
}

Tipos de evento

Payment Order

  • PAYMENT_ORDER.OPENED
  • PAYMENT_ORDER.CLOSED
  • PAYMENT_ORDER.REJECTED
  • PAYMENT_ORDER.EXPIRED

Refund

  • REFUND.SUCCEEDED

Tu handler del webhook tiene que ser idempotente. El campo id es único por notificación.

Estados y monedas

Tablas rápidas de estados de Payment Order, refunds y monedas soportadas.

Estados del Payment Order

CódigoDescripción
OPENEDCreada y esperando que el cliente pague.
CLOSEDPagada con éxito. El proceso terminó.
REJECTEDRechazada por el procesador o el banco del cliente.
EXPIREDExpiró antes de recibir el pago.

Estados del Refund

CódigoDescripción
SUCCEEDEDEl refund se completó con éxito.

Monedas

CódigoDescripción
USDDólares estadounidenses
ARSPesos argentinos
BRLReales brasileños
COPPesos colombianos
MXNPesos mexicanos