Generate an access token to authenticate requests to the APIs Split de Pagamento and the API E-commerce Cielo.
| Environment | Method | Endpoint |
|---|---|---|
| Sandbox | post | https://authsandbox.braspag.com.br/oauth2/token/ |
| Production | post | https://auth.braspag.com.br/oauth2/token/ |
The access token is required only for the following APIs:
- APIs Split de Pagamento (Sellers Onboarding, Split Reconciliation, Physical World, and Post-Transactional Split);
- API E-commerce Cielo.
The access token is not used in transactional requests for Split via Gateway de Pagamento. In this case, authentication is done exclusively using
MerchantIdandMerchantKey.See more details in the Resource list.
APIs Split de Pagamento and API E-commerce Cielo use the OAuth 2.0 protocol for authentication. Before making calls, you must generate an access token using your credentials:
MerchantId: identifier in Split Payment;ClientSecret: key used for authentication.
To obtain the access_token:
- Concatenate
MerchantIdandClientSecret:MerchantId:ClientSecret; - Encode the result in Base64;
- Send a request to the authorization server using the generated alphanumeric code.
Learn more at: How to generate Split de Pagamento credentials?
Theaccess_tokenis valid for 20 minutes. After expiration, generate a new token.You must send the
access_tokenreturned by the authentication API in all requests to APIs Split de Pagamento and API E-commerce Cielo as the authorization key.