UNPKG

afrimomo-sdk

Version:

A unified SDK for African payment providers

50 lines 3.33 kB
import { BaseService } from "../../utils/baseService"; import type { Environment } from "../../config/constants"; import type { PayChanguAccountInfo } from "./types/account"; import type { PayChanguInitialPayment } from "./types/payment"; import type { PayChanguDirectChargePaymentResponse, PayChanguTransactionDetailsResponse, PayChanguOperatorsResponse, PayChanguPayoutResponse, PayChanguPayoutDetailsResponse, PayChanguBanksResponse, PayChanguBankTransferResponse, PayChanguBankPayoutDetailsResponse, PayChanguBankPayoutsListResponse, PayChanguBankTransferPaymentResponse, PayChanguErrorResponse, PayChanguVerifyTransactionResponse, PayChanguPaymentInitiationResponse, PayChanguPaymentInitiationErrorResponse } from "./types/response"; export * from "./types"; export declare class PayChangu extends BaseService { private readonly network; constructor(secretKey: string, environment?: Environment, sandboxUrl?: string, productionUrl?: string); private handleApiError; private createErrorResponse; private createSuccessResponse; private wrapApiCall; initiatePayment(data: PayChanguInitialPayment): Promise<PayChanguPaymentInitiationResponse | PayChanguPaymentInitiationErrorResponse>; private initializeDirectCharge; private getTransactionDetails; private processBankTransferDirect; initializeDirectChargePayment(amount: string | number, chargeId: string, currency?: string, accountInfo?: Partial<PayChanguAccountInfo>): Promise<PayChanguDirectChargePaymentResponse>; getDirectChargeTransactionDetails(chargeId: string): Promise<PayChanguTransactionDetailsResponse>; processBankTransfer(bankUuid: string, accountName: string, accountNumber: string, amount: string | number, chargeId: string, currency?: string, options?: { email?: string; firstName?: string; lastName?: string; }): Promise<PayChanguBankTransferPaymentResponse>; private getMobileMoneyOperatorsDirect; private initializeMobileMoneyPayoutDirect; private getPayoutDetailsDirect; getMobileMoneyOperators(): Promise<PayChanguOperatorsResponse>; initializeMobileMoneyPayout(mobile: string, operatorRefId: string, amount: string | number, chargeId: string, options?: { email?: string; firstName?: string; lastName?: string; transactionStatus?: "failed" | "successful"; }): Promise<PayChanguPayoutResponse>; getMobileMoneyPayoutDetails(chargeId: string): Promise<PayChanguPayoutDetailsResponse>; private getSupportedBanksDirect; private initializeBankPayoutDirect; private getBankPayoutDetailsDirect; private getAllBankPayoutsDirect; getSupportedBanks(currency?: string): Promise<PayChanguBanksResponse>; initializeBankPayout(bankUuid: string, accountName: string, accountNumber: string, amount: string | number, chargeId: string, options?: { email?: string; firstName?: string; lastName?: string; }): Promise<PayChanguBankTransferResponse>; getBankPayoutDetails(chargeId: string): Promise<PayChanguBankPayoutDetailsResponse>; getAllBankPayouts(page?: number, perPage?: number): Promise<PayChanguBankPayoutsListResponse>; verifyTransaction(txRef: string): Promise<PayChanguVerifyTransactionResponse | PayChanguErrorResponse>; } //# sourceMappingURL=index.d.ts.map