moneroo-nodejs-sdk
Version:
Official Node.js SDK for Moneroo payment integration in Africa
119 lines (118 loc) • 4.38 kB
TypeScript
/**
* Enumeration of all available payment methods supported by Moneroo
*/
export declare enum PaymentMethod {
AirtelCD = "airtel_cd",// Airtel Congo
AirtelMW = "airtel_mw",// Airtel Money Malawi
AirtelNE = "airtel_ne",// Airtel Niger
AirtelNG = "airtel_ng",// Airtel Nigeria
AirtelRW = "airtel_rw",// Airtel Rwanda
AirtelTZ = "airtel_tz",// Airtel Tanzania
AirtelUG = "airtel_ug",// Airtel Uganda
AirtelZM = "airtel_zm",// Airtel Zambia
BankTransferNG = "bank_transfer_ng",// Bank Transfer NG
Barter = "barter",// Barter
CardGHS = "card_ghs",// Card GHS
CardKES = "card_kes",// Card KES
CardNGN = "card_ngn",// Card NGN
CardTZS = "card_tzs",// Card TZS
CardUGX = "card_ugx",// Card UGX
CardUSD = "card_usd",// Card USD
CardXAF = "card_xaf",// Card XAF
CardXOF = "card_xof",// Card XOF
CardZAR = "card_zar",// Card ZAR
CryptoEUR = "crypto_eur",// Crypto EUR
CryptoGHS = "crypto_ghs",// Crypto GHS
CryptoNGN = "crypto_ngn",// Crypto NGN
CryptoUSD = "crypto_usd",// Crypto USD
CryptoXAF = "crypto_xaf",// Crypto XAF
CryptoXOF = "crypto_xof",// Crypto XOF
EMoneySN = "e_money_sn",// E-Money SN
EUMobileCM = "eu_mobile_cm",// EU Mobile CM
FreeMoneySN = "freemoney_sn",// Free Money SN
HalopesaTZ = "halopesa_tz",// Halopesa TZ
MobiCashML = "mobi_cash_ml",// Mobi Cash ML
MonerooPaymentDemo = "moneroo_payment_demo",// Moneroo Demo
MoovBF = "moov_bf",// Moov BF
MoovBJ = "moov_bj",// Moov BJ
MoovCI = "moov_ci",// Moov CI
MoovML = "moov_ml",// Moov ML
MoovTG = "moov_tg",// Moov TG
MpesaKE = "mpesa_ke",// M-Pesa KE
MpesaTZ = "mpesa_tz",// M-Pesa TZ
MtnBJ = "mtn_bj",// MTN BJ
MtnCI = "mtn_ci",// MTN CI
MtnCM = "mtn_cm",// MTN CM
MtnGH = "mtn_gh",// MTN GH
MtnGN = "mtn_gn",// MTN GN
MtnNG = "mtn_ng",// MTN NG
MtnRW = "mtn_rw",// MTN RW
MtnUG = "mtn_ug",// MTN UG
MtnZM = "mtn_zm",// MTN ZM
OrangeBF = "orange_bf",// Orange BF
OrangeCD = "orange_cd",// Orange CD
OrangeCI = "orange_ci",// Orange CI
OrangeCM = "orange_cm",// Orange CM
OrangeGN = "orange_gn",// Orange GN
OrangeML = "orange_ml",// Orange ML
OrangeSN = "orange_sn",// Orange SN
QRNGN = "qr_ngn",// QR Code NGN
TigoGH = "tigo_gh",// Tigo GH
TigoTZ = "tigo_tz",// Tigo TZ
TNMMW = "tnm_mw",// TNM MW
Togocel = "togocel",// Togocel
USSDNGN = "ussd_ngn",// USSD NGN
VodacomCD = "vodacom_cd",// Vodacom CD
VodafoneGH = "vodafone_gh",// Vodafone GH
WaveCI = "wave_ci",// Wave CI
WaveSN = "wave_sn",// Wave SN
WizallSN = "wizall_sn",// Wizall SN
ZamtelZM = "zamtel_zm"
}
/**
* Interface representing a payment method with its details
*/
interface PaymentMethodDetails {
/** Display name of the payment method */
name: string;
/** Unique code of the payment method */
code: PaymentMethod;
/** Currency code (ISO 4217) */
currency: string;
/** Array of country codes (ISO 3166-1 alpha-2) where this method is available */
countries: string[];
}
/**
* Object containing all available payment methods with their details
*/
declare const PaymentMethods: Record<PaymentMethod, PaymentMethodDetails>;
/**
* Helper functions for working with payment methods
*/
declare const PaymentMethodUtils: {
/**
* Get details for a specific payment method
* @param method - The payment method code
* @returns Payment method details or undefined if not found
*/
getDetails: (method: PaymentMethod) => PaymentMethodDetails | undefined;
/**
* Get all available payment methods
* @returns Array of all payment method details
*/
getAll: () => PaymentMethodDetails[];
/**
* Get payment methods available in a specific country
* @param countryCode - ISO 3166-1 alpha-2 country code
* @returns Array of payment methods available in the specified country
*/
getByCountry: (countryCode: string) => PaymentMethodDetails[];
/**
* Get payment methods that support a specific currency
* @param currency - ISO 4217 currency code
* @returns Array of payment methods that support the specified currency
*/
getByCurrency: (currency: string) => PaymentMethodDetails[];
};
export type { PaymentMethodDetails };
export { PaymentMethods, PaymentMethodUtils };