curl https://api.onepay.la/v1/charges/9e02966f-2ddf-4ee7-a391-5b5b7653e232/resolve \
-X POST \
-H "Authorization: Bearer sk_test_xxx" \
-H "Content-Type: application/json" \
-d '{
"action": "approve"
}'
{
"id": "9e02966f-2ddf-4ee7-a391-5b5b7653e232",
"status": "paid",
"remarks": null,
"paid_at": "2026-02-20T17:14:00.000000Z"
}
Aprueba o rechaza manualmente un cargo de prueba en estado processing o created.
curl https://api.onepay.la/v1/charges/9e02966f-2ddf-4ee7-a391-5b5b7653e232/resolve \
-X POST \
-H "Authorization: Bearer sk_test_xxx" \
-H "Content-Type: application/json" \
-d '{
"action": "approve"
}'
{
"id": "9e02966f-2ddf-4ee7-a391-5b5b7653e232",
"status": "paid",
"remarks": null,
"paid_at": "2026-02-20T17:14:00.000000Z"
}
is_test: true). Si intentas resolver un cargo de producción, recibirás un error 403.processing o created en ambiente de pruebas.
processing (por ejemplo, con cuentas bancarias que no tienen un patrón de auto-aprobación), puedes usar este endpoint para completar el flujo manualmente — simulando que el gateway responde aprobando o rechazando la transacción.
source_id del cargo a resolver. Debe estar en estado processing o created.approve - Aprueba el cargo (transición a paid)reject - Rechaza el cargo (transición a failed)action es reject.Acepta cualquier código de los escenarios de prueba, por ejemplo:INSUFFICIENT_FUNDS - Fondos insuficientesRISK_CONTROL - Bloqueado por control de riesgoCARD_EXPIRED - Tarjeta expiradaTRANSACTION_REJECTED - Rechazado por el bancocurl https://api.onepay.la/v1/charges/9e02966f-2ddf-4ee7-a391-5b5b7653e232/resolve \
-X POST \
-H "Authorization: Bearer sk_test_xxx" \
-H "Content-Type: application/json" \
-d '{
"action": "approve"
}'
curl https://api.onepay.la/v1/charges/9e02966f-2ddf-4ee7-a391-5b5b7653e232/resolve \
-X POST \
-H "Authorization: Bearer sk_test_xxx" \
-H "Content-Type: application/json" \
-d '{
"action": "reject",
"remarks": "RISK_CONTROL"
}'
{
"id": "9e02966f-2ddf-4ee7-a391-5b5b7653e232",
"status": "paid",
"remarks": null,
"paid_at": "2026-02-20T17:14:00.000000Z"
}
Was this page helpful?