Stripe Payment Links and Buy Buttons are hosted by Stripe and embed with a public key only. That means no sensitive keys ever live in your site’s code — which is safer and works perfectly with a static site.
The Easy Way: Payment Links
A Payment Link is a Stripe-hosted checkout page you can link to from any button.Create products in Stripe
In your Stripe Dashboard, create a product and price (one-time or subscription).
Create a Payment Link
Go to Payment Links → New, pick your product, and copy the link (looks like
https://buy.stripe.com/...).Buy Buttons & Pricing Tables
Stripe also offers embeddable Buy Buttons and Pricing Tables you can drop into a page. Create one in Stripe, then:Test vs Live Mode
| Mode | Keys / Links | Use |
|---|---|---|
| Test | Test-mode payment links, pk_test_ | Try the flow safely |
| Live | Live payment links, pk_live_ | Real payments |
Test Card Numbers
Use these in test mode:| Card Number | Result |
|---|---|
4242 4242 4242 4242 | Success |
4000 0000 0000 0002 | Declined |
4000 0000 0000 3220 | Requires 3D Secure |
Advanced: Custom Checkout
Fully custom, server-side Stripe flows (dynamic carts, metered billing, custom webhooks) require a backend to hold your secret key. That’s beyond a static site — if you need it, you’d pair your site with your own backend or a serverless function. For most sites, Payment Links and Buy Buttons cover selling products, plans, and services.Best Practices
Use Payment Links for most cases
Use Payment Links for most cases
They’re the fastest, safest way to sell on a static site — no keys in your code.
Keep secret keys out of your site
Keep secret keys out of your site
Only publishable keys belong in a website. Secret keys stay in Stripe / a backend.
Test before going live
Test before going live
Run a test-mode purchase end to end before switching to live links.
Troubleshooting
Pricing table not showing
Pricing table not showing
Confirm you used your publishable key (
pk_...) and the correct pricing-table ID from Stripe.Selling something bigger?
Add Kleap Database for orders, accounts, and saved data

