#Mi7 - checkout recurring and one time prices
1 messages · Page 1 of 1 (latest)
You cannot include mode twice like that, but you can do this generally speaking
You'll want to use mode=subscription to manage the creation of the subscription as the foundation of the checkout session
Then the one time price can also be included in the line_items, and it will appear on the first invoice only
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items
For subscription mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So in your code, you need to merge those two line_items array into one, and just use subscription mode
Mi7 - checkout recurring and one time prices