UNPKG

opengig-stripe

Version:

A wrapper for Stripe payment services with support for checkout and payment intents

22 lines (21 loc) 803 B
import Stripe from 'stripe'; export declare class StripeCheckout { private stripe; constructor(stripe: Stripe); createPaymentSession({ priceId, customerId, successUrl, cancelUrl, mode, quantity, metadata, }: { priceId: string; customerId?: string; successUrl: string; cancelUrl: string; mode?: 'subscription' | 'payment'; quantity?: number; metadata?: Record<string, string>; }): Promise<Stripe.Response<Stripe.Checkout.Session>>; createOneTimePaymentSession({ amount, currency, successUrl, cancelUrl, metadata, }: { amount: number; currency?: string; successUrl: string; cancelUrl: string; metadata?: Record<string, string>; }): Promise<Stripe.Response<Stripe.Checkout.Session>>; }