UNPKG

@kwikpik/server-libs

Version:

Kwikpik-Server-Libs ===================================================================================================================================================================================================

74 lines (73 loc) 2.2 kB
export interface BaseResponse { status: "success" | "failed"; message: string; } export interface GeneratePaymentLinkResponse extends BaseResponse { data: { link: string; }; } export interface ResolveBankAccountResponse extends BaseResponse { data: { account_number: string; account_name: string; }; } export interface FetchBanksResponse extends BaseResponse { data: { id: number; code: string; name: string; }; } declare class FlutterwavePaymentModule { private $; constructor(secret?: string); static initializePaymentModule(secret?: string): FlutterwavePaymentModule; verifyTransaction( id: string ): Promise<import("../../utils/http").ResponseInterface<string> | import("../../utils/http").ResponseInterface<any>>; initiateTransfer( accountBank: string, accountNumber: string, amount: number, narration: string, currency: string, reference?: string ): Promise<import("../../utils/http").ResponseInterface<string> | import("../../utils/http").ResponseInterface<any>>; resolveBankAccount( accountNumber: string, accountBank: string ): Promise< | import("../../utils/http").ResponseInterface<string> | import("../../utils/http").ResponseInterface<ResolveBankAccountResponse> >; getAllBanks( country: "EG" | "ET" | "GH" | "KE" | "MW" | "NG" | "RW" | "SL" | "TZ" | "UG" | "US" | "ZA" ): Promise< | import("../../utils/http").ResponseInterface<string> | import("../../utils/http").ResponseInterface<FetchBanksResponse> >; generatePaymentLink( userId: string, amount: string, currency: string, redirectUrl: string, customerEmail: string, customerName: string, customerPhoneNumber: string, customerRequest?: Record<string, any> ): Promise< | import("../../utils/http").ResponseInterface<string> | import("../../utils/http").ResponseInterface<GeneratePaymentLinkResponse> >; } /** * Initialize Flutterwave payment module. * * @param secret Flutterwave secret key. * @returns */ export declare const initFlutterwavePaymentModule: (secret?: string) => FlutterwavePaymentModule; export {}; //# sourceMappingURL=flutterwave.d.ts.map