mtn-momo-client
Version:
A collection of utils to interact with the mtn-momo api
30 lines (29 loc) • 1.79 kB
TypeScript
import { Product } from '../types';
import type { CreateProductClientOptions } from './common/client';
import type { FetchAccountBalance } from './common/createAccountBalanceFetcher';
import type { FetchBasicUserInfo } from './common/createGetBasicUserInfo';
import type { RequestToPayDeliveryNotification } from './common/createRequestToPayDeliveryNotification';
import type { InitiateTransaction } from './common/createTransactionInitiator';
import type { FetchTransactionStatus } from './common/createTransactionStatusFetcher';
import type { ValidateAccountHolderStatus } from './common/createValidateAccountHolderStatus';
type CreateRemittanceAPIOptions = Omit<CreateProductClientOptions, 'targetProduct'>;
type CreateRemittanceAPIResult = {
/**
* Transfer operation is used to transfer an amount from the own account to a payee account.
*/
transfer: InitiateTransaction<Product.Remittance>;
/**
* This operation is used to get the status of a transfer.
*/
getTransferStatus: FetchTransactionStatus<Product.Remittance>;
/** Get the balance of the account */
getAccountBalance: FetchAccountBalance;
/** This operation returns personal information of the account holder. The operation does not need any consent by the account holder. */
getBasicUserInfo: FetchBasicUserInfo;
/** This operation is used to check if an account holder is registered and active in the system. */
validateAccountHolderStatus: ValidateAccountHolderStatus;
/** This operation is used to send additional Notification to an End User. */
requestToPayDeliveryNotification: RequestToPayDeliveryNotification;
};
declare const createRemittanceAPI: (options: CreateRemittanceAPIOptions) => CreateRemittanceAPIResult;
export { createRemittanceAPI };