UNPKG

@vue-stripe/vue-stripe

Version:

Vue Stripe elements and composables for Stripe.js

74 lines 2.4 kB
import { DefineComponent, Ref, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue-demi'; interface Props { /** * Checkout Session ID (starts with cs_). * When provided, redirects to the session's checkout page. */ sessionId?: string; /** * Checkout Session URL from Stripe API. * For @stripe/stripe-js v8.x compatibility where redirectToCheckout is removed. * When provided, this takes precedence over sessionId. */ sessionUrl?: string; /** * Price ID for client-side session creation (legacy, requires redirectToCheckout). * @deprecated Use sessionUrl with server-side session creation for v8.x compatibility. */ priceId?: string; mode?: 'payment' | 'subscription'; successUrl?: string; cancelUrl?: string; customerEmail?: string; clientReferenceId?: string; submitType?: 'auto' | 'book' | 'donate' | 'pay'; buttonText?: string; loadingText?: string; disabled?: boolean; buttonClass?: string; } declare function __VLS_template(): { attrs: Partial<{}>; slots: { default?(_: { checkout: () => Promise<void>; loading: boolean; disabled: boolean | undefined; }): any; }; refs: {}; rootEl: any; }; type __VLS_TemplateResult = ReturnType<typeof __VLS_template>; declare const __VLS_component: DefineComponent<Props, { checkout: () => Promise<void>; loading: Ref<boolean, boolean>; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & { error: (error: Error) => any; checkout: () => any; success: () => any; "before-redirect": (data: { url: string; }) => any; }, string, PublicProps, Readonly<Props> & Readonly<{ onError?: (error: Error) => any; onCheckout?: () => any; onSuccess?: () => any; "onBefore-redirect"?: (data: { url: string; }) => any; }>, { mode: "payment" | "subscription"; disabled: boolean; buttonText: string; loadingText: string; buttonClass: string; }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>; export default _default; type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; }; //# sourceMappingURL=VueStripeCheckout.vue.d.ts.map