Authorization with mTLS

P12 certificate

All requests for the Pix API must contain a security certificate that will be provided by Gestoranet within your account, in the format PFX(.p12). Auth2 provides an authorization mechanism called mutual Transport Layer Security (mTLS) through the certificate issued in your Gestoret account, this method adds another level of security to the requests trafficked between your application and the Gestoret API. This requirement is fully described in PIX Security Manual.

Generating a P12 certificate

To generate your certificate, just follow the steps below:

  1. Access the item "API" in the top menu of the Gestãonet account;
  2. On the left menu, click on "My Certificates";
  3. In the new window, select the environment to which the certificate will belong (Production or Approval)
  4. Click on "New Certificate" (orange button);
  5. Assign a description to the certificate to identify it in the future;
  6. Confirm the certificate creation;
  7. Finally, download the certificate.

Access authorization for application

The Gerencianet API is RESTful, the requests/responses are in JSON and we use the OAuth2 as an API authorization framework. OAuth2 requests must use their respective base endpoint:

"URL": {
"sandbox": "https://api-pix-h.gerencianet.com.br"
},

Endpoint: Authorize

The Gerencianet API supports the OAuth 2.0 protocol to authorize access to the API. Requests are authenticated using HTTP Basic Auth.

The purpose of the OAuth2 protocol is to exchange a chain of tokens between the Client and Server Resource. This token is used to authenticate all API calls using Authorization in the HTTP header.

The base endpoint for authentication is represented below:

"authorize": {
"route": "/oauth/token",
"method": "post"