Get-Single-Transaction
This API is used to get single transaction detail of merchant By providing correct/required filters with the correct access token, merchant user will get a transaction’s details in JSON format.
Transaction Status Description
- Inprogress
- Failed
- Success
- Refund
- Pending
- Onhold
- Rejected
Transaction Mode Description
- Credit Card
- Debit Card
- Sadad
Transaction Entity Description
- Invoice
- Product Invoice
- Add Funds
- Withdrawal
- Transfer
- Order
- Website Payment
- QR Transfer
- SDK Payment
- AJAX Payment
- Product Subscription Detail
- Calender Webcheckout
- GET
https://api-sandbox.sadad.qa/api//transactions/getTransaction
Permission: Merchant
- Example usage:
curl -d "@data.json" -H "Content-Type: application/json" -H "Accept: application/json" -H "Authorization: {ACCESS_TOKEN}" -X GET https://api-sandbox.sadad.qa/api/transactions/getTransaction
Header
| Field | Type | Description |
|---|---|---|
| Authorization | String | User's unique access-token |
| Content-Type | String | application/json |
| User-Agent | String | The User-Agent request header is a characteristic string that lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent. |
| Origin | String | Origin should be available in request header. |
- Header-Example:
{
"Authorization": "BN79o6YNrY4IPP60UF4JmNEM6O8hX9HVUq0e0HWNyo2tt1jqCT9IWnXSBhfr7Mws"
}
Parameter
| Field | Type | Description |
|---|---|---|
| transactionno | String | transaction number to fetch |
- Request-Example:
{
"transactionno": "SD33XXXXXXXXXX8"
}
Success 200
| Field | Type | Description |
|---|---|---|
| entityid | Number | Associated entity id such as invoice/order etc |
| invoicenumber | String | Transaction number |
| isRefund | Boolean | Transaction is refunded or not |
| amount | Number | Transaction amount |
| servicecharge | Number | Service charge of transaction |
| website_ref_no | String | It’s a order_id of checkout page that received from merchant side |
| transaction_summary | String | Transaction summary text |
| refundcharge | Number | If refunded then refund charges |
| id | Number | Unique transaction data id |
| transactiondate | String | Date of transaction |
| transactionentityId | Number | Transaction entity type id such as invoice/order etc |
| transactionmodeId | Number | Transaction payment mode id such as via credit/debit or via sadad |
| transactionstatusId | Number | Transaction status id such as inprogress/success/failure |
| guestuserId | Number | Transaction has been done through non sadad user then received that user id as a guestuserId with detail |
| senderId | Object/Number | Transaction sender id with details |
| receiverId | Object/Number | Transaction receiver id with details |
| transactionentity | Object | Transaction entity id detail |
| transactionstatus | Object | Transaction status id detail |
| transactionmode | Object | Transaction mode id detail |
| guestuser | Object | Guest user id details |
- Success-Response:
{
"entityid": 9230,
"isRefund": false,
"invoicenumber": "SD33XXXXXXXXXX8",
"amount": 1,
"servicecharge": 0.025,
"website_ref_no": null,
"transaction_summary": null,
"refundcharge": 0,
"id": 25291,
"transactiondate": "2021-01-11",
"transactionentityId": 1,
"transactionmodeId": 1,
"transactionstatusId": 3,
"guestuserId": 147,
"senderId": 0,
"receiverId": {
"SadadId": "1853219",
"name": "User1",
"cellnumber": "54XXXXX5",
"id": 466
},
"transactionentity": {
"name": "INVOICE",
"id": 1
},
"transactionstatus": {
"name": "SUCCESS",
"id": 3
},
"transactionmode": {
"name": "CREDIT CARD",
"id": 1
},
"guestuser": {
"cellnumber": "9XXXXXXXXXX3",
"id": 147
}
}
Error 4xx
| Field | Description |
|---|---|
| 401 | Authorization Required |
| 400 | Invalid data |
| 404 | Data not found |
- Response-Example:
{
"error": {
"statusCode": 404,
"name": "Error",
"message": "Transaction not found"
}
}