Skip to main content

Consult Available Funds

This guide quickly demonstrates how to consult your funds available for payouts in EBANX. We will walk you through the basic steps to achieve this goal using your already existing Direct API integration.

Instructions

Follow the steps below:

  1. Consult your available funds using the /ws/payout/balance endpoint

    To consult your available funds, you will use the /ws/payout/balance endpoint.

    Your integration key is the only required parameter.

    Shell
    curl -X POST 'https://sandbox.ebanxpay.com/ws/payout/balance' \
    --header 'Content-Type: application/json' \
    --data '{
    "integration_key": "{{integration_key}}"
    }'

    And a successful call will return a JSON Object with type "success" and your available funds.

    JSON
    {
    "type": "success",
    "currency_code": "USD",
    "balance": 150
    }

    It is possible to query whether there are available funds for a different currency_code:

    Shell
    curl -X POST 'https://sandbox.ebanxpay.com/ws/payout/balance' \
    --header 'Content-Type: application/json' \
    --data '{
    "integration_key": "{{integration_key}}",
    "currency_code": "BRL"
    }'
    JSON
    {
    "type": "success",
    "currency_code": "BRL",
    "balance": 490
    }

    And, also, look up the consolidated funds of the previous days (only CrossBorder environment, actually):

    Shell
    curl -X POST 'https://sandbox.ebanxpay.com/ws/payout/balance' \
    --header 'Content-Type: application/json' \
    --data '{
    "integration_key": "{{integration_key}}",
    "date": "2020-01-02"
    }'
    JSON
    {
    "type": "success",
    "currency_code": "USD",
    "date": "2020-01-02",
    "balance": 291
    }

    look up the consolidated funds of the previous days by currency_code:

    Shell
    curl -X POST 'https://sandbox.ebanxpay.com/ws/payout/balance' \
    --header 'Content-Type: application/json' \
    --data '{
    "integration_key": "{{integration_key}}",
    "currency_code": "ARS",
    "date": "2020-01-02"
    }'
    JSON
    {
    "type": "success",
    "currency_code": "ARS",
    "date": "2020-01-02",
    "balance": 2000
    }

Available Funds Error Codes

When an API call fails, EBANX will return a JSON object containing the error details as the example below:

JSON
{
"type":"invalid_request_error",
"message":"Invalid currency code",
"status_code":"HP-BA-01",
"code":"HP-BA-01"
}

Observe the following table and verify the codes and error messages that EBANX uses.

CodeMessage
HP-BA-01Invalid currency code
HP-BA-02Invalid date

Consulting Available Funds via Dashboard

You can also consult your available funds through your Dashboard in the Overview section of the Payout tab.

Still need help?

Help Image

We hope this article was helpful. If you still have questions, you can explore the following options: