Skip to main content
@warpfi/vue shows the hosted Warp checkout on your page: inline, in a modal or in a popup. It needs Vue 3.3 or later and works with Nuxt 3. The checkout mounts in the browser only, so it is safe with server-side rendering. npm · GitHub

Install

Your server creates the session with the Node.js SDK and returns its checkout_url. For a complete Nuxt walkthrough, see Set up with examples.

Inline checkout

If you already have a checkout_url, pass :checkout-url instead. Changing it replaces the checkout with the new session.
The modal closes on Escape, the backdrop or its close button (emits cancel if the payment has not completed), after the customer cancels, and after the customer returns from the success page. close is emitted last every time. Use mode="popup" where your page cannot frame the checkout, or mode="redirect" to send the customer to the hosted page.

Composable

openModal and openPopup accept options that override those given to useWarpCheckout, and resolve to the checkout instance or null. Call openPopup directly from a click handler. The checkout closes when the component unmounts.

Global registration

In Nuxt, register it from a plugin:
plugins/warp.ts

Props and events

useWarpCheckout takes the same events as callbacks: onReady, onStatus, onComplete, onCancel, onReturn, onError and onClose.

Exports

Events are UI signals only. Fulfil orders from the payment.completed webhook or a server-side session lookup.