How to accept payments on your website. Payment providers, checkout flows, and subscription billing. You'll need authentication so you know who's paying.
Don't worry — you won't write any payment code by hand. Your AI tool handles all the technical parts. This guide helps you understand the concepts so you can describe what you want.
The industry standard for online payments. Beautiful APIs, pre-built checkout pages, subscription billing, invoicing. Works globally.
All-in-one payments + tax handling. Acts as Merchant of Record so they handle sales tax globally. Great for digital products.
The original online payment. Huge user base. Good for international payments where users already have PayPal accounts.
Merchant of Record like Lemon Squeezy. Handles payments, taxes, and compliance. Popular for SaaS.
Redirect users to Stripe's checkout page. Easiest to implement, handles all compliance.
Pro Plan
One-time purchase
$29.00
"Add Stripe Checkout — redirect users to a hosted payment page when they click Buy."
Payment form embedded directly in your page. More control over the look and feel.
Payment Details
"Embed a Stripe payment form directly in our checkout page using Stripe Elements."
Fully custom payment UI. Most work but total design control. Requires PCI compliance.
Billing Address
Card Details
Order Summary
"Build a custom checkout form with card number, expiry, and CVV using Stripe's PaymentIntent API."
Automatically charge users monthly or yearly.
Let users try before paying. Usually 7 or 14 days.
Free, Basic, Pro, Enterprise — each with different features.
Charge based on usage (API calls, storage, seats).
Let users change their plan. Prorate the difference.
Handle gracefully. Often allow access until period ends.
Stripe sends events (payment succeeded, subscription canceled) to your server.
Let users manage their subscription, update payment, download invoices.
Automatic retries when a payment fails. Send emails to update card.
A visual mockup of a typical 3-tier pricing table you can ask AI to build:
Step-by-step AI prompts to set up each provider. Copy the prompts, paste into your AI tool, and follow along. Make sure your site is deployed before testing with real payments.
Stripe is the most popular choice. You'll create a Stripe account, get your API keys, and use AI to wire everything up. No coding needed on your part.
Step 1 — Set up Stripe Checkout
"Add Stripe Checkout to my app for a product called [Product Name] priced at [amount] USD. When the visitor clicks 'Buy Now', send them to Stripe's hosted checkout page so Stripe handles the whole payment. After a successful payment, bring them back to my /success page. Keep my Stripe keys in a safe place so they're never visible to visitors."
Step 2 — Handle payment confirmation
"Create a /success page that shows a thank-you message after payment. Also set up a listener so Stripe can tell my app whenever a payment actually goes through. When that happens, save the customer's email and the amount they paid. Make sure the listener checks that the message is really from Stripe (using the secret Stripe gives me for this), so nobody can fake a payment."
Step 3 — Add a customer portal
"Add a 'Manage Subscription' button that sends the signed-in customer to Stripe's Customer Portal. The portal is a page hosted by Stripe where customers can update their payment method, view past invoices, and cancel their subscription. When they're done, bring them back to my /account page."
Lemon Squeezy handles sales tax worldwide so you don't have to. Create your products in the Lemon Squeezy dashboard first, then use these prompts to connect it to your app.
Step 1 — Add checkout links
"I'm using Lemon Squeezy for payments. I already created a product in the Lemon Squeezy dashboard. Add a 'Buy Now' button to my pricing page that opens the Lemon Squeezy checkout overlay. My checkout URL is [paste your checkout URL from Lemon Squeezy dashboard]. Pass the customer's email if they're logged in so the checkout form is pre-filled."
Step 2 — Handle webhooks
"Set up a listener so Lemon Squeezy can tell my app whenever a purchase or plan change happens. When an order is created, mark the customer as having purchased. When a subscription changes plans, update their plan in my database. Make sure the listener checks that the message is really from Lemon Squeezy (using the secret they give me for this), so nobody can fake a purchase."
Step 3 — Add a customer portal link
"Add a 'Manage Subscription' button on the account page. Use the Lemon Squeezy API to generate a customer portal URL for the current user. The portal lets them update payment info, switch plans, and cancel. My Lemon Squeezy API key is stored in the LEMONSQUEEZY_API_KEY environment variable."
PayPal is great when your customers already have PayPal accounts. Get your Client ID and Secret from the PayPal Developer Dashboard, then use these prompts.
Step 1 — Add PayPal buttons
"Add PayPal Smart Payment Buttons to my checkout page. Show both a PayPal button and a Debit/Credit Card button. When the visitor clicks Pay, start an order for [amount] USD with the description [Product Name]. Once PayPal confirms the payment, send the visitor to my success page. Keep my PayPal keys in a safe place so they're never visible to visitors."
Step 2 — Verify payment on server
"When a visitor finishes paying with PayPal, have my server double-check with PayPal that the payment is real (don't trust the visitor's browser for this). Once it's confirmed, save the order details — customer email, amount, and the PayPal transaction ID — in my database. Keep my PayPal keys in a safe place so they're never visible to visitors."
Step 3 — Add PayPal subscriptions
"Set up PayPal subscription billing. I already created a subscription plan in the PayPal dashboard with Plan ID [plan_id]. Add a 'Subscribe' button that starts the PayPal sign-up flow. Once the visitor approves the subscription, save the subscription ID against their account. Also set up a listener so PayPal can tell my app whenever a payment goes through or a subscription gets cancelled, and update that customer's status in my database."
Paddle handles payments, taxes, and invoicing as a Merchant of Record. Create your products in the Paddle dashboard, grab your API key and Client Token, then use these prompts.
Step 1 — Add Paddle checkout
"Add Paddle checkout to my app. Add a 'Buy Now' button that opens Paddle's checkout popup for my product (price ID [price_id]). If the visitor is already signed in, pre-fill the form with their email so they don't have to type it. After a successful payment, send them to my /success page."
Step 2 — Handle Paddle webhooks
"Set up a listener so Paddle can tell my app whenever a purchase or subscription goes through. When that happens, save the customer's Paddle ID and their subscription status in my database — handle both one-time purchases and new subscriptions. Make sure the listener checks that the message is really from Paddle (using the secret Paddle gives me for this), so nobody can fake a purchase."
Step 3 — Manage subscriptions
"Add subscription management to my app. On the account page, add an 'Update Payment Method' button and a 'Cancel Subscription' button. When the signed-in customer clicks either one, send them to the matching Paddle page for their subscription. Keep my Paddle key in a safe place so it's never visible to visitors."