Package-level declarations

Types

Link copied to clipboard
data class AccountBalance(var availableBalance: String, var currency: String)

Represents the account balance returned by the MTN MOMO API.

Link copied to clipboard
data class AccountHolderStatus(var result: Boolean)

Represents the active/inactive status of an account holder in the MTN MOMO system.

Link copied to clipboard
data class Address(var formatted: String? = null, var streetAddress: String? = null, var postalCode: String? = null, var locality: String? = null, var region: String? = null, var country: String? = null)

Represents the nested address object returned within UserInfoWithConsent by the MTN MOMO GET /oauth2/{version}/userinfo endpoint.

Link copied to clipboard
data class ApprovedPreApprovals(val preApprovalDetails: List<PreApprovalDetails> = emptyList())

Wraps the response of the MTN MOMO Collection getApprovedPreApprovals endpoint, which returns a preApprovalDetails array of PreApprovalDetails entries for the queried account holder.

Link copied to clipboard
data class BasicUserInfo(var sub: String? = null, var name: String? = null, var givenName: String? = null, var familyName: String? = null, var birthDate: String? = null, var locale: String? = null, var gender: String? = null, var status: String? = null, var updatedAt: Int? = null, var displayUpdatedAt: String = "")

Data class representing basic user information (KYC payload) returned by the MTN MOMO API.

Link copied to clipboard
data class BcAuthorizeRequest(val loginHint: String, val scope: String, val accessType: String)

Request parameters for a backchannel (CIBA) authorization call.

Link copied to clipboard
data class BcAuthorizeResponse(var authReqId: String, var interval: Int, var expiresIn: Int)

Represents the response from an account authorization request.

Link copied to clipboard
data class CashTransfer(val amount: String, val currency: String, val externalId: String, val payee: Party, val payerMessage: String, val payeeNote: String, val payerIdentificationType: PayerIdentificationType? = null, val payerIdentificationNumber: String? = null, val payerIdentity: String? = null, val payerFirstName: String? = null, val payerSurName: String? = null, val payerLanguageCode: String? = null, val payerEmail: String? = null, val payerMsisdn: String? = null, val payerGender: String? = null, val originatingCountry: String? = null, val originalAmount: String? = null, val originalCurrency: String? = null)

Represents a Remittance cash transfer request sent to the MTN MOMO Cash Transfer V2 API.

Link copied to clipboard
data class CashTransferStatus(val financialTransactionId: String? = null, val status: String? = null, val reason: String? = null, val amount: String? = null, val currency: String? = null, val payee: Party? = null, val externalId: String? = null, val originatingCountry: String? = null, val originalAmount: String? = null, val originalCurrency: String? = null, val payerMessage: String? = null, val payeeNote: String? = null, val payerIdentificationType: PayerIdentificationType? = null, val payerIdentificationNumber: String? = null, val payerIdentity: String? = null, val payerFirstName: String? = null, val payerSurName: String? = null, val payerLanguageCode: String? = null, val payerEmail: String? = null, val payerMsisdn: String? = null, val payerGender: String? = null)

Represents the status of a Remittance cash transfer, returned by getCashTransferStatus (GET /remittance/{apiVersion}/cashtransfer/{referenceId}).

Link copied to clipboard
data class Deposit(val amount: String, val currency: String, val externalId: String, val payee: Party? = null, val payerMessage: String, val payeeNote: String)

Request body for the Disbursements deposit operation, crediting the payee account.

Link copied to clipboard
data class DepositStatus(val amount: String? = null, val currency: String? = null, val financialTransactionId: String? = null, val externalId: String? = null, val payee: Party? = null, val payerMessage: String? = null, val payeeNote: String? = null, val status: StatusTypes? = null, val reason: ErrorResponse? = null)

Represents the status of a Disbursements deposit, returned by getDepositStatus (GET /disbursement/{apiVersion}/deposit/{referenceId}).

Link copied to clipboard
data class ErrorResponse(var code: String, var message: String, var error: String? = null)

Represents an error response returned by the MTN MOMO API.

Link copied to clipboard
data class Invoice(val externalId: String, val amount: String, val currency: String, val validityDuration: String? = null, val intendedPayer: Party? = null, val payee: Party? = null, val description: String? = null)

Represents a Collection invoice request sent to the MTN MOMO Invoice API.

Link copied to clipboard
data class InvoiceCancellation(val externalId: String)

Request body sent when cancelling a Collection invoice.

Link copied to clipboard
data class InvoiceStatus(val referenceId: String? = null, val externalId: String? = null, val amount: String? = null, val currency: String? = null, val status: StatusTypes? = null, val paymentReference: String? = null, val invoiceId: String? = null, val expiryDateTime: String? = null, val payeeFirstName: String? = null, val payeeLastName: String? = null, val errorReason: ErrorResponse? = null, val intendedPayer: Party? = null, val description: String? = null)

Represents the status of a Collection invoice, returned by getInvoiceStatus.

Link copied to clipboard
data class Money(var amount: String? = null, var currency: String? = null)

Represents a monetary amount in a given currency, matching the MTN MOMO API Money schema.

Link copied to clipboard
data class Notifications(var notificationMessage: String)

Data class representing a Momo notification.

Link copied to clipboard
data class Party(var partyIdType: PartyTypes, var partyId: String)

