import Razorpay from 'razorpay/dist/razorpay'; import { Orders } from 'razorpay/dist/types/orders'; import { Payments } from 'razorpay/dist/types/payments'; import { Refunds } from 'razorpay/dist/types/refunds'; import RPXContact, { Contact } from 'razorpayx/dist/services/Contact'; import RPXAccount, { FundAccountBank, FundAccountVPA } from 'razorpayx/dist/services/FundAccount'; import RPXPayout from 'razorpayx/dist/services/Payout'; import RPXPayoutLink from 'razorpayx/dist/services/PayoutLink'; import RPXTransactions from 'razorpayx/dist/services/Transactions'; import Razorpay$1 from 'razorpay'; interface ConfigInterface { key_id: string; key_secret: string; } interface RefundInterface { paymentId: string; amount: number; currency: "INR" | "USD"; } interface RefundResponse { message: string; status: boolean; refund: Refund; } interface CheckPayment { paymentId: string; } interface OrderInterface { amount: number; currency: "INR" | "USD"; receipt: string; } interface OrderResponse { order: Order; status: boolean; message: string; } interface CaptureInterface { paymentId: string; } interface CaptureResponse { capture: Payment; status: boolean; message: string; } interface BankAccount { name: string; ifsc: string; account_number: string; } interface UPIAccount { vpa: string; } interface WalletAccount { provider: string; } type FundAccount = { user_id: string; account_type: "bank_account"; bank_account: BankAccount; } | { user_id: string; account_type: "vpa"; vpa: UPIAccount; } | { user_id: string; account_type: "wallet"; wallet: WalletAccount; }; interface ContactInterface { name: string; email: string; type: "customer"; contact: string; } interface PayoutInterface { fundAccountId: string; amount: number; currency: "INR" | "USD"; accountNumber: string; mode: "UPI" | "NEFT" | "RTGS" | "IMPS"; } interface RZP extends Razorpay { } interface Account extends FundAccountBank { } interface VPAccount extends FundAccountVPA { } interface Order extends Orders.RazorpayOrder { } interface Payment extends Payments.RazorpayPayment { } interface Refund extends Refunds.RazorpayRefund { } interface RZPX { Contact: RPXContact; FundAccount: RPXAccount; Payout: RPXPayout; PayoutLink: RPXPayoutLink; Transactions: RPXTransactions; } interface Contacts extends Contact { } interface Payout { entity: "payout"; account_number?: string; /** Amount in paise */ amount: number; currency: "INR"; notes?: Record; fees?: number; tax?: number; status: "queued" | "pending" | "rejected" | "processing" | "processed" | "cancelled" | "reversed"; utr: string; mode: "UPI" | "NEFT" | "RTGS" | "IMPS" | "card"; purpose?: "refund" | "cashback" | "payout" | "salary" | "utility bill" | "vendor bill" | string; reference_id?: string; narration?: string; status_details?: { source?: string; reason?: string; description?: string; }; } declare const RazorpayConfig: ({ key_id, key_secret }: ConfigInterface) => { config: Razorpay$1; refund: (args_0: RefundInterface) => Promise; order: (data: OrderInterface) => Promise; fetch: (args_0: CheckPayment) => Promise; capture: (args_0: CaptureInterface) => Promise; fundaccount: (fundAccount: FundAccount) => Promise; contact: (credentials: ContactInterface) => Promise; }; export { type Account, type CaptureInterface, type CaptureResponse, type CheckPayment, type ConfigInterface, type ContactInterface, type Contacts, type FundAccount, type Order, type OrderInterface, type OrderResponse, type Payment, type Payout, type PayoutInterface, type RZP, type RZPX, type Refund, type RefundInterface, type RefundResponse, type VPAccount, RazorpayConfig as default };