c2bOnlineSimulation method

Future<MpesaResponse> c2bOnlineSimulation({
  1. required String phoneNumber,
  2. required double amount,
  3. String? billRefNumber,
  4. CbCommandID commandID = CbCommandID.CustomerPayBillOnline,
})

Make payment requests from Client to Business (C2B). Simulate is available on sandbox only phoneNumber This is the phone number initiating the C2B transaction. amount This is the amount being transacted. The parameter expected is a numeric value. billRefNumber This is used on CustomerPayBillOnline option only. This is where a customer is expected to enter a unique bill identifier, e.g. an Account Number. Alpha-Numeric less then 20 digits. commandID This is a unique identifier of the transaction type. (CustomerPayBillOnline, CustomerBuyGoodsOnline)

Implementation

Future<MpesaResponse> c2bOnlineSimulation({
  required String phoneNumber,
  required double amount,
  String? billRefNumber,
  CbCommandID commandID = CbCommandID.CustomerPayBillOnline,
}) {
  var _res = MpesaC2BSimulation(
    this,
    phoneNumber: phoneNumber,
    amount: amount,
    billRefNumber: billRefNumber,
    commandID: commandID,
  );

  return _res.process();
}