Follow this short guide to automatically create a Stripe Checkout session for a specific product in your Stripe account. Without any additional JavaScript or packages to install, you can instantly accept payments by adding a simple input to your form.
Add a single Stripe product to a form
Create a type hidden
input with the name price_id
with the value set your Stripe Price ID. See the example below.
<input name="price_id" type="hidden" value="price_1234567890abcdef"></input>
Adding multiple Stripe products to a form
Add multiple price_ids to be combined at checkout by comma separating the items. This is perfect for upsells, bundles, and one-time fees at sign up.
<input name="price_id" type="hidden" value="price_1234567890abcdef, price_0987654321abcdef"></input>