Setting up the environment, account, certificate, and webhook
Updates>>Banking Commun. >>PIX API Wizard
Click the menu >> Banco do Brasil

Step 1, welcome screen.
Click Next.

Step 2, selection of accounts.
In this step, we can select one or more accounts. For our example, only one account will be selected. After you check/select the accounts you want to set up, click the Next button.

Step 3, connection credentials.
In this step, the connection, production, or staging environment andconnection credentials will be configured.

After filling out the fields, click Next.
If the connection credentials have been filled correctly, the following screen appears:

Environment
Defines whether the PIX collection record will be performed in a test environment or a real environment of the financial institution (Banco do Brasil).
Connection credentials
Username and password provided by Banco do Brasil and authorized to generate access token to the API services/resource.
User (Client ID)
Public and unique identifier in the authorization protocol (OAuth) of Banco do Brasil.
Password (Client Secret) A password known only for your application and the authorization server.
Application Key The credential required to trigger Banco do Brasil APIs
Step 4, certificate.
In this step, the names and extensions of the certificate public key and certificate files will be configured. The files must have the .pem extension.
After completing the key and certificate fields, click Next.
Step 5, webhook
In this step, the return address (URL) of the webhook will be configured.When filling out the webhook address, Banco do Brasil is responsible for notifying us when a PIX collection occurs, and, automatically, the bill will be posted on Protheus. When it is not filled in, the Protheus application is responsible for asking Banco do Brasil through the execution of JOB/Schedule (FINA892) if there is any PIX receipt, and, if any, the system identifies the bill in the financial and automatically performs the posting.
After filling or not, click the Next button.

Step 6, wizard completion screen.
Click Complete.
