Skip to content

API reference ​

Every export of @vue-stripe/vue-stripe: components, composables, the plugin and types. To find the export that wraps a Stripe.js method or element, use Stripe.js coverage. Exported TypeScript types and the error classes are listed in Types and errors.

Compatibility ​

RequirementSupported
Vue^2.7.0 || ^3.0.0 (peer dependency). Vue 2.7 is tested in client-side apps; see Use Vue Stripe on Vue 2.7
Stripe.js@stripe/stripe-js ^10.3.0, Stripe.js Endive (peer dependency; public types include the Pricing SDK (10.2.1) and the Payment Element fieldchange event (10.3.0))
RenderingClient and server. Stripe.js loads only in the browser; during server rendering, components render their loading state and hydrate without mismatches. <ClientOnly> is optional. See Use Vue Stripe with Nuxt and SSR
Module formatsES, CommonJS and UMD builds (the UMD build, for a <script> tag, includes the @stripe/stripe-js loader and needs only the Vue and vue-demi globals; see Without a bundler); TypeScript declarations for ES module and CommonJS consumers, with moduleResolution bundler, node16, nodenext or node
TypeScript5.0 or later for the declarations (they use export type *). Vue 3.5's own declarations need 5.4 when skipLibCheck is false, and vue-tsc 3 needs 5.0
Stylesheet@vue-stripe/vue-stripe/style.css, imported once per app
BrowsersThe browsers Stripe.js supports. The guides' flows (Payment Element, Card Element, hosted, Embedded and Checkout Elements, and their return pages) were tested in Chromium, Firefox and WebKit (Safari's engine), on desktop and in iPhone and Android phone profiles, in development and production builds. The ES and CommonJS builds use ES2020 syntax; an app that targets older browsers transpiles them in its own build

Components ​

Provider components ​

ComponentDescription
VueStripeProviderLoads Stripe.js and provides the Stripe instance
VueStripeElementsCreates a StripeElements instance and provides it to element components

Element components ​

ComponentDescription
VueStripePaymentElementPayment Element: cards, wallets, bank debits and local payment methods
VueStripeExpressCheckoutElementExpress Checkout Element: Apple Pay, Google Pay, Link and other wallet buttons
VueStripeCardElementCard Element: number, expiry and CVC in one field
Split Card ElementsVueStripeCardNumberElement, VueStripeCardExpiryElement, VueStripeCardCvcElement
VueStripeAddressElementAddress Element: shipping or billing address
VueStripeLinkAuthenticationElementLink Authentication Element: email and Link sign-in
VueStripePaymentMethodMessagingElementPayment Method Messaging Element: buy-now-pay-later messaging
VueStripeTaxIdElementTax ID Element: business name and tax ID (Checkout Sessions)
VueStripeCurrencySelectorElementCurrency Selector Element (Checkout Sessions, Adaptive Pricing)
VueStripeContactDetailsElementContact Details Element: customer email (Checkout Sessions or Elements)
VueStripeTermsElementTerms Element: terms the customer accepts (Stripe beta)
VueStripeLinkSignupElementLink Signup Element: save details to Link (Stripe beta)

Regional elements ​

ComponentDescription
VueStripeIbanElementIBAN Element: SEPA Direct Debit
VueStripeAuBankAccountElementAU Bank Account Element: BECS Direct Debit (Australia)

Stripe.js Clover (8.0) removed the standalone iDEAL, P24, EPS and FPX elements. The Payment Element collects these payment methods.

Issuing elements ​

ComponentDescription
Issuing ElementsVueStripeIssuingCardNumberDisplayElement, ...CvcDisplayElement, ...ExpiryDisplayElement, ...PinDisplayElement, ...CopyButtonElement, ...AddToWalletButtonElement: issued card details in Stripe-hosted iframes

Checkout and subscriptions ​

ComponentDescription
VueStripeCheckoutRedirects to Stripe Checkout (Checkout Session URL)
VueStripeEmbeddedCheckoutEmbedded Checkout (stripe.createEmbeddedCheckoutPage())
VueStripeCheckoutElementsProviderCheckout Elements SDK: Elements on a Checkout Session. VueStripeCheckoutProvider is a deprecated alias.
VueStripeCheckoutFormProviderCheckout Form SDK, ui_mode: 'form' (beta, requires Stripe access)
VueStripeCheckoutFormCheckout Form: Stripe's complete checkout form in one element (beta, requires Stripe access)
VueStripePricingTableEmbedded Stripe pricing table

Disclosures ​

ComponentDescription
VueStripeFinancialAccountDisclosureLegal text for Financial Accounts for platforms
VueStripeIssuingDisclosureLegal text for Issuing card programs
VueStripeTreasuryDisclosureLegal text for Treasury financial accounts

Composables ​

ComposableDescription
useStripeThe Stripe instance and its loading and error state
useStripeElementsThe StripeElements instance, getElement, submit and fetchUpdates (alias: useElements)
usePaymentIntentstripe.confirmPayment() with the Elements group; runs elements.submit() first
useSetupIntentstripe.confirmSetup() with the Elements group; runs elements.submit() first
useStripeCheckoutRedirects to Stripe Checkout (alias: useCheckout)
useCheckoutSessionCheckout Session state and actions inside VueStripeCheckoutElementsProvider
useCheckoutFormCheckout Form state, session and confirm inside VueStripeCheckoutFormProvider (beta)
useCreatePaymentMethodstripe.createPaymentMethod()
useHandleNextActionstripe.handleNextAction(): 3D Secure and other next actions
useCreateConfirmationTokenstripe.createConfirmationToken() from the Payment Element
useCreateTokenstripe.createToken(): card, bank account, PII, Connect account or person
useHandleCardActionstripe.handleCardAction() for manually confirmed PaymentIntents (legacy)
useVerifyMicrodepositsForPaymentstripe.verifyMicrodepositsForPayment()
useVerifyMicrodepositsForSetupstripe.verifyMicrodepositsForSetup()
useRadarSessionstripe.createRadarSession()
useEphemeralKeyNoncestripe.createEphemeralKeyNonce() for Issuing elements
useFinancialConnectionsFinancial Connections and US bank account collection
useIdentitystripe.verifyIdentity(): the Stripe Identity modal
usePaymentRequeststripe.paymentRequest() behind your own button
usePricingExplicit stripe.initializePricing() and the Pricing SDK for localized prices, currencies and tokens (Stripe beta; not yet verified end to end)

Method confirmers ​

One composable per Stripe.js confirm<Method>Payment and confirm<Method>Setup method, such as useConfirmCardPayment and useConfirmSepaDebitSetup. The method confirmers overview lists all of them and their shared return value.

PagePayment methods
CardsCard
Bank debitsACSS, AU BECS, Bacs, SEPA, US bank account
Redirects and bank transfersBancontact, EPS, FPX, giropay, iDEAL, Przelewy24, Sofort, Pay by Bank, Multibanco, customer balance
WalletsAlipay, Amazon Pay, BLIK, Cash App Pay, GrabPay, MobilePay, PayNow, PayPal, Pix, PromptPay, TWINT, WeChat Pay
Buy now, pay laterAffirm, Afterpay / Clearpay, Billie, Klarna
VouchersBoleto, Konbini, OXXO

Plugin ​

ExportDescription
createVueStripeVue plugin that provides Stripe to the whole app, in place of VueStripeProvider
loadStripeA wrapper around the @stripe/stripe-js/pure loader, with the same signature and setLoadParameters. It shares one Stripe.js load with every provider on the page, creates a new Stripe instance on every call, and registers Vue Stripe's app info (stripe.registerAppInfo()) on it. See How Stripe.js is loaded