UNPKG

modem-pay

Version:

A TypeScript SDK for integrating with the Modem Pay payment gateway, enabling seamless payment processing and financial services in your applications.

15 lines (14 loc) 774 B
import Core from "../interfaces/core"; import { List, ListOption, PaymentIntent, PaymentIntentParams, PaymentIntentResponse } from "../types"; import BaseResource from "./base"; export default class PaymentIntentsResource extends BaseResource implements Core<PaymentIntent> { constructor(apiKey: string, maxRetries: number, timeout: number); /** Creates a payment intent */ create(params: PaymentIntentParams): Promise<PaymentIntentResponse>; /** Retrieves a payment intent by its intent secret. */ retrieve(intent_secret: string): Promise<PaymentIntent>; /** Cancels the payment intent. */ cancel(id: string): Promise<PaymentIntent>; /** Returns a list of payment intents. */ list(options?: ListOption): Promise<List<PaymentIntent>>; }