#Shaun
1 messages · Page 1 of 1 (latest)
You can define an ad hoc price with the price_data hash when creating your subscription item https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-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 you would need a pre-defined product but could specify a custom one-off price for the invoice item on the fly
Thank you for your reply, I'm confused as the documentation says that the price field is required
Would you mind linking to that doc?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
That doc shows price as optional but price_data.product as being required if you are using the price_data hash
Actually it looks like both are optional. I think you can just set an amount, currency, and description on the invoice items themselves
Ok so just to clarify the price does need to be created in stripe and the price sent in the api call?