MpesaB2c class

B2C API is an API used to make payments from a Business to Customers (Pay Outs). Also known as Bulk Disbursements. B2C API is used in several scenarios by businesses that require to either make Salary Payments, Cashback payments, Promotional Payments(e.g. betting winning payouts), winnings, financial institutions withdrawal of funds, loan disbursements etc.

Implemented types

Constructors

MpesaB2c(Mpesa mpesa, {required String phoneNumber, required double amount, required String remarks, required String occassion, required String queueTimeOutURL, required String resultURL, BcCommandId commandID = BcCommandId.BusinessPayment})

Properties

amount double
The amount of money being sent to the customer.
getter/setter pair
commandID BcCommandId
This is a unique command that specifies B2C transaction type. SalaryPayment: This supports sending money to both registered and unregistered M-Pesa customers. BusinessPayment: This is a normal business to customer payment, supports only M-PESA registered customers. PromotionPayment: This is a promotional payment to customers. The M-PESA notification message is a congratulatory message. Supports only M-PESA registered customers.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
mpesa Mpesa
getter/setter pairoverride
occassion String
Any additional information to be associated with the transaction. Sentence of upto 100 characters
getter/setter pair
payload Map<String, dynamic>
no setter
phoneNumber String
This is the customer mobile number to receive the amount. - The number should have the country code (254) without the plus sign.
getter/setter pair
queueTimeOutURL String
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.
getter/setter pair
remarks String
Any additional information to be associated with the transaction. Sentence of up to 100 characters
getter/setter pair
resultURL String
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.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
process() Future<MpesaResponse>
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited