UNPKG

@kwikpik/server-libs

Version:

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

91 lines (90 loc) 2.15 kB
export interface GeneratePaymentLinkResponse { redirect_url: string; url: string; checkout: { id: string; amount: number; currency: string; status: string; linked_account: string | null; meta: { city: string; state: string; }; updated_at: Date | string; created_at: Date | string; }; } export interface Transaction { type: string; transaction: { id: string; remark: string; amount: number; charge: number; refund: boolean; type: string; currency: string; status: string; mode: "credit" | "debit"; meta: { city: string; state: string; }; reference: string; checkout: object | null; peer: { business: { name: string; logo: string | null; logo_colour: string; }; user: { name: string; identifier: string; identifier_type: string; }; }; user: { name: string; identifier: string; identifier_type: string; email: string; reference: string; created_at: string | Date; updated_at: string | Date; }; channel: "send" | "checkout" | "direct_charge"; created_at: string | Date; updated_at: string | Date; }; } declare class ThePeerPaymentModule { private $; constructor(secret?: string); static initializePaymentModule(secret?: string): ThePeerPaymentModule; generatePaymentLink( userId: string, amount: number, email: string, redirectUrl?: string, customerRequest?: Record<string, any> ): Promise< | import("../../utils/http").ResponseInterface<string> | import("../../utils/http").ResponseInterface<GeneratePaymentLinkResponse> >; getTransaction( id: string ): Promise< import("../../utils/http").ResponseInterface<string> | import("../../utils/http").ResponseInterface<Transaction> >; } /** * Initialize Flutterwave payment module. * * @param secret Flutterwave secret key. * @returns */ export declare const initFlutterwavePaymentModule: (secret?: string) => ThePeerPaymentModule; export {}; //# sourceMappingURL=thepeer.d.ts.map