Authentication - Login
This API will take merchant credentials such as SadadId, webssite and secretkey and provide access token if request is correct. For authentication, merchants should be registered in Sadad Payment Solution. Merchant should have SadadID, registered website and valid secret key. You have to generate secret API Keys for the test and live modes. No real money is used in test mode.
- POST
https://api-sandbox.sadad.qa/api//userbusinesses/login
Permission: Merchant
- Example Usage
curl -d '{"sadadId": 9288463, "secretKey": "aXXXXXXXXXXXXXX7", "domain": "www.xxxxxxx.com"}' -H "Content-Type: application/json" -X POST https://api-s.sadad.qa/api/userbusinesses/login
| Field | Type | Description |
|---|---|---|
| sadadId | Number | Unique Sadad user Id |
| secretKey | String | API secret key generated by merchant |
| domain | String | Domain name for which the API key is generated |
- Request-Example
{
"sadadId": 9288463,
"secretKey": "aXXXXXXXXXXXXXX7",
"domain": "www.xxxxxxx.com"
}
Success 200
| Field | Type | Description |
|---|---|---|
| accessToken | String | The accesstoken using which merchant can use other APIs. |
- Success-Response
{
"accessToken": "EUgQYPvPTfCzb7dUW67kT4725jNB31ISxTE0oHQfna4lEyrGNcBlVIn0OyYepVSd"
}
Error 4xx
| Field | Description |
|---|---|
| 401 | Invalid credentials! |
| 400 | User is blocked! |
- Error-Response
{
"error": {
"statusCode": 401,
"name": "Error",
"message": "Invalid credentials !"
}
}