API Documentation
API #1: Create Merchant
Endpoint
POST localhost:8082/public/v2/merchants/
// Change the localhost to your server
Headers
Header Name | Value |
---|---|
apiKey |
aW5mb0BlZGZhcGF5LnNhOjEyMzQ1Njc4 |
Content-Type |
application/json |
Cookie |
JSESSIONID=DC95FD72A71E5EB2E95FF221F87361F5 |
Request Body
{
"merchantName": "Afnan A",
"email": "okafnan1@gmail.com",
"phoneNumber": "+923122405392",
"sendEmail": true
}
Response
{
"responseCode": "200",
"responseDescription": "Public Merchant Created Successfully...",
"merchantId": "0e0b76a9-7582-4baf-90d9-7cc7c33e114e"
}
API #2: Add Terminal
Endpoint
POST localhost:8082/public/v2/addTerminal/
// Change the localhost to your server
Headers
Header Name | Value |
---|---|
apiKey |
aW5mb0BlZGZhcGF5LnNhOjEyMzQ1Njc4 |
Content-Type |
application/json |
Cookie |
JSESSIONID=DC95FD72A71E5EB2E95FF221F87361F5 |
Request Body
{
"merchantId": "45af8f60-4ac8-43a8-b7e6-1408f864807b", //use merchantId which created from Merchant API
"merchantEmail": "okafnan@gmail.com",
"onBoardingStatus": false,
"tsn": "1010101",
"terminalId": "1010101",
"hardwareSerialNumber": "1010101"
}
Response
{
"responseCode": "200",
"responseDescription": "Add New Terminal Successfully"
}
API #3: Create User
Endpoint
POST localhost:8082/public/v2/users/
// Change the localhost to your server
Headers
Header Name | Value |
---|---|
apiKey |
aW5mb0BlZGZhcGF5LnNhOjEyMzQ1Njc4 |
Content-Type |
application/json |
Cookie |
JSESSIONID=DC95FD72A71E5EB2E95FF221F87361F5 |
Request Body
{
"merchantId": "45af8f60-4ac8-43a8-b7e6-1408f864807b", //use merchantId which created from Merchant API
"firstName": "Afnan Test",
"lastName": "Test21122121",
"username": "966565656500",
"email": "afnan51020@gmail.com",
"phoneNumber": "+966565656500a",
"outletId": "120853a5-07c4-4e8c-a6df-773f5e20eeaf"
}
Response
{
"responseCode": "200",
"responseDescription": "Public User Created Successfully...",
"userId": "60298cba-d6e4-43df-8040-d95ece4f194a"
}