UNPKG

np-payment-sdk

Version:

Unified Payment SDK for Nepal (eSewa, Khalti, ConnectIPS, IME Pay, Mobile Banking)

37 lines (36 loc) 1.15 kB
import { IPaymentGateway, PaymentParams, PaymentResult, VerifyParams, RefundParams } from '../types'; import { SubscriptionResult, InvoiceResult, WalletResult } from '../types/gateway'; /** * Stripe payment gateway implementation (real) */ export declare class StripeGateway implements IPaymentGateway { private config; private stripe; constructor(config: { apiKey: string; }); /** * Initiate a payment (creates a PaymentIntent) */ pay(params: PaymentParams): Promise<PaymentResult>; /** * Verify a payment (retrieve PaymentIntent) */ verify(params: VerifyParams): Promise<PaymentResult>; /** * Refund a payment */ refund(params: RefundParams): Promise<PaymentResult>; /** * Create a subscription */ subscribe(_params?: Record<string, unknown>): Promise<SubscriptionResult>; /** * Create an invoice */ createInvoice(_params?: Record<string, unknown>): Promise<InvoiceResult>; /** * Wallet operations (not directly supported by Stripe, stub) */ wallet(_params?: Record<string, unknown>): Promise<WalletResult>; }