Skip to main content

Verify Account PIX Key

This guide quickly demonstrates how to verify destination PIX key accounts whether it exists or not and if is valid. We will walk you through the basic steps to achieve this goal using your already existing API integration.

Instructions​

Follow the steps below:

  1. Verify account using the /ws/payout/verify_account end-point
    ​

    To verify account, you will use the /ws/payout/verify_account endpoint.

    The following fields are required:

    FieldDescription
    integration_keyYour EBANX integration key.
    targetProvider that will process the payment (pix_key)
    target_accountDestination account to query
    countryThe two-letter country code for the customer country. In this case, we'll show the method to br(Brazil)

    The following example shows how to verify a destination account:

    Shell
    curl -X POST \
    --location 'https://sandbox.ebanxpay.com/ws/payout/verify_account' \
    --header 'Content-Type: application/json' \
    --data '{
    "integration_key": "{{integration_key}}",
    "target": "pix_key",
    "target_account": "john.doe@example.com",
    "country": "br"
    }'

    And a successful query will return a JSON Object with status "valid" and the recipient's bank information.

    JSON
    {
    "recipient": {
    "name": "John Doe",
    "document": "{{tax_id}}",
    "bank_branch": "{{bank_branch}}",
    "bank_account": "{{bank_account}}",
    "bank_agency": "0",
    "account_type": "CHECKING"
    },
    "status": "valid",
    "message": "Account is valid"
    }

    And an unsuccessful query will return a JSON Object with status "invalid", with a message explaining the reason.

    JSON
    {
    "status": "invalid",
    "message": "Account does not exist in provider"
    }

    The verification of a PIX key is asynchronous: while the verification is still being processed, the query returns a JSON Object with status "pending" and the message "The request is processing".

    JSON
    {
    "status": "pending",
    "message": "The request is processing"
    }

    The "pending" status is not a final result. Repeat the same request until the response returns "valid" or "invalid".

Still need help?

Help Image

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