vektopay-svelte-sdk Svelte Themes

Vektopay Svelte Sdk

@vektopay/svelte

Svelte wrappers for Vektopay checkout. The core UI and security live in checkout.js served by the API Gateway.

Install

bun add @vektopay/svelte
# or
npm install @vektopay/svelte

Usage

1) Create A Token Server-Side

Your backend should create a checkout session token (via POST /v1/checkout-sessions) and send that token to the browser. Payments are created via /v1/payments inside the checkout flow.

2) Use The Token In The Browser

<script>
  import {
    VektopayCheckoutButton,
    VektopayEmbeddedCheckout,
    VektopayCardElement,
  } from "@vektopay/svelte";
</script>

<VektopayCheckoutButton token="your_token" apiBase="http://localhost:3000" />
<VektopayEmbeddedCheckout token="your_token" apiBase="http://localhost:3000" />
<VektopayCardElement apiBase="http://localhost:3000" />

Build

bun install
bun run build

Publish

npm version patch
npm publish --access public

Notes

  • Tokens are created server-side. Never expose secret keys in the browser.

Top categories

Loading Svelte Themes