Web SDK
Plexy Drop-in and Components for browser, React, and Next.js
Web SDK
The official Plexy client-side SDK for the browser. Build a full Drop-in checkout or compose individual payment Components in any web app, including React and Next.js. Works with either the Sessions flow (recommended) or the Advanced flow.
Requirements
- Latest two versions of Chrome, Firefox, Safari, and Edge
- Plexy Checkout API v2 or later
- Node.js 18 or later for your server code
Installation
npm install @plexy/plexy-web
# or
pnpm add @plexy/plexy-web
# or
yarn add @plexy/plexy-webImport the default stylesheet once in your app (for example in the root layout):
import '@plexy/plexy-web/styles/plexy.css';Imports
The package ships two entry points:
-
@plexy/plexy-web(recommended): tree-shakable. Import only the components you use.import { PlexyCheckout, Dropin, Card, ApplePay, GooglePay, } from '@plexy/plexy-web'; -
@plexy/plexy-web/auto: pre-registers every payment-method component. Simpler to start with but ships a larger bundle.import { PlexyCheckout } from '@plexy/plexy-web/auto';
All examples below use the tree-shakable entry.
Browser Support
The SDK supports the latest two versions of Chrome, Firefox, Safari, and Edge. Internet Explorer is not supported.