Check Transaction Status
As a merchant, you need to check the status of the transaction to confirm that the payment was successful before completing the transaction. For every transaction, you must supply the Checkout Request ID. To make the you need to make a POST call to the following url with merchant code being mandatory and atleast one of the other fields.
Endpoint: https://sandbox.sasapay.app/api/v2/waas/transactions/status/
Request Parameters
Field | Type | Description | Example |
---|---|---|---|
merchantCode | Number | A unique number assigned to an organization/merchant registered with ViewTech, through which payment is received (can be Paybill or Till number). This field is Mandatory. | 40****9 |
checkoutRequestId | Alpha-Numeric | A unique identifier of the transaction generated by the SasaPay API. This field is optional. | 6e1e251f-afb0-****-a097-f1ae0e0b2ce6 |
merchantTransactionReference | Alpha-Numeric | A unique identifier of the transaction generated by the Merchant system. This ield is optional. | 123456****4 |
transactionCode | Alpha-Numeric | A unique identifier of the transaction generated by the SasaPay API. This ield is optional. | EDSWKTT****FR |
sample request
Headers
Key: Authorization
Value: Bearer cFJZcjZ6anEwaThM6UmYyMkJmWm9nMHFRR2xWOQ==
Body:
{
"merchantCode":"6*****2",
"checkoutRequestId": "6e1e251f-afb0-****-a097-f1ae0e0b2ce6",
"merchantTransactionReference":"123456****4",
"transactionCode":"EDSWKTT****FR"
}
Response Parameters
Field | Type | Description | Example |
---|---|---|---|
MerchantCode | String | A unique number assigned to an organization/merchant registered with ViewTech, through which payment is received (can be Paybill or Till number) | 40****9 |
status | Bool | This is a boolean value that indicates the status of the response. true means success and false means an error occurred or the request failed. | true |
TransactionType | String | This indicates the type of transaction performed. | C2B |
TransactionDate | Time | This is the timestamp of when the transaction was performed. | "2022-05-09T10:50:48.359022Z" |
CheckoutId | String | A unique identifier of the transaction generated by the Merchant system. This must be identical to the CheckoutRequestId used to query the transaction status. | 6e1e251f-afb0-****-a097-f1ae0e0b2ce6 |
TransactionAmount | Numeric | The amount of money the customer is expected to pay as per the transaction. | '100' |
Paid | Bool | This is a true o false status showing whether the customer paid or not. | true |
AmountPaid | Numeric | This is the actual amount of money paid by the customer. | '100' |
PaidDate | String | This indicates the date and time the customer paid for the transaction. | 2022-05-09T10:50:48.359022Z |
SourceChannel | String | This is the source of the funds facilitating the transaction. | 'SasaPay' |
DestinationChannel | String | This is the destination of the funds from the transaction. | 'M-PESA' |
sample response
{
"status": true,
"responseCode":"0",
"message": "B2C Transaction Details",
"data": {
"ResultCode": "0",
"ResultDescription": "The service request is processed successfully.",
"TransactionType": "B2C",
"TransactionDate": "2023-07-01T08:00:32.90984641Z",
"CheckoutRequestId": "93d0fc82-****-45b1-****-c71ddfe77dee",
"MerchantCode": "1****1",
"MerchantReference": "H*****145",
"TransactionAmount": "50.00",
"SourceChannel": "SasaPay",
"DestinationChannel": "ARTEL-MONEY",
"TransactionCode": "S****L48B****HR",
"ThirdPartyTransactionCode": "RG*&**0E9",
"DestinationAccountNumber": "25472******3",
"DestinationAccountName": "JOHN DOE"
}
}