import { AuthenticationStatus } from './index.js'; export type RefundOptions = Array<{ name: string; value?: number; currency?: string; }>; export interface Refund { id: string; object: string; live_mode: boolean; customer_initiated: boolean; api_version: string; method: string; created: number; date: number; status: 'REFUNDED' | 'PENDING' | 'IN_PROGRESS' | 'CANCELLED' | 'FAILED' | 'DECLINED' | 'RESTRICTED' | 'TIMEDOUT' | 'UNKNOWN' | 'ACCEPTED'; amount: number; currency: string; threeDSecure: boolean; card_threeDSecure: boolean; save_card: boolean; merchant_id: string; product: string; statement_descriptor: string; description: string; metadata: Record; transaction: { authorization_id: string; timezone: string; date: { created: number; completed: number; posted?: string | number; }; }; reference: { id: string; track: string; payment: string; gateway: string; acquirer: string; transaction: string; order: string; invoice?: string; trace_id?: string; }; response: { code: string; message: string; }; receipt: { id: string; email: boolean; sms: boolean; }; acquirer: { id: string; response: { code: string; message: string; }; name: string; mid: string; }; gateway: { id: string; name: string; response: { code: string; message: string; }; }; redirect: { status: string; url: string; }; post: { status: string; }; payouts: { amount: number; currency: string; count: number; payout: Array<{ date: number; by: string; reference_id: string; id: string; amount: number; created: number; }>; }; net: { transaction_currency: string; transaction_amount: number; currency: string; currency_rate: number; fee: number; amount: number; }; fees: { amount: number; currency: string; count: number; fee: Array<{ id: string; type: string; by: string; on: string; amount: number; currency: string; }>; }; auto_reversed: boolean; security: { threeDSecure: { id: string; status: string; }; }; destinations: { reverse_destinations: boolean; amount: number; currency: string; count: number; destination: Array<{ id: string; amount: number; currency: string; reverse_transfer: { id: string; amount: number; currency: string; }; }>; }; refunds: { refund: Array<{ id: string; amount: number; currency: string; created: number; date: number; status: 'REFUNDED' | 'PENDING'; }>; }; topup: { id: string; amount: number; currency: string; }; authenticate: { id: string; object: string; type: string; value: string; by: string; status: string; created: string; authenticated: string; count: number; retry_attempt: number; message: string; }; summary?: { charge_amount: number; refund_amount: number; refunded_count: number; remaing_amount: number; remaing_percentage: number; }; balance: { status?: 'PAID_OUT' | 'SETTLED' | 'PENDING'; payout: { id: string; scheduled: number; activities: [ { object: string; status: 'PAID_OUT' | 'PENDING'; date: number; } ]; }; settlement: { id: string; scheduled: number; activities: [ { object: string; status: 'SETTLED' | 'PENDING'; date: number; } ]; }; }; charge: { id: string; refunds: { refund: Array<{ id: string; amount: number; currency: string; created: number; date: number; status: 'REFUNDED' | 'PENDING'; }>; }; authentication: { acsEci: string; status: AuthenticationStatus; data: { asc_eci: string; type: string; }; }; metadata: Record; receipt: { id: string; }; merchant: { id: string; legacy_id: string; country: string; name: string; }; reference: { id: string; track: string; payment: string; gateway: string; acquirer: string; transaction: string; order: string; invoice?: string; trace_id?: string; }; flags: { flag: Array<{ id: string; status: 'OPEN' | 'CLEARED'; amount: number; created: number; note: string; ishold: boolean; }>; }; amount: number; currency: string; customer_initiated: boolean; source: { object: string; type: string; payment_type: string; payment_method: 'MASTERCARD' | 'VISA' | 'APPLE_PAY'; channel: string; id: string; region: 'Local' | 'Global' | 'Regional'; }; issuer?: { id: string; name: string; country: string; region: 'G' | 'L' | 'R'; issuer_region: { code: string; name: string; }; }; device?: { type: 'DESKTOP' | 'PHONE' | 'TABLET'; id: string; timezone: string; location: { ip: string; country: string; region: { code: 'G' | 'L' | 'R'; name: 'Global' | 'Local' | 'Regional'; }; }; }; exchange?: { capture?: { amount: number; currency: string; }; settlement?: { amount: number; currency: string; rate: number; }; }; balance: { status?: 'PAID_OUT' | 'SETTLED' | 'PENDING'; payout: { id: string; scheduled: number; activities: [ { object: string; status: 'PAID_OUT' | 'PENDING'; date: number; } ]; }; settlement: { id: string; scheduled: number; activities: [ { object: string; status: 'SETTLED' | 'PENDING'; date: number; } ]; }; }; order: { id: string; currency: string; amount: number; items_count?: number; items?: object[]; }; customer: { country: { code: string; name: string; }; id: string; first_name: string; last_name: string; email: string; phone: { country_code: string; number: string; }; region: { name: 'Local' | 'Global' | 'Regional'; code: 'R' | 'G' | 'L'; }; timezone: string; }; payment_agreement?: { id: string; type: 'UNSCHEDULED' | 'SCHEDULED_INSTALLMENT' | 'SCHEDULED_SUBSCRIPTION' | 'SCHEDULED_BILLING'; contract?: { id: string; type: 'ORDER' | 'SAVED_CARD' | 'SUBSCRIPTION' | 'INSTALLMENT'; period: { start_date: number; end_date: number; auto_renewal: boolean; }; }; variable_amount?: { id: string; maximum_amount: number; }; scheduled_payments?: { id: string; count: number; frequency: { period: 'MINUTES' | 'HOURS' | 'DAYS' | 'MONTHS'; count: number; }; }; total_payments_count?: number; }; payment: { type: string; account: string; method: string; scheme: string; authentication?: '3DS' | 'Non-3DS'; card: string; wallet: string; }; card: { object: string; first_six: string; first_eight: string; scheme: string; brand: string; last_four: string; name: string; expiry: { month: string; year: string; }; registered: boolean; }; transaction: { authorization_id: string; timezone: string; created: string | number; expiry: { period: number; type: string; }; asynchronous: boolean; amount: number; currency: string; order: { reference: string; store_url: string; }; }; }; merchant: { id: string; legacy_id: string; retailer: { id: string; }; }; reason: string; device?: { type: 'DESKTOP' | 'PHONE' | 'TABLET'; id: string; timezone: string; location: { ip: string; country: string; region: { code: 'G' | 'L' | 'R'; name: 'Global' | 'Local' | 'Regional'; }; }; }; card: { object: string; first_six: string; first_eight: string; scheme: string; brand: string; last_four: string; }; request_body?: Record; user?: { id: string; name: string; channel: string; }; }