2. Authentication Flow Overview                  

2. Authentication Flow Overview                  

The OAuth authentication process follows these steps:

  1. The backend authenticates with PagBrasil using Basic Authentication.

  2. An access token is generated via the OAuth endpoint.

  3. The backend stores and manages the token lifecycle.

  4. The frontend receives and attaches the access token to PagBrasil.JS

  5. PagBrasil.JS uses the access token to authorize payment requests.

CONFIDENTIAL