Version: current

Create Digital Accounts

EBANX provides 2 (two) methods of sub-account creation through the API:

  • Traditional Method: endpoint /digital-accounts;

  • Front-end Method: endpoint (New Onboarding) /onboarding/link-request/.

You can choose which solution will best suit you at the time of development. Both solutions are whitelabel applicable. But, for these accounts to be able to transition properly, it's obligatory to send the necessary documents immediately after their creation.

Let us enumerate the differences between them:

Traditional Method

In the traditional method /digital-accounts, it's necessary to set up the request in your environment and develop the front-end to inform the fields inherent to the account that will be created.

Endpoint Integration Flow:

  1. Create the account, through the endpoint '/digital-accounts'.

    info

    IMPORTANT: We recommend storing all the data that will be returned in the response. It is mandatory to store both of these: dac_id and Resource-Token.

  2. Create a webhook for this newly-created account, via the '/notifications/webhooks' endpoint.

    HINT: You can choose which events the webhook will receive, but we recommend that you set it to receive all events so you stay on top of all possible notifications from this account.

  3. List the documents to be sent, through the endpoint /documents.

    info

    IMPORTANT: We recommend that you store all the data we return in the response, as it will be used later.

  4. Send all the documents listed, via the endpoint /documents.

    HINT: You can send one document per request.

  5. Utilize the API resources.

    Only after you have sent all the documents will it be possible to create charges and use all the available API features.

For technical details, please consult our official documentation here for the traditional account creation method or here for the front-end method.

What is necessary to make this request?

  • You must have already generated and stored the additional data (Business areas, company types and banks). If you have not yet generated the additional data, we have a complete step by step in the item Additional Data;
  • Have the Resource token (private token) for your account;
  • Have already sent all the documents for your account;
  • You must also have a valid authorization token. If you have not yet generated the authorization token, we have a complete step by step in the item Generating your authentication.

