#Muertodisparo-Subscription
1 messages · Page 1 of 1 (latest)
Hi there, so basically you want to add invoice items with ad-hoc prices when creating a subscription?
yes, that's right
Got it, you should use add_invoice_items.price_data instead https://stripe.com/docs/api/subscriptions/create#create_subscription-add_invoice_items-price_data
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 I tried using add_invoice_items.price_data but it required a productId.
In stripe checkout sessions, I could pass a product_data key and this would work.
I do not have the said product on stripe
The Subscription API doesn't take product_data, so the workaround is to create a product and pass the product_id to the Subscription creation API. (https://stripe.com/docs/api/products/create#create_product)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.