interface AgreementStatus { agreedRequiredTerms: boolean; terms: Agreement[]; } interface Agreement { id: string; agreed: boolean; required: boolean; title: string; content: string; } type Currency = 'KRW' | 'USD' | 'JPY'; interface Amount { value: number; currency?: Currency; country?: string; } interface BasePaymentInfo { orderId: string; orderName: string; customerEmail?: string; customerName?: string; appScheme?: string; taxFreeAmount?: number; taxExemptionAmount?: number; cultureExpense?: boolean; useEscrow?: boolean; escrowProducts?: EscrowProduct[]; customerMobilePhone?: string; showCustomerMobilePhone?: boolean; mobileCarrier?: MobileCarrier[]; products?: Product[]; shipping?: Shipping; paymentMethodOptions?: PaymentMethodOptions; metadata?: Record | null; useInternationalCardOnly?: boolean; } interface PaymentInfo extends BasePaymentInfo { successUrl: string; failUrl: string; } interface PromiseTypePaymentInfo extends BasePaymentInfo { } interface EscrowProduct { id: string; code: string; name: string; unitPrice: number; quantity: number; } type MobileCarrier = 'KT' | 'LGU' | 'SKT' | 'HELLO' | 'KCT' | 'SK7'; interface Product { name: string; quantity: number; unitAmount: number; currency: string; description: string; } interface Shipping { fullName?: string; address?: Address; } interface Address { country: string; line1?: string; line2?: string; area1?: string; area2: string; postalCode?: string; } interface PaymentMethodOptions { paypal?: { setTransactionContext: any; }; } interface PaymentMethodsWidget { updateAmount: (amount: number, reason?: string | string[]) => void; UPDATE_REASON: { COUPON: string; POINT: string; }; on: { (eventName: 'customRequest' | 'customPaymentMethodSelect' | 'customPaymentMethodUnselect', callback: (selectedPaymentMethod: string) => unknown): void; (eventName: 'ready', callback: () => unknown): void; }; getSelectedPaymentMethod: () => { type: 'NORMAL' | 'BRANDPAY' | 'KEYIN' | 'CUSTOM'; method?: string; methodId?: string; easyPay?: { provider: string; }; paymentMethodKey?: string; }; } interface AgreementWidget { on: (eventName: string, callback: (params: AgreementStatus) => void) => void; getAgreementStatus: () => AgreementStatus; } type RequestPaymentResult = { paymentType: 'NORMAL'; paymentKey: string; amount: number; orderId: string; } | { paymentType: 'BRANDPAY'; paymentKey: string; amount: number; orderId: string; methodId?: string | undefined; } | { paymentType: 'KEYIN'; paymentKey: string; amount: number; orderId: string; }; interface PaymentWidget$1 { renderPaymentMethods: (selector: string, amount: Amount | number, options?: RenderPaymentMethodsOptions) => PaymentMethodsWidget; renderAgreement: (selector: string, options?: RenderAgreementOptions) => AgreementWidget; requestPayment: (paymentInfo: PaymentInfo | PromiseTypePaymentInfo) => Promise; } interface RenderPaymentMethodsOptions { variantKey?: string; } interface RenderAgreementOptions { variantKey?: string; } declare function PaymentWidget(clientKey: string, rawCustomerKey: string, options?: { brandpay?: { redirectUrl?: string; }; }): PaymentWidget$1; declare namespace PaymentWidget { var ANONYMOUS: "@@ANONYMOUS"; var version: string; var __versionHash__: any; } type PaymentWidgetConstructor = typeof PaymentWidget; type PaymentWidgetInstance = ReturnType; declare global { interface Window { PaymentWidget?: PaymentWidgetConstructor; } } export { PaymentWidgetConstructor, PaymentWidgetInstance };