UNPKG

@wepublish/api

Version:
16 lines (15 loc) 882 B
import Stripe from 'stripe'; import { BasePaymentProvider, CheckIntentProps, CreatePaymentIntentProps, Intent, IntentState, PaymentProviderProps, WebhookForPaymentIntentProps, WebhookResponse } from './payment-provider'; export interface StripeCheckoutPaymentProviderProps extends PaymentProviderProps { secretKey: string; webhookEndpointSecret: string; } export declare class StripeCheckoutPaymentProvider extends BasePaymentProvider { readonly stripe: Stripe; readonly webhookEndpointSecret: string; constructor(props: StripeCheckoutPaymentProviderProps); getWebhookEvent(body: any, signature: string): Stripe.Event; webhookForPaymentIntent(props: WebhookForPaymentIntentProps): Promise<WebhookResponse>; createIntent(props: CreatePaymentIntentProps): Promise<Intent>; checkIntentStatus({ intentID }: CheckIntentProps): Promise<IntentState>; }