DefaultRepository
The DefaultRepository class is responsible for making network calls to the MTN MOMO APIs.
This class holds all the common API methods for various MTN MOMO products, including user management, transaction processing, and status checks.
Constructors
Functions
Initiates a backchannel (CIBA) authorization request.
Cancels a pending Collection invoice before it is paid or expires.
Cancels an active Collection pre-approval, immediately revoking the merchant's ability to debit the payer's wallet without per-transaction consent.
Initiates a Remittance cash transfer using the V2 endpoint with optional KYC fields about the sending party. This replaces the legacy V1 transfer for cross-border remittance use cases where the sender is not a registered MTN mobile money subscriber.
Checks whether the supplied API user exists.
Gets the API Key based on the ApiUser Id and OCP Subscription Id.
Creates a new API user.
Creates a Collection invoice, prompting the intended payer to approve payment from their wallet.
Creates a Collection pre-approval, authorising the merchant to debit the payer's wallet without requiring per-transaction consent until the pre-approval expires.
Gets the Access Token based on the ApiUser ID, OCP Subscription Id, and the API Key.
Retrieves the account balance, optionally filtered by currency.
Retrieves the basic user information for a specified MTN MOMO user.
Retrieves the status of a previously initiated Remittance cash transfer.
Retrieves the status of a previously initiated deposit transaction.
Retrieves the current status of a previously created Collection invoice.
Obtains an OAuth2 access token for use with consent-based API endpoints.
Retrieves the current status of a previously created Collection pre-approval.
Retrieves the status of a previously initiated refund transaction.
Retrieves the status of a previously initiated fund transfer.
Retrieves extended user information for a MTN MOMO user who has granted consent.
Initiates a request-to-pay directly via the Collection service.
Sends a delivery notification to the payer for an existing request-to-pay transaction.
Retrieves the status of a previously initiated request-to-pay transaction.
Initiates a request-to-withdraw directly via the Collection service.
Sends a delivery notification to the payer for an existing request-to-withdraw transaction.
Retrieves the status of a previously initiated request-to-withdraw transaction.
Safely makes an API call and returns the result.
Initiates a fund transfer to a specified account.
Validates whether the specified account holder is active in the MTN MOMO system.