UNPKG

@koin_payments/react-native-payments-plugin

Version:

Plugin React Native oficial da Koin para integração com o SDK de Payments, permitindo adicionar funcionalidades de pagamento de forma simples e segura

83 lines 2.69 kB
export interface SDKConfig { account?: string; primaryColorHex?: string; secondaryColorHex?: string; currencyCode?: string; isHomolog?: boolean; enableLogs?: boolean; pollingTimeout?: number; pollingInterval?: number; paypalClientID?: string; maxRetries?: number; } export interface PaymentRequest { amount: number; referenceId: string; /** * Payment type * @note 'paypal' is only supported on iOS platform. Android will reject PayPal payments. */ paymentType?: 'pix' | 'card' | 'paypal' | 'bnpl'; account?: string; email?: string; businessId?: string; storeCode?: string; expirationMinutes?: number; /** * UI presentation mode * - 'fullscreen': Full screen presentation (default) * - 'bottomsheet': Bottom sheet presentation (only for card payments) * @note Bottom sheet is only available for card payments. Other payment types will ignore this field. */ uiMode?: 'fullscreen' | 'bottomsheet'; } export interface PaymentResult { status: 'success' | 'failed' | 'cancelled'; message?: string; transactionId?: string; data?: { referenceId: string; amount: number; paymentType: string; currency: string; timestamp: string; uiMode?: string; processingTime?: number; }; error?: string; } export declare function initializeSDK(apiKey: string, config?: SDKConfig): Promise<string>; export declare function initiatePayment(request: PaymentRequest): Promise<PaymentResult>; export declare const PaymentDefaults: { PIX_PAYMENT: (amount: number, referenceId: string, email?: string) => { amount: number; referenceId: string; paymentType: "pix"; email: string | undefined; expirationMinutes: number; }; CARD_PAYMENT: (amount: number, referenceId: string, email?: string) => { amount: number; referenceId: string; paymentType: "card"; email: string | undefined; expirationMinutes: number; }; BNPL_PAYMENT: (amount: number, referenceId: string, email?: string, businessId?: string) => { amount: number; referenceId: string; paymentType: "bnpl"; email: string | undefined; businessId: string | undefined; expirationMinutes: number; }; CARD_PAYMENT_BOTTOM_SHEET: (amount: number, referenceId: string, email?: string) => { amount: number; referenceId: string; paymentType: "card"; email: string | undefined; expirationMinutes: number; uiMode: "bottomsheet"; }; }; //# sourceMappingURL=index.d.ts.map