curl https://api.onepay.la/v1/charges/9e02966f-2ddf-4ee7-a391-5b5b7653e232/cancel \
-X POST \
-H "Authorization: Bearer sk_test_xxx"
{
"id": "9e02966f-2ddf-4ee7-a391-5b5b7653e232",
"status": "failed",
"remarks": ["CANCELLED_BY_MERCHANT"]
}
Endpoint para cancelar un cargo en el sistema de OnePay.
curl https://api.onepay.la/v1/charges/9e02966f-2ddf-4ee7-a391-5b5b7653e232/cancel \
-X POST \
-H "Authorization: Bearer sk_test_xxx"
{
"id": "9e02966f-2ddf-4ee7-a391-5b5b7653e232",
"status": "failed",
"remarks": ["CANCELLED_BY_MERCHANT"]
}
created o processing. Al cancelar, el cargo cambia a estado failed con el motivo CANCELLED_BY_MERCHANT.
created) o procesando (processing). Si el cargo ya fue pagado, reembolsado o falló, no podrá ser cancelado.curl https://api.onepay.la/v1/charges/9e02966f-2ddf-4ee7-a391-5b5b7653e232/cancel \
-X POST \
-H "Authorization: Bearer sk_test_xxx"
failed.CANCELLED_BY_MERCHANT.{
"id": "9e02966f-2ddf-4ee7-a391-5b5b7653e232",
"status": "failed",
"remarks": ["CANCELLED_BY_MERCHANT"]
}
Was this page helpful?