Payment

data class Payment(var externalTransactionId: String? = null, var money: Money? = null, var customerReference: String? = null, var serviceProviderUserName: String? = null, var couponId: String? = null, var productId: String? = null, var productOfferingId: String? = null, var receiverMessage: String? = null, var senderNote: String? = null, var maxNumberOfRetries: Int? = null, var includeSenderCharges: Boolean? = null)

Represents a payment request to the MTN MOMO API. Reuses Money for the money amount.

Every field is optional so partial payloads never break deserialization.

Constructors

Link copied to clipboard
constructor(externalTransactionId: String? = null, money: Money? = null, customerReference: String? = null, serviceProviderUserName: String? = null, couponId: String? = null, productId: String? = null, productOfferingId: String? = null, receiverMessage: String? = null, senderNote: String? = null, maxNumberOfRetries: Int? = null, includeSenderCharges: Boolean? = null)

Properties

Link copied to clipboard

A coupon the user would like to redeem as part of this payment.

Link copied to clipboard

A customer reference for a provider (e.g., +46070911111).

Link copied to clipboard

An external transaction id to tie to the payment.

Link copied to clipboard

Whether sender charges (fee and tax paid by the sender) are included in the transaction amount. When true, charges are deducted from the amount before it is transferred to the receiver; the default (false) charges them on top of the transaction amount.

Link copied to clipboard

The maximum number of retries.

Link copied to clipboard
var money: Money?

The amount and currency of the payment.

Link copied to clipboard

Optional id of a product, used if paying for a product.

Link copied to clipboard

Optional id of a product offering, used when paying for a particular offering of a product.

Link copied to clipboard

A descriptive note for the receiver's transaction history.

Link copied to clipboard

A descriptive note for the sender's transaction history.

Link copied to clipboard

A service provider name (e.g., "Electricity Inc.").