Authentication - API Key
To use Axis Banking integration APIs, you must have an API Key, which can be obtained through one of our representatives and/or through our portal.
1How use your API Key in requests http
Before making any request to the integration APIs, you need to include the API Key in the request header using the Authorization parameter. The API Key should be encoded in base64 format.
const secretKey = 'Basic ' + Buffer.from('secret:' + 'your-secret-key').toString('base64');Here is an example of how to use your API Key in a CURL command, which demonstrates including the API Key in the header. You can also use this example for making requests via Postman.
1. CURL
curl --request GET \
--url https://api.axisbanking.com.br/transactions/:transactionId \
--header 'Accept: application/json' \
--header 'Authorization: Basic {INSERT_API_KEY}'2Error Response
Finally, if the API Key is not informed and/or is invalid, requests will issue a 403 error with the return:
{
"message": "Unauthorized",
"statusCode": 401
}Handle Errors Gracefully
Implement proper error handling and retry logic for failed requests.
Need more help?
Check our complete API reference or contact our support team for assistance.