C2bRequest

constructor(shortCode: String, c2bCommandId: C2bCommandId, amount: String, msisdn: String, billRefNumber: String)

Parameters

shortCode

Usually, a unique number is tagged to an M-PESA pay bill/till number of the organization.

c2bCommandId

This is a unique command that specifies B2C transaction type. Sample: C2bCommandId.CustomerPayBillOnline .

amount

The amount of money being sent to the short code.

msisdn

This is the mobile number of the customer making the payment. Sample: MSISDN (12 digits Mobile Number) e.g. 254XXXXXXXXX.

billRefNumber

This is the account number for which the customer is making the payment. This is only applicable to Customer PayBill Transactions. Sample: An alphanumeric value of up to 20 characters.


constructor(shortCode: String, commandId: String, amount: String, msisdn: String, billRefNumber: String)

Parameters

shortCode

Usually, a unique number is tagged to an M-PESA pay bill/till number of the organization.

commandId

This is a unique command that specifies B2C transaction type.

amount

The amount of money being sent to the short code.

msisdn

This is the mobile number of the customer making the payment. Sample: MSISDN (12 digits Mobile Number) e.g. 254XXXXXXXXX.

billRefNumber

This is the account number for which the customer is making the payment. This is only applicable to Customer PayBill Transactions. Sample: An alphanumeric value of up to 20 characters.