How to integrate Stripe payments
You can integrate Stripe payments either with no-code Payment Links shared from the Stripe Dashboard or with a custom checkout built on Stripe's API, Stripe.js and Stripe Elements.
The no-code route suits sellers without a developer. The steps below describe the general Dashboard flow and do not cover country rules, so check Stripe payment links India availability separately if you sell from India.
- Create an account: Sign up for Stripe and activate the account by adding your business details.
- Start a link: In the Dashboard, open Payments, then Payment Links, and select Create.
- Set up the product: Enter the product name, price and currency.
- Share it: Copy the generated URL and place it on your website or send it to customers.
A custom integration gives more control over the checkout experience and needs code on both the server and the page.
- API keys: Copy your Publishable Key and Secret Key from the Developers section of the Dashboard.
- Server endpoint: Build a backend route in a language such as Node.js or Python that calls the Stripe API to create a PaymentIntent and return its client secret.
- Frontend: Load Stripe.js with your publishable key, then mount Stripe Elements on your page or send the customer to a hosted checkout session.
- Webhooks: Add webhook endpoints on your server so it receives asynchronous events telling you whether a payment succeeded or failed.
Stripe's documentation also describes building a checkout page with Stripe Elements and the Checkout Sessions API. For sites on WordPress, Stripe notes that a plugin such as WooCommerce can handle the frontend side instead of custom code.