Payment UI
shadcn payment components
Install payment UI into your own codebase: balances, purchase dialogs, wallet recovery, credit gates, and feature gates for developer products.
Why payment UI should live in your app
Billing touches the most sensitive parts of a product: pricing, locked states, empty balances, renewals, and support recovery. A hosted widget can be fast, but it often feels bolted on. The shadcn model works better for small developer products because the component source lands in your repository.
- Review the component code before shipping it.
- Change copy, layout, and styling to match the product.
- Keep checkout prompts close to the feature they unlock.
- Avoid building balance displays and purchase dialogs from scratch.
The core vantezzen/pay components
The registry gives you the common payment UI pieces most small apps need. They can be used together for a complete flow or separately when you want custom screens.
- PayProvider loads wallet state and resumes checkout confirmation.
- RemainingCredits shows a live balance for the current wallet.
- PurchaseButton and PurchaseDialog list offers and start checkout.
- CreditGate renders paid UI only when enough credits exist.
- FeatureGate renders UI only when a subscription, one-time purchase, or grant unlocks it.
- WalletButton lets users copy, restore, transfer, and manage a wallet.
A simple paid action
For a credit-based action, put the provider around the paid part of the app, show the balance, then gate the action by the number of credits it costs.
<PayProvider publishableKey={publishableKey}>
<div className="flex items-center gap-3">
<RemainingCredits productSlug="video-minutes" />
<WalletButton />
</div>
<CreditGate productSlug="video-minutes" cost={10}>
<Button onClick={() => deduct(10)}>
Process video
</Button>
</CreditGate>
</PayProvider>FAQ
Are these npm components?
No. They follow the shadcn registry model: source files are copied into your app so you can inspect and change them.
Can I use custom UI instead?
Yes. The components use the same vantezzen/pay client and API you can call directly for fully custom screens.
Do the components replace Stripe Checkout?
No. They start provider checkout and render app-side billing UI. Stripe or Polar still handles the payment page.
Install the payment UI you will actually own
Use the registry components for the default flow, then edit the source when your product needs a different shape.