1. Introduction                  

1. Introduction                  

This documentation describes how to authenticate requests made by PagBrasil.JS using OAuth 2.0 – Client Credentials flow. OAuth authentication is required to securely obtain an access token that will be used by PagBrasil.JS to authorize payment operations. The token is generated on the backend and must be periodically renewed due to its limited validity.

 

Advantages of using OAuth with PagBrasil.JS

  • The access token has a short lifespan, reducing security risks.

  • Token lifecycle (creation, expiration, renewal) is fully controlled by the backend.

CONFIDENTIAL