curl https://api.onepay.la/v1/customers/session/charges \
-X POST \
-H "Authorization: Bearer sk_test_xxx" \
-H "x-customer-token: 12|a1b2c3d4e5f6..." \
-H "x-idempotency: 550e8400-e29b-41d4-a716-446655440000" \
-H "Content-Type: application/json" \
-d '{
"payment_method_id": "bb02b2fd-154c-4c90-9fdf-cec3a0b25cf5",
"amount": 50000,
"currency": "COP",
"description": "Pago mensualidad marzo"
}'
{
"charge_id": "9e02966f-2ddf-4ee7-a391-5b5b7653e232",
"status": "created",
"message": "Solicitud de aprobación enviada al cliente vía WhatsApp.",
"expires_at": "2026-03-16T22:35:00+00:00"
}
Crea un cargo a una tarjeta del cliente autenticado. Requiere aprobación del cliente vía WhatsApp.
curl https://api.onepay.la/v1/customers/session/charges \
-X POST \
-H "Authorization: Bearer sk_test_xxx" \
-H "x-customer-token: 12|a1b2c3d4e5f6..." \
-H "x-idempotency: 550e8400-e29b-41d4-a716-446655440000" \
-H "Content-Type: application/json" \
-d '{
"payment_method_id": "bb02b2fd-154c-4c90-9fdf-cec3a0b25cf5",
"amount": 50000,
"currency": "COP",
"description": "Pago mensualidad marzo"
}'
{
"charge_id": "9e02966f-2ddf-4ee7-a391-5b5b7653e232",
"status": "created",
"message": "Solicitud de aprobación enviada al cliente vía WhatsApp.",
"expires_at": "2026-03-16T22:35:00+00:00"
}
created, el endpoint retornará error 422.100 (equivale a $1 COP).COP, USD.curl https://api.onepay.la/v1/customers/session/charges \
-X POST \
-H "Authorization: Bearer sk_test_xxx" \
-H "x-customer-token: 12|a1b2c3d4e5f6..." \
-H "x-idempotency: 550e8400-e29b-41d4-a716-446655440000" \
-H "Content-Type: application/json" \
-d '{
"payment_method_id": "bb02b2fd-154c-4c90-9fdf-cec3a0b25cf5",
"amount": 50000,
"currency": "COP",
"description": "Pago mensualidad marzo"
}'
{
"charge_id": "9e02966f-2ddf-4ee7-a391-5b5b7653e232",
"status": "created",
"message": "Solicitud de aprobación enviada al cliente vía WhatsApp.",
"expires_at": "2026-03-16T22:35:00+00:00"
}
Was this page helpful?