Skip to main content

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.

Alt test Endpoint: https://sandbox.sasapay.app/api/v1/transactions/status-query/

Request Parameters

FieldTypeDescriptionExample
MerchantCodeNumberA 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
CheckoutRequestIdAlpha-NumericA unique identifier of the transaction generated by the SasaPay API. This field is optional.6e1e251f-afb0-****-a097-f1ae0e0b2ce6
MerchantTransactionReferenceAlpha-NumericA unique identifier of the transaction generated by the Merchant system. This ield is optional.123456****4
TransactionCodeAlpha-NumericA unique identifier of the transaction generated by the SasaPay API. This ield is optional.EDSWKTT****FR
CallbackUrlURLThe callback URL where SasaPay will send transaction status details.https://example.com
sample request
Headers
Key: Authorization
Value: Bearer cFJZcjZ6anEwaThM6UmYyMkJmWm9nMHFRR2xWOQ==
Body:
{
"MerchantCode":"6*****2",
"CheckoutRequestId": "6e1e251f-afb0-****-a097-f1ae0e0b2ce6",
"MerchantTransactionReference":"123456****4",
"TransactionCode":"EDSWKTT****FR",
"CallbackUrl": "https://example.com"
}

Response Parameters

FieldTypeDescriptionExample
MerchantCodeStringA unique number assigned to an organization/merchant registered with ViewTech, through which payment is received (can be Paybill or Till number)40****9
statusBoolThis 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
TransactionTypeStringThis indicates the type of transaction performed.C2B
TransactionDateTimeThis is the timestamp of when the transaction was performed."2022-05-09T10:50:48.359022Z"
CheckoutIdStringA 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
TransactionAmountNumericThe amount of money the customer is expected to pay as per the transaction.'100'
PaidBoolThis is a true o false status showing whether the customer paid or not.true
AmountPaidNumericThis is the actual amount of money paid by the customer.'100'
PaidDateStringThis indicates the date and time the customer paid for the transaction.2022-05-09T10:50:48.359022Z
SourceChannelStringThis is the source of the funds facilitating the transaction.'SasaPay'
DestinationChannelStringThis is the destination of the funds from the transaction.'M-PESA'
sample response
{
"status": true,
"message": "Your request has been received. Check your callback url for response"
}

Check Transaction Status(Deprecated)

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.

Alt test Endpoint: https://sandbox.sasapay.app/api/v1/transactions/status/

Request Parameters

FieldTypeDescriptionExample
MerchantCodeNumberA 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
CheckoutRequestIdAlpha-NumericA unique identifier of the transaction generated by the SasaPay API. This field is optional.6e1e251f-afb0-****-a097-f1ae0e0b2ce6
MerchantTransactionReferenceAlpha-NumericA unique identifier of the transaction generated by the Merchant system. This ield is optional.123456****4
TransactionCodeAlpha-NumericA 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

FieldTypeDescriptionExample
MerchantCodeStringA unique number assigned to an organization/merchant registered with ViewTech, through which payment is received (can be Paybill or Till number)40****9
statusBoolThis 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
TransactionTypeStringThis indicates the type of transaction performed.C2B
TransactionDateTimeThis is the timestamp of when the transaction was performed."2022-05-09T10:50:48.359022Z"
CheckoutIdStringA 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
TransactionAmountNumericThe amount of money the customer is expected to pay as per the transaction.'100'
PaidBoolThis is a true o false status showing whether the customer paid or not.true
AmountPaidNumericThis is the actual amount of money paid by the customer.'100'
PaidDateStringThis indicates the date and time the customer paid for the transaction.2022-05-09T10:50:48.359022Z
SourceChannelStringThis is the source of the funds facilitating the transaction.'SasaPay'
DestinationChannelStringThis is the destination of the funds from the transaction.'M-PESA'
sample response
{
"status": true,
"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"
}
}