Zain Cash Result Endpoint
GET /api/e-payment/zaincash/result
Parameters
token: token sent by zain cash api
orderId: the order id
businessId: the business id
Responses
1- Success
Status Code: 200 - OK
info: retruns transaction details
body:
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"businessId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"paymentGatewayId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"orderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "Pending",
"amount": 0,
"paymentId": "string",
"integrity": "string",
"resourcePath": "string",
"resultCode": "string",
"resultDescription": "string",
"doneAt": "2025-09-17T15:03:49.195Z",
"paymentType": "ZainCash",
"createdAt": "2025-09-17T15:03:49.195Z",
"frontendRedirectUrl": "string",
"customer": {
"id": "string",
"name": "string",
"image": "string",
"email": "string",
"address": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"businessId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"customerId": "string",
"name": "string",
"country": "string",
"state": "string",
"city": "string",
"line1": "string",
"line2": "string",
"zipCode": "string",
"phoneNumber": "string",
"createdAt": "2025-09-17T15:03:49.195Z",
"latitude": 0,
"longitude": 0
}
}
}
2- redirect
Status Code: 302 - Found
info: redirect the user to the frontendRedirectUrl and adds two get parameters status & transactionId.
3- invalid order id
Status Code: 400 - Bad Request
info: order id is not valid
body:
invalid order id
4- transaction not found
Status Code: 404 - Not Found
info: transaction with the id is not found
body:
transaction not found
5- transaction already done
Status Code: 400 - Bad Request
info: that means the transaction already has resourcePath which means its done
body:
transaction already done
6- payment type is not online
Status Code: 404 - Not Found
info: the order is not of payment type online
body:
payment type is not online
7- payment gateway not found
Status Code: 404 - Not Found
info: payment gateway not found
body:
payment gateway not found
8- invalid payment gateway type
Status Code: 400 - Bad Request
info: the payment gateway type is not valid
body:
invalid payment gateway type
8- token is required
Status Code: 400 - Bad Request
info: token Get Parameter is not sent
body:
token is required