Simply follow the steps below to set up the endpoint in your environment:

  1. For this request, set the http POST method;

  2. Next, insert the URL according to the endpoint and the environment.

  3. Go to Authorization;

  4. In Authorization, under Type, select the Bearer Token option;

  5. In Token, insert the Access Token generated in the endpoint /authorization-server/oauth/token

  6. Go to Headers;

  7. Add in Key X-API-Version and X-Resource-Token;

  8. Add in Value 2 and the private token;

  9. Go to Body and check the box Raw;

  10. Fill in the payload based on the data informed in the official documentation;

  11. Check if all the fields above are filled out correctly - after checking, you can go to Send.

  12. See an example of Curl:

    curl --location --request POST 'https://sandbox.boletobancario.com/api-integration/digital-accounts' \
    --header 'X-Resource-Token: 4A59242E6ACC96D048B6A44400E801B09DE5937A6B30E6ACA420105003D21AF8' \
    --header 'X-API-Version: 2' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJsaXNlX2dhc' \
    --header 'Content-Type: application/json' \
    --data-raw '{
    "type": "PAYMENT",
    "name": “Subaccount creation CPF",
    "motherName": “Name of the holder`s mother",
    "monthlyIncomeOrRevenue": 10000,
    "document": "xxxxxxxxxxx",
    "birthDate": “yyyy-mm-dd“,
    "email": "test@test.com.br",
    "businessArea": 2015,
    "phone": "(41) 99999-9999",
    "linesOfBusiness": "Test",
    "address": {
    "street": "Test Street",
    "number": "999",
    "complement": "",
    "neighborhood": "Test",
    "city": "Curitiba",
    "state": "PR",
    "postCode": "80030070"
    },
    "bankAccount": {
    "bankNumber": "001",
    "agencyNumber": "1111-1",
    "accountNumber": "11111-1",
    "accountType": "CHECKING"
    },
    "emailOptOut": true
    }'

    A successful request will return a JSON response as output, like the one below:

    {
    "id": "dac_367FA03CAE844CDC",
    "type": "PAYMENT",
    "status": "AWAITING_DOCUMENTS",
    "personType": "F",
    "document": "xxxxxxxxxxx",
    "createdOn": "2021-06-22T13:29:04.305-03:00",
    "resourceToken":
    "BC9DB3E1C52B1BB37A3D3BC155B37029517DA0759031A0D89B6477890919C947"
    ,
    "accountNumber": 10000279355,
    "_links": {
    "self": {
    "href": "https://sandbox.boletobancario.com/api-integration/digital-accounts/dac_367FA03CAE844CDC"
    }
    }
    }

Front End Method

In the front-end method /onboarding/link-request, all screens/steps for creating the sub-account and sending documents were developed by us. When sending a request to this endpoint, we will provide a link - just insert this link in your Front and perform a redirect that the user will be directed to a front-end to fill out the account creation data. Rest assured: we will detail all these processes later on!

Endpoint Integration Flow:

  1. Create a webhook to receive the event: DIGITAL_ACCOUNT_CREATED for the main account.

    info

    IMPORTANT: It will be through the event mentioned above which will soon after creating the account trigger a notification for the event DIGITAL_ACCOUNT_CREATED with the information of the created account.

    This step will only be done once - with this webhook created, you will receive a notification for each account created through the method with front-end.

    info

    IMPORTANT: We recommend storing all the data we send in the webhook. It is mandatory to store dac_id and Resource-Token as these pieces of data will not be forwarded again and it will be necessary to create a new account.

  2. Create a webhook for this newly-created account, via the '/notifications/webhooks' endpoint.

    HINT: You can choose which events the webhook will receive, but we recommend that you set it to receive all events so you stay on top of all possible notifications from this account.

  3. Make the request to our endpoint /onbarding/link-request.

    HINT: We recommend you to store all the data that we return in the response to process it properly.

  4. List the documents to be sent, through the endpoint /documents.

    info

    IMPORTANT: It is through this link that the user will create the account and send the documents.

    HINT: You can send one document per request.

  5. Create a webhook for the created account via the endpoint /notifications/webhooks.

    HINT: You can choose which events the webhook will receive, but we recommend that you set it to receive all events so you stay on top of all possible notifications from this account.

  6. Utilize the API resources.

    Only after you have sent all the documents will it be possible to create charges and use all the available API features.

Simply follow the steps below to set up the endpoint in your environment:

  1. For this request, set the http POST method;

  2. Next, insert the URL according to the endpoint and the environment.

  3. Go to Authorization;

  4. In Authorization, under Type, select the Bearer Token option;

  5. In Token, insert the Access Token generated in the endpoint /authorization-server/oauth/token

  6. Go to Headers;

  7. Add in Key X-API-Version and X-Resource-Token;

  8. Add in Value 2 and the private token;

  9. Go to Body and check the box Raw;

  10. Fill in the payload based on the data informed in the official documentation;

  11. Check if all the fields above are filled out correctly - after checking, you can go to Send.

  12. See an example of Curl:

    ```bash curl --location --request POST 'https://sandbox.boletobancario.com/api-integration/onboarding/link-request' \ --header 'X-Resource-Token: 4A59242E6ACC96D048B6A44400E801B09DE5937A6B30E6ACA420105003D21AF8' \ --header 'X-API-Version: 2' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJsaXNlX2dhc' \ --header 'Content-Type: application/json' \ ```

    A successful request will return a JSON response as output, like the one below:

    {
    "createdOn": "2021-06-22 13:41:46",
    "expiresOn": "2021-06-22 13:51:46",
    "token":
    "5CCE5049EF85F3D13C3BD6B0645B5688C7035D1BD86C9BB1CE6E122613DBD152B1D8F950D82685C0",
    "url": "https://sandbox.juno.com.br/#/api-onboarding/land/5CCE5049EF85F3D13C3BD6B0645B5688C7035D1BD86C9BB1CE6E122613DBD152B1D8F950D82685C0"
    }

Updating Digital Accounts

This endpoint is available for the correction of data and details of the associated digital accounts.

This information will be updated immediately:

  • Contact Email and Telephone;
  • Address information;
  • Bank Details.

Some other data, in order to be updated, must pass through the verification and approval of our Risk team. These are:

  • Name and date of birth;
  • Data from the Legal Representative;
  • Company Name;
  • Area and Line of Business;
  • Type of Company.
caution

ATTENTION: If you create an account with incorrect document numbering (CPF/CNPJ) you must create a new account. It is not possible to change this information.

info

IMPORTANT: In this data update process, the items below must be taken into consideration:

  • All fields must be sent in the request, even those that will not undergo any kind of change. The sole exception is the email address field.
  • After updating the data, send the documents again.

For technical details, see our official documentation here.

What is necessary to do this request?

  • You must have already created an account via API (Traditional method and/or with Front);
  • Have the Resource token of the account you want to consult;
  • You must also have a valid authorization token. If you have not yet generated the authorization token, we have a complete step-by-step here.

Simply follow the steps below to set up the endpoint in your environment:

  1. For this request, set the http PATCH method;

  2. Next, insert the URL according to the endpoint and the environment.

  3. Go to Authorization;

  4. In Authorization, under Type, select the Bearer Token option;

  5. In Token, insert the Access Token generated in the endpoint /authorization-server/oauth/token

  6. Go to Headers;

  7. Add in Key X-API-Version and X-Resource-Token;

  8. Add in Value 2 and the private token;

  9. Go to Body and check the box Raw;

  10. Fill in the payload based on the data informed in the official documentation;

  11. Check if all the fields above are filled out correctly - after checking, you can go to Send

  12. See an example of Curl:

    curl --location --request PATCH 'https://sandbox.boletobancario.com/api-integration/digital-accounts' \
    --header 'X-Resource-Token: 4A59242E6ACC96D048B6A44400E801B09DE5937A6B30E6ACA420105003D21AF8' \
    --header 'X-API-Version: 2' \
    --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJsaXNlX2dhc' \
    --header 'Content-Type: application/json' \
    --data-raw '{
    "companyType": "MEI",
    "name": "Subaccount creation CPF",
    "birthDate": "yyyy-mm-dd",
    "linesOfBusiness": "Test",
    "email": "test@test.com.br",
    "phone": "41999999999",
    "businessArea": 2015,
    "tradingName": "Teste",
    "address": {
    "street": "Test Street",
    "number": "001",
    "complement": "",
    "neighborhood": “Test",
    "city": "Curitiba",
    "state": "PR",
    "postCode": "80030070"
    },
    "bankAccount": {
    "bankNumber": "111",
    "agencyNumber": "1111-1",
    "accountNumber": "11111-1",
    "accountComplementNumber": "001",
    "accountType": "CHECKING",
    "accountHolder": {
    "name": "Teste",
    "document": "xxxxxxxxxxx"
    }
    },
    "legalRepresentative": {
    "name": "Teste",
    "document": "xxxxxxxxxx",
    "birthDate": "yyyy-mm-dd",
    "motherName": “Test",
    "type": "INDIVIDUAL"
    }
    }'

    A successful request will return a JSON response as output, like the one below:

    {
    "id": "dac_367FA03CAE844CDC",
    "type": "PAYMENT",
    "status": "VERIFIED",
    "personType": "F",
    "document": "xxxxxxxxxxx",
    "createdOn": "2021-06-02T13:46:57.000-03:00",
    "accountNumber": 10000279355,
    "_links": {
    "self": {
    "href": "https://sandbox.boletobancario.com/api-integration/digital-accounts/dac_367FA03CAE844CDC"
    }
    }
    }

Consulting Digital Accounts

We provide this endpoint for you to be able to check the status of an account created via API.

caution

ATTENTION: This endpoint will not return the data sent when creating the account, but rather data that we return in the response to the creation of the account. An exception exists in the Resource Token, which will not be returned as it is security sensitive data.

For technical details, see our official documentation here

What is necessary to do this request?

  • You must have already created an account via API (Traditional method and/or with Front);
  • Have the Resource token of the account you want to consult;
  • You must also have a valid authorization token. If you have not yet generated the authorization token, we have a complete step-by-step here.

Simply follow the steps below to set up the endpoint in your environment:

  1. For this request, set the http GET method;

  2. Next, insert the URL according to the endpoint and the environment.

  3. Go to Authorization;

  4. In Authorization, under Type, select the Bearer Token option;

  5. In Token, insert the Access Token generated in the endpoint /authorization-server/oauth/token

  6. Go to Headers;

  7. Add in Key X-API-Version and X-Resource-Token;

  8. Add in Value 2 and the private token;

  9. Check if all the fields above are filled out correctly - after checking, you can go to Send

  10. See an example of Curl:

    ```bash curl --location --request GET 'https://sandbox.boletobancario.com/api-integration/digital-accounts' \ --header 'X-Resource-Token: 4A59242E6ACC96D048B6A44400E801B09DE5937A6B30E6ACA420105003D21AF8' \ --header 'X-API-Version: 2' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJsaXNlX2dhc' \ --header 'Content-Type: application/json' \ ```

    A successful request will return a JSON response as output, like the one below:

    {
    "id": "dac_CC93B773D6385200",
    "type": "PAYMENT",
    "status": "VERIFIED",
    "personType": "F",
    "document": "xxxxxxxxxxx",
    "createdOn": "2020-09-17T16:13:17.000-03:00",
    "accountNumber": 10000277484,
    "_links": {
    "self": {
    "href": "https://sandbox.boletobancario.com/api-integration/digital-accounts/dac_CC93B773D6385200"
    }
    }
    }
Last updated on by Fernando Pankiewicz Gomes