curl --request POST \
--url https://api.onepay.la/v1/balances \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-idempotency: <x-idempotency>' \
--data '
{
"amount": 123,
"account_id": "<string>"
}
'(No Content)
Solicita la dispersión del balance a una cuenta bancaria registrada de tu empresa.
curl --request POST \
--url https://api.onepay.la/v1/balances \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-idempotency: <x-idempotency>' \
--data '
{
"amount": 123,
"account_id": "<string>"
}
'(No Content)
amount, se dispersa el balance completo.account_id, se usa la cuenta bancaria principal (fundable) de tu empresa.account_id que pertenece a un cliente o invitado, recibirás un error company_account_not_found.curl https://api.onepay.la/v1/balances \
-X POST \
-H "Authorization: Bearer sk_test_xxx" \
-H "Content-Type: application/json"
curl https://api.onepay.la/v1/balances \
-X POST \
-H "Authorization: Bearer sk_test_xxx" \
-H "Content-Type: application/json" \
-d '{"amount": 500000}'
curl https://api.onepay.la/v1/balances \
-X POST \
-H "Authorization: Bearer sk_test_xxx" \
-H "Content-Type: application/json" \
-d '{"amount": 500000, "account_id": "9d0ac58c-2226-4f1c-b305-15e6dc3b47f6"}'
| Código | Nombre | HTTP | Descripción |
|---|---|---|---|
| 10500 | balance_is_empty | 401 | El saldo está vacío |
| 10501 | insufficient_funds | 401 | El monto solicitado supera el balance disponible |
| 10809 | company_account_not_found | 422 | No se encontró cuenta bancaria o no pertenece a tu empresa |
(No Content)
Was this page helpful?