The Dynamic Token can be generated through an API call at the Get API Token endpoint. You will need your ApiUsername and ApiPassword, which can be found in the Admin Portal. This page guides you through the steps needed to create your Dynamic Token:
- Navigate to the Admin Portal.
- At the top-left corner, under the System tab, select the Merchant API Setup option.
- You will find your ApiUsername and ApiPassword on this page. You will need them to generate your token with the API.
- The endpoint will require you to send your credentials encoded in base64. The code below exemplifies how to encode it, replacing
username
andpassword
with your actual credentials:
echo -n '<username>:<password>' | base64
- After encoding it, call the Get API Token endpoint, adding the Authorization header with your encoded string as its value, as shown below:
curl --request GET \
--url https://merchantapi.testewallet.com/api/v1/authentication/login \
--header 'accept: application/json' \
--header 'authorization: Basic <ENCODED_STRING>'
This call will return a JSON response with your newly created token inside the data object. Below is an example of this response:
{
"isSuccess": true,
"message": "Success",
"statusCode": 0,
"logIdentifier": "123456789",
"data": {
"merchantId": "merchant123",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c2VyMTIzNDU2IiwiaWF0IjoxNjI2NzU2OTY0LCJleHAiOjE2MjY4NDMzNjR9.NV09P4GF1BD_cY9nMDrz9T39hNl4F2z3QlIM2XyZ8WA",
"expireInMinutes": 1440
}
}
Expiration date
The Dymanic Token expires every 24 hours. Remember to generate a new token before expiration.
Once generated, you can use your token to call the i-payout API.