Get Authenticated
Authorization Header
To authenticate your requests to the Boodle API you must place your merchant secret in the Authorization header of your HTTP requests as a Bearer token. This must be done for all requests made.
info
Sample Authorization Header
Authorization: Bearer {{secret}}
If for whatever reason you feel that your secret has been compromised, please contact us urgently to request a new one.
Check your authorisation
To check that you have configured your request correctly and that you are authenticated you can make a POST request to our {{baseUrl}}/merchant/auth/verify-authorisation
endpoint.
var axios = require('axios');
var config = {
method: 'post',
url: '{{baseUrl}}/merchant/auth/verify-authorisation',
headers: {
'Authorization': 'Bearer {{secret}}'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Example response:
{
"message": "Your request is authorised",
"success": true,
"data": {
"merchant": {
"createdAt": "2022-03-14T06:45:08.000Z",
"updatedAt": "2022-03-22T14:33:52.000Z",
"name": "MERCHANT_NAME",
"branchName": "BRANCH_NAME",
"emailAddress": null,
"cellphoneNumber": null,
"logoString": null,
"currentPayPointAliasNumber": 1
},
"merchantId": 5
}
}
You do not need to store any of the above information, it's just so that you can check that you are authenticated against our API