/** * @rajeev02/payments — UPI Module * UPI intent, collect request, QR code, autopay mandates */ export interface UpiConfig { /** Merchant VPA (e.g., merchant@paytm) */ merchantVpa: string; /** Merchant name shown in UPI apps */ merchantName: string; /** Merchant category code */ mcc?: string; /** Transaction reference prefix */ txnRefPrefix?: string; } export interface UpiPaymentRequest { /** Amount in INR (paisa precision) */ amount: number; /** Payment description */ note: string; /** Unique transaction reference */ txnRef?: string; /** Customer VPA (for collect requests) */ customerVpa?: string; /** Order ID from your backend */ orderId: string; } export interface UpiPaymentResult { success: boolean; txnId?: string; txnRef?: string; responseCode?: string; approvalRefNo?: string; status: "success" | "failed" | "pending" | "cancelled"; error?: string; } export interface UpiMandateRequest { /** Customer VPA */ customerVpa: string; /** Maximum amount per debit */ maxAmount: number; /** Frequency: DAILY, WEEKLY, FORTNIGHTLY, MONTHLY, BIMONTHLY, QUARTERLY, HALFYEARLY, YEARLY */ frequency: string; /** Start date (ISO) */ startDate: string; /** End date (ISO) */ endDate: string; /** Purpose description */ purpose: string; } /** * Generate UPI deep link URI for intent-based payment * Works with all UPI apps (GPay, PhonePe, Paytm, etc.) */ export declare function generateUpiUri(config: UpiConfig, request: UpiPaymentRequest): string; /** * Generate UPI QR code data string */ export declare function generateUpiQrData(config: UpiConfig, request: UpiPaymentRequest): string; /** * Validate a UPI VPA format * Format: username@psp (e.g., rajeev@paytm, user@okicici) */ export declare function validateVpa(vpa: string): boolean; /** * Known UPI PSP handles */ export declare const UPI_PSP_HANDLES: Record; export declare function getPspName(vpa: string): string | null; //# sourceMappingURL=index.d.ts.map