Package-level declarations

Types

Link copied to clipboard

Type of organization receiving the transaction.

Link copied to clipboard
@Serializable
data class AccountBalanceRequest(val initiator: String, val securityCredential: String, val commandId: String, val partyA: String, val identifierType: String, val resultUrl: String, val queueTimeOutUrl: String, val remarks: String)

Account balance request.

Link copied to clipboard

This is a unique command that specifies B2C transaction type.

Link copied to clipboard
@Serializable
data class B2cRequest(val initiatorName: String, val securityCredential: String, val commandId: String, val amount: Float, val partyA: String, val partyB: String, val resultUrl: String, val queueTimeOutUrl: String, val remarks: String, val occasion: String)

B2c request

Link copied to clipboard

This is the transaction type that is used to identify the transaction when sending the request to M-PESA.

Link copied to clipboard
@Serializable
data class C2bRegisterRequest(val shortCode: String, val responseType: String, val confirmationUrl: String, val validationUrl: String)

C2b register request

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

C2b request

Link copied to clipboard
@Serializable
data class DynamicQrRequest(val merchantName: String, val refNo: String, val amount: String, val trxCode: String, val cpi: String)

Dynamic QR request

Link copied to clipboard

Dynamic QR transaction type.

Link copied to clipboard
@Serializable
data class StkPushQueryRequest(val businessShortCode: String, val password: String, val timestamp: String, val checkoutRequestId: String)

Stk push query request

Link copied to clipboard
@Serializable
data class StkPushRequest(val businessShortCode: String, val password: String, val timestamp: String, val transactionType: String, val amount: String, val phoneNumber: String, val partyA: String, val partyB: String, val callBackUrl: String, val accountReference: String, val transactionDesc: String)

Stk push request

Link copied to clipboard

This is the transaction type that is used to identify the transaction when sending the request to M-PESA.

Link copied to clipboard
@Serializable
data class TransactionReversalRequest(val initiator: String, val securityCredential: String, val commandId: String, val transactionId: String, val amount: String, val receiverParty: String, val receiverIdentifierType: String, val resultUrl: String, val queueTimeOutUrl: String, val remarks: String, val occasion: String)

Transaction reversal request.

Link copied to clipboard

Type of organization receiving the transaction.

Link copied to clipboard
@Serializable
data class TransactionStatusRequest(val initiator: String, val securityCredential: String, val commandId: String, val transactionId: String, val originatorConversationId: String, val partyA: String, val identifierType: String, val resultUrl: String, val queueTimeOutUrl: String, val remarks: String, val occasion: String)

Transaction status request.