Skip to main content
Version: 1.0

Library Usage — Remittance

Remittance APIs let you send international transfers to Mobile Money accounts and check their status.

All flows require a valid Bearer access token stored in CredentialStorage.


Transfer

Sends a cross-border remittance to a recipient's Mobile Money account.

defaultRepository.transfer(
productType = ProductType.REMITTANCE.productType,
apiVersion = "v1_0",
momoTransaction = MomoTransaction(
amount = "500",
currency = "EUR",
externalId = UUID.randomUUID().toString(),
payee = AccountHolder(partyIdType = "MSISDN", partyId = "256770000000"),
payerMessage = "Remittance from abroad",
payeeNote = "Family support"
),
uuid = UUID.randomUUID().toString(),
productSubscriptionKey = remittancePrimaryKey,
environment = "sandbox"
).collect { result ->
when (result) {
is NetworkResult.Success -> { /* transfer initiated */ }
is NetworkResult.Error -> { /* failed */ }
is NetworkResult.Loading -> { /* in progress */ }
}
}
ParameterTypeDescription
productTypeStringProductType.REMITTANCE.productType
apiVersionStringAPI version, e.g. "v1_0"
momoTransactionMomoTransactionTransfer details (amount, currency, payee, messages)
uuidStringUnique reference ID — save this to poll for status
productSubscriptionKeyStringRemittance primary subscription key
environmentString"sandbox" or "production"

Get Transfer Status

Retrieves the status of a previously initiated remittance transfer.

defaultRepository.getTransferStatus(
productType = ProductType.REMITTANCE.productType,
apiVersion = "v1_0",
referenceId = transferUuid,
productSubscriptionKey = remittancePrimaryKey,
environment = "sandbox"
).collect { result ->
when (result) {
is NetworkResult.Success -> { /* parse result.response */ }
is NetworkResult.Error -> { /* failed */ }
is NetworkResult.Loading -> { /* in progress */ }
}
}
ParameterTypeDescription
productTypeStringProductType.REMITTANCE.productType
apiVersionStringAPI version
referenceIdStringUUID used when calling transfer
productSubscriptionKeyStringRemittance primary subscription key
environmentString"sandbox" or "production"