SADAD Query Transaction
PayTabs provides you with a collection of API endpoints which used to process all payments, regardless of if they are through either your own payment pages, the managed payment pages, or if you are using the hosted payment pages.
If you have a sadad transaction that you want to fetch its details and know more about its status, type, etc... you can use the sadad query transaction endpoint, as it will return the details of the requested transaction. In this article, we walk you through how to use and manage the mentioned endpoint.The Endpoint and Related Postman Collection
In this tutorial, we will rely on the API Endpoint, mentioned on PayTabs API endpoints postman collection, which you can access fromKSA PayTabs Postman APIs Collection. The endpoint will need to be accessed with a POST request on the below-mentioned URL| POST | {{domain}}/payment/apm/sadad/ifs/inquiry |
|---|
Please note that not using the proper endpoint URL {domain} will lead to authentication issues within your responses. To find the your proper domain you can read ourWhat is my (Region)/(endpoint URL)?tutorial article.
- KSA
https://secure.paytabs.sa/payment/apm/sadad/ifs/inquiry
Request Parameters
To initiate a query payment request, there are minimum required parameters that need to be passed with valid information. The specification of these required parameters is clarified below according to the query type:Sadad Query via Transaction Reference
In this type, you can initiate query transaction requests using your "profile_id" and the requested "tran_ref". You will receive a response object of this specific transaction you referred to. Kindly check the request parameters' specifications below:
- The Minimum Required Parameters
| Parameter | Data Type | Min | Max | Required |
|---|---|---|---|---|
| INT | Accept only valid profile number | ✔ | |
| The merchant Profile ID you can get from your PayTabs dashboard. For more information please check ourHow to get your account information from PT Dashboard?tutorial article. To know more about this parameter pleaseclick here. | ||||
| ||||
| STRING | ✔ | ||
| Indicates the Transaction Reference on the PayTabs side. For more information please check ourRequest/Response Parameters | Transaction Reference (tran_ref).. | ||||
| ||||
Request & Response Payload Samples
This section is dedicated give you a sample API request payload using the above mentioned required parameters, along with showing you the response payload received upon using the request payload.- Required Parameters Sample Payloads
- Sample Request Payload
- Sample Response Payload
{
"profile_id": "59020",
"tran_ref": "TST2016700000692"
}
{
"tran_ref": "TST2330300802861",
"tran_type": "Payment Request",
"original_tran_type": "Sale",
"cart_id": "test_12346",
"cart_description": "ss",
"cart_currency": "SAR",
"cart_amount": "250.00",
"tran_currency": "SAR",
"tran_total": "250.00",
"customer_details": {
"name": "test test",
"email": "[email protected]",
"phone": "0505692765",
"street1": "test 123",
"city": "jeddah",
"state": "01",
"country": "SA",
"zip": "2343",
"ip": "109.82.212.59"
},
"shipping_details": {
"name": "test test",
"email": "[email protected]",
"phone": "0505692765",
"street1": "test 123",
"city": "jeddah",
"state": "01",
"country": "SA",
"zip": "2343"
},
"payment_result": {
"response_status": "P",
"response_code": "23432001250",
"response_message": "Pending",
"transaction_time": "2023-10-30T14:46:31Z"
},
"payment_info": {
"payment_method": "SADAD (IFS)",
"card_scheme": "Unknown",
"payment_description": "Sadad (IFS)",
"issuerCountry": "SA",
"issuerName": "IFS"
},
"serviceId": 2,
"profileId": 83373,
"merchantId": 2571,
"trace": "PMNT0202.654398F6.00027F6A"
}
The Payment Flow Experience
Reaching this stage, you are now able to track and understand theSADAD payment status through the expected flow behavior. Unlike the standard payment flow, SADAD follows a reference-based process where the final payment result depends on customer action. Below is an overview of how the SADAD status flow behaves:
- Initiating the SADAD Payment Request:
- The merchant’s system sends a SADAD payment request using the direct API.
- The request must comply with the structure and fields defined in theRequest & Response Payload Samples.
- Receiving the SADAD Reference:
Once the request is successfully processed, the system returns a SADAD reference number, for example:
"sadad_number":"23432001263" - Default Payment Status Behavior:
After the SADAD reference is generated, no immediate action is required from the merchant’s side. By default, if no payment action is taken by the customer, the payment status remains
"pending". This is the expected and normal behavior until the customer completes or attempts the payment. - Customer Completes the Payment:
The merchant shares the SADAD reference number with the customer. The customer then accesses their bank platform, enters the SADAD number, and confirms the payment.
If the customer successfully completes the payment, the SADAD status is updated to
"paid". - Declined or Failed Payments:
In cases where the customer attempts payment but the transaction is declined, the payment status will reflect the failure. Detailed information explaining the reason for the decline is returned within the
payment_resultobject of the status response.This allows the merchant to review the failure reason and take appropriate next steps:
{
........
........
........
,
"payment_result": {
"response_status": "D",
"response_code": "300",
"response_message": "Not authorised",
"acquirer_message": "Invalid Request",
"transaction_time": "2026-04-05T13:27:54Z"
},
"payment_info": {
"payment_method": "SADAD (IFS)",
"card_scheme": "Unknown",
"payment_description": "Sadad (IFS)",
"issuerCountry": "SA",
"issuerName": "Sadad"
},
........
........
}
to see the full response structure, please refer to the Request & Response Payload Samples section above.