C2bRequest

@Serializable
data class C2bRequest(val shortCode: String, val commandId: String, val amount: String, val msisdn: String, val billRefNumber: String)

C2b request

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.

Constructors

Link copied to clipboard
constructor(shortCode: String, c2bCommandId: C2bCommandId, amount: String, msisdn: String, billRefNumber: String)
constructor(shortCode: String, commandId: String, amount: String, msisdn: String, billRefNumber: String)

Properties

Link copied to clipboard
@SerialName(value = "Amount")
val amount: String
Link copied to clipboard
@SerialName(value = "BillRefNumber")
val billRefNumber: String
Link copied to clipboard
@SerialName(value = "CommandID")
val commandId: String
Link copied to clipboard
@SerialName(value = "Msisdn")
val msisdn: String
Link copied to clipboard
@SerialName(value = "ShortCode")
val shortCode: String