UNPKG

@abdias1998/feexpay_lite

Version:

SDK React officiel pour intégrer les paiements FeexPay dans vos applications React

79 lines (78 loc) 2.27 kB
import { Network, Country, PaymentStatus, Currency } from '../types/index'; interface RequestWalletCorisParams { phoneNumber: string; amount: number; id: string; email: string; first_name: string; description?: string; reference?: string; otp?: string; currency: Currency; token: string; callback_info: Record<string, unknown>; } interface RequestCardPaymentParams { phone: string; amount: number; id: string; first_name: string; last_name: string; email: string; type_card: 'VISA' | 'MASTERCARD'; currency: Currency; token: string; } interface RequestToPayParams { phoneNumber: string; amount: number; network: Network; country: Country; description: string; customId: string; id: string; token: string; currency: Currency; callback_info: Record<string, unknown>; first_name: string; email: string; otp?: string; } export interface ShopResponse { name: string; reference: string; } export interface TransactionResponse { status: PaymentStatus; reason?: string; reference: string; transaction_id?: string; amount?: number; email?: string; currency?: string; callback_info?: Record<string, unknown>; message?: string; statusCode?: string; payment_url?: string; } interface TransactionDetailsParams { network: Network; country: Country; amount: number; id: string; token: string; callback_info: Record<string, unknown>; } interface TransactionDetailsResponse { iffees: boolean; amount: number; total: number; message: string; } export declare const requestToPay: (params: RequestToPayParams) => Promise<TransactionResponse>; export declare const checkTransactionStatus: (reference: string) => Promise<TransactionResponse>; export declare const getTransactionDetails: (params: TransactionDetailsParams) => Promise<TransactionDetailsResponse>; export declare const requestCardPayment: (params: RequestCardPaymentParams) => Promise<TransactionResponse>; export declare const requestWalletCorisPayment: (params: RequestWalletCorisParams) => Promise<TransactionResponse>; export declare const getShop: (shop: string) => Promise<ShopResponse>; export {};