transactionStatus method

Future<MpesaResponse> transactionStatus({
  1. required String transactionID,
  2. String? originatorConversationID,
  3. required IdentifierType identifierType,
  4. required String remarks,
  5. required String occassion,
  6. required String queueTimeOutURL,
  7. required String resultURL,
})

Check the status of a transaction transactionID This is the Mpesa Transaction ID of the transaction which you wish to reverse. originatorConversationID This is a global unique identifier for the transaction request returned by the API proxy upon successful request submission. If you don’t have the M-PESA transaction ID you can use this to query. identifierType Type of organization receiving the transaction (MSISDN, TillNumber, OrganizationShortCode) occassion Any additional information to be associated with the transaction. Sentence of upto 100 characters remarks Comments that are sent along with the transaction. Sentence of up to 100 characters queueTimeOutURL This is the URL to be specified in your request that will be used by API Proxy to send notification incase the payment request is timed out while awaiting processing in the queue. resultURL This is the URL to be specified in your request that will be used by M-PESA to send notification upon processing of the payment request.

Implementation

Future<MpesaResponse> transactionStatus({
  required String transactionID,
  String? originatorConversationID,
  required IdentifierType identifierType,
  required String remarks,
  required String occassion,
  required String queueTimeOutURL,
  required String resultURL,
}) {
  var _status = MpesaTransactionStatus(
    this,
    transactionID: transactionID,
    originatorConversationID: originatorConversationID ?? transactionID,
    identifierType: identifierType,
    remarks: remarks,
    occassion: occassion,
    queueTimeOutURL: queueTimeOutURL,
    resultURL: resultURL,
  );

  return _status.process();
}