Stripe Payment Links let you accept payments by sharing a URL—no website or coding required. Create a link in the Stripe Dashboard and share it anywhere: email, social media, invoices, or QR codes.
Key Takeaways
- 1Create Payment Links in the Stripe Dashboard under Products > Payment Links
- 2Each link has a unique URL like buy.stripe.com/xxx
- 3Support one-time payments, subscriptions, and variable amounts
- 4Customize with prefilled email, quantity, and promo codes
- 5Track conversions with UTM parameters
Creating a Payment Link
Payment Links are the easiest way to start accepting payments with Stripe. You do not need to write any code or build a website. The entire process happens in the Stripe Dashboard, where you configure your product details and get a shareable URL in minutes.
Payment Links are created in the Stripe Dashboard, not by building URLs manually:
- 1. Go to Products → Payment Links in the Stripe Dashboard
- 2. Click + New to create a payment link
- 3. Choose your product or create a new one
- 4. Configure options (quantity, discounts, tax, etc.)
- 5. Click Create link to get your URL
Once created, your Payment Link is ready to use immediately. You can share it via email, embed it on your website, or generate a QR code for in-person payments.
Payment Link URL Structure
Understanding the URL structure helps you customize the checkout experience. While Stripe generates the base URL, you can append parameters to pre-fill customer information and apply discounts automatically.
https://buy.stripe.com/test_abc123xyz789You can add parameters to customize the checkout experience:
https://buy.stripe.com/abc123?prefilled_email=customer@example.com&prefilled_promo_code=SAVE20This enhanced URL skips the email entry step for the customer and automatically applies your promo code, reducing checkout friction and increasing conversion rates.
URL Parameters
The following table shows all available parameters you can add to your Payment Links. These parameters help you create personalized checkout experiences for different customer segments and marketing campaigns.
| Parameter | Description | Example |
|---|---|---|
prefilled_email | Pre-fill customer email | prefilled_email=john@example.com |
prefilled_promo_code | Apply a promo code | prefilled_promo_code=SAVE20 |
quantity | Set product quantity | quantity=3 |
client_reference_id | Your internal reference ID | client_reference_id=order_123 |
The client_reference_id parameter is especially useful for linking Stripe payments to your internal systems. You can pass order IDs, customer IDs, or any identifier that helps you reconcile payments later.
Common Use Cases
These examples show how to customize Payment Links for different business scenarios. Each approach solves a specific problem, from reducing checkout friction to tracking marketing performance.
Personalized Email Payment
https://buy.stripe.com/abc123?prefilled_email=customer@example.com// Generate personalized payment links for email campaigns
function createPaymentLink(customerEmail, orderId) {
const baseUrl = 'https://buy.stripe.com/your_link_id';
const url = new URL(baseUrl);
url.searchParams.set('prefilled_email', customerEmail);
url.searchParams.set('client_reference_id', orderId);
return url.toString();
}
// Usage in email template
const paymentUrl = createPaymentLink('customer@example.com', 'order_12345');This function generates unique payment URLs for each customer in your email list. The client_reference_id ties each payment back to your order system for easy reconciliation.
Marketing Campaign with Promo Code
https://buy.stripe.com/abc123?prefilled_promo_code=SUMMER2024&utm_source=instagram&utm_medium=story&utm_campaign=summer_saleCombining promo codes with UTM parameters lets you measure which marketing channels drive the most revenue. The discount applies automatically, and you can track attribution in Google Analytics.
Bulk Order with Quantity
https://buy.stripe.com/abc123?quantity=10Pre-setting quantity is helpful for B2B scenarios where customers order in specific increments. The customer can still adjust the quantity at checkout if you have enabled that option.
Programmatic Checkout (API)
While Payment Links work great for simple scenarios, the Checkout Sessions API gives you full control over the payment experience. Use it when you need dynamic pricing, custom metadata, or integration with your existing order flow.
For more control, create Checkout Sessions programmatically with the Stripe API:
// Node.js with Stripe SDK
const stripe = require('stripe')('sk_test_...');
async function createCheckoutSession(options) {
const session = await stripe.checkout.sessions.create({
payment_method_types: ['card'],
line_items: [{
price: 'price_xxx', // Your price ID from Stripe
quantity: options.quantity || 1,
}],
mode: 'payment', // or 'subscription'
success_url: 'https://yoursite.com/success?session_id={CHECKOUT_SESSION_ID}',
cancel_url: 'https://yoursite.com/cancel',
customer_email: options.email,
client_reference_id: options.orderId,
allow_promotion_codes: true,
});
return session.url; // Redirect customer to this URL
}
// Usage
const checkoutUrl = await createCheckoutSession({
email: 'customer@example.com',
quantity: 2,
orderId: 'order_123'
});The Checkout Session API returns a URL where you redirect your customer. This gives you server-side control over pricing, metadata, and validation before the customer reaches the payment form.
Handling Success and Cancel
After the customer completes or cancels payment, Stripe redirects them back to your website. The success URL receives a session ID you can use to verify the payment and display confirmation details.
After payment, Stripe redirects to your success or cancel URL:
https://yoursite.com/success?session_id=cs_test_xxx// Verify payment on your success page
const stripe = require('stripe')('sk_test_...');
app.get('/success', async (req, res) => {
const sessionId = req.query.session_id;
// Retrieve the session to verify payment
const session = await stripe.checkout.sessions.retrieve(sessionId);
if (session.payment_status === 'paid') {
// Payment successful - fulfill order
const orderId = session.client_reference_id;
await fulfillOrder(orderId);
res.send('Thank you for your purchase!');
} else {
res.status(400).send('Payment not completed');
}
});This code retrieves the checkout session and verifies the payment status before fulfilling the order. Always verify on the server side rather than trusting the redirect alone.
Using Webhooks (Recommended)
Relying solely on the success URL is risky because customers might close their browser before the redirect completes. Webhooks provide a reliable, server-to-server notification that guarantees you receive payment confirmation.
For reliable payment confirmation, use Stripe webhooks instead of relying on success URL:
// Webhook endpoint
app.post('/webhooks/stripe', express.raw({type: 'application/json'}), (req, res) => {
const sig = req.headers['stripe-signature'];
let event;
try {
event = stripe.webhooks.constructEvent(req.body, sig, 'whsec_...');
} catch (err) {
return res.status(400).send(`Webhook Error: ${err.message}`);
}
// Handle the checkout.session.completed event
if (event.type === 'checkout.session.completed') {
const session = event.data.object;
// Fulfill the order
fulfillOrder(session.client_reference_id, session.customer_email);
}
res.json({received: true});
});This webhook handler verifies the signature to ensure the event came from Stripe, then triggers order fulfillment. The client_reference_id you set earlier connects the payment to your internal systems.
Best Practices
Following these practices helps you avoid common pitfalls and build a reliable payment flow. Security and tracking are especially important as your transaction volume grows.
Use client_reference_id for order tracking
Link payments to your internal order/customer IDs for easy reconciliation.
Add UTM parameters for marketing
Track which campaigns drive conversions in Google Analytics.
Use webhooks for fulfillment
Don't rely on success URL alone—users may close the browser.
Don't expose secret keys
Never include API keys in client-side code or URLs.
With these fundamentals in place, you are ready to start accepting payments through Stripe. The FAQ below addresses common questions that arise as you scale your payment integration.
Try the URL Builder
Use our Stripe Checkout template to explore payment URL structures.