Prerequisites
You’ll need yourclientToken to initialize Primer Checkout. See our Client Session guide on how to create a client session and retrieve a clientToken first.
Install the SDK
Install the Primer SDK using npm:Load and Initialize
Import and initialize Primer in your application:Add the Checkout Component
Create a basic checkout by adding theprimer-checkout component to your page:
| Property | Description |
|---|---|
client-token | A token retrieved from the Client Session endpoint. This token authenticates the checkout session and contains configuration for available payment methods. |
Verify Installation
Check that components are registered correctly in your browser console:Framework-Specific Setup
| Framework | Additional Steps |
|---|---|
| React 18/19 | See React Integration Guide for stable reference patterns |
| Next.js | See SSR Guide for client-side loading |
| Nuxt.js | See SSR Guide for onMounted pattern |
| SvelteKit | See SSR Guide for onMount pattern |
| Vue.js (client-only) | No additional setup needed |
| Vanilla JS | No additional setup needed |