UNPKG

thawani-nodejs

Version:

Node.js library for Thawani Payment Gateway

41 lines (40 loc) 1.12 kB
export interface PaymentIntentParams { payment_method_id?: string; amount: number; client_reference_id: string; return_url: string; metadata: Record<string, any>; } export interface PaymentIntent { id: string; client_reference_id: string; amount: number; currency: string; payment_method?: string; next_action?: PaymentIntentNextAction; status: PaymentIntentStatus; metadata: Record<string, any>; created_at: string; expire_at: string; } export interface PaymentIntentNextAction { url: string; return_url: string; } export interface Payment { activity: string; payment_id: string; masked_card: string; card_type: string; status: PaymentStatus; amount: number; fee: number; refunded: boolean; refunds: any[]; payment_intent?: string; checkout_invoice?: string; created_at: string; reason?: string; } export type PaymentIntentStatus = 'requires_payment_method' | 'requires_action' | 'requires_confirmation' | 'succeeded' | 'cancelled'; export type PaymentStatus = 'inProcess' | 'successful' | 'failed';