Skip to main content
This code snippet is divided in two parts: The first file is responsible for creating the product and price in Stripe, and the second file is responsible for creating the split payment session.

Pre-made function to create products and prices using Stripe API

createProductAndPrice.ts

Route to create the split payment

The code below must receive a JSON with the following structure:
route.ts