Identifies a party (payer or payee) in a MTN MOMO transaction.

Link copied to clipboard
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.

Link copied to clipboard
data class PaymentStatus(val referenceId: String? = null, val status: StatusTypes? = null, val financialTransactionId: String? = null, val reason: ApiErrorResponses? = null)

Represents the status of a Collection payment, returned by getPaymentStatus.

Link copied to clipboard
data class PreApproval(val payer: Party, val payerCurrency: String, val payerMessage: String? = null, val validityTime: Int)

Represents a Collection pre-approval request sent to the MTN MOMO Pre-approval API.

Link copied to clipboard
data class PreApprovalDetails(val preApprovalId: String, val toFri: String, val fromFri: String, val fromCurrency: String, val createdTime: String, val status: StatusTypes, val message: String, val approvedTime: String? = null, val expiryTime: String? = null, val frequency: FrequencyTypes? = null, val startDate: String? = null, val lastUsedDate: String? = null, val offer: String? = null, val externalId: String? = null, val maxDebitAmount: String? = null)

Represents a single pre-approval record returned by the MTN MOMO Collection API, e.g. an entry in the list from getApprovedPreApprovals.

Link copied to clipboard
data class PreApprovalStatus(val payer: Party? = null, val payerCurrency: String? = null, val payerMessage: String? = null, val status: StatusTypes? = null, val expirationDateTime: Long? = null, val reason: ErrorResponse? = null)

Represents the status of a single Collection pre-approval, returned by getPreApprovalStatus.

Link copied to clipboard
data class ProviderCallBackHost(val providerCallbackHost: String? = null)

Represents the callback host for the MTN MOMO API.

Link copied to clipboard
data class Refund(val amount: String, val currency: String, val externalId: String, val payerMessage: String, val payeeNote: String, val referenceIdToRefund: String? = null)

Request body for the Disbursements refund operation, reversing a previously completed transaction.

Link copied to clipboard
data class RefundStatus(val amount: String? = null, val currency: String? = null, val financialTransactionId: String? = null, val externalId: String? = null, val payee: Party? = null, val payerMessage: String? = null, val payeeNote: String? = null, val status: StatusTypes? = null, val reason: ErrorResponse? = null)

Represents the status of a Disbursements refund, returned by getRefundStatus (GET /disbursement/{apiVersion}/refund/{referenceId}).

Link copied to clipboard
data class RequestToPay(val amount: String, val currency: String, val externalId: String, val payer: Party? = null, val payee: Party? = null, val payerMessage: String, val payeeNote: String)

Request body for the Collection request-to-pay operation, prompting the payer to approve a debit.

Link copied to clipboard
data class RequestToPayStatus(val amount: String? = null, val currency: String? = null, val financialTransactionId: String? = null, val externalId: String? = null, val payer: Party? = null, val payerMessage: String? = null, val payeeNote: String? = null, val status: StatusTypes? = null, val reason: ErrorResponse? = null)

Represents the status of a Collection request-to-pay, returned by requestToPayTransactionStatus (GET /collection/{apiVersion}/requesttopay/{referenceId}).

Link copied to clipboard
data class RequestToWithdraw(val amount: String, val currency: String, val externalId: String, val payer: Party? = null, val payee: Party? = null, val payerMessage: String, val payeeNote: String)

Request body for the Collection request-to-withdraw operation, prompting the payer to approve a withdrawal.

Link copied to clipboard
data class RequestToWithdrawStatus(val amount: String? = null, val currency: String? = null, val financialTransactionId: String? = null, val externalId: String? = null, val payer: Party? = null, val payerMessage: String? = null, val payeeNote: String? = null, val status: StatusTypes? = null, val reason: ErrorResponse? = null)

Represents the status of a Collection request-to-withdraw, returned by requestToWithdrawTransactionStatus (GET /collection/{apiVersion}/requesttowithdraw/{referenceId}).

Link copied to clipboard
data class Transfer(val amount: String, val currency: String, val externalId: String, val payee: Party? = null, val payerMessage: String, val payeeNote: String)

Request body for the transfer operation, sending funds to the payee.

Link copied to clipboard
data class TransferStatus(val amount: String? = null, val currency: String? = null, val financialTransactionId: String? = null, val externalId: String? = null, val payee: Party? = null, val payerMessage: String? = null, val payeeNote: String? = null, val status: StatusTypes? = null, val reason: ErrorResponse? = null)

Represents the status of a transfer, returned by getTransferStatus (GET /{productType}/{apiVersion}/transfer/{referenceId}).

Link copied to clipboard
data class UserInfoWithConsent(var sub: String, var name: String, var givenName: String? = null, var familyName: String? = null, var birthDate: String? = null, var locale: String? = null, var gender: String? = null, var updatedAt: Int? = null, var status: String? = null, var middleName: String? = null, var email: String? = null, var emailVerified: Boolean? = null, var phonenumber: String? = null, var phoneNumberVerified: Boolean? = null, var address: Address? = null, var creditScore: Int? = null, var active: Boolean? = null, var countryOfBirth: String? = null, var regionOfBirth: String? = null, var cityOfBirth: String? = null, var occupation: String? = null, var employerName: String? = null, var identificationType: String? = null, var identificationValue: String? = null)

Represents extended user information returned by the MTN MOMO GET /oauth2/{version}/userinfo endpoint after the user grants consent.