Skip to main content

Overview

The @yuno-payments/vue package provides Vue 3 components and composables for embedding Yuno checkout in your application. The plugin manages SDK initialization and provides reactive state for payment flows.
Vue components require Vue 3.3+ with Composition API support. Vue 2 is not supported.

Prerequisites

Installation

Plugin Setup

Register the Yuno plugin in your application entry point:

Plugin Options

YunoCheckout Component

Renders the full checkout UI with all available payment methods.

YunoCheckout Props

YunoCheckout Events

Always verify the final payment status server-side via webhooks or the GET payment API. Client-side events should not be the sole source of truth.

YunoPaymentForm Component

Renders a card-only payment form for custom checkout flows.

Composables

useYunoPayment

Provides imperative control over the payment flow with reactive state.

useYunoPayment Return Values

Slots

Components expose slots for customizing sections of the checkout UI:

Available Slots

Theming

Apply themes through the plugin options or override with CSS variables:
Override with CSS variables:

Nuxt.js Integration

Create a Nuxt plugin to register the Yuno plugin on the client side only:
The .client.ts suffix ensures the plugin runs only in the browser. Yuno SDK components require browser APIs and will fail during server-side rendering.

Complete Example

A full checkout page in Vue with session management:

Testing with Vue Test Utils

Mock Yuno components in unit tests. Use end-to-end tests (e.g., Cypress, Playwright) for full integration testing against the sandbox environment.