#narnau
1 messages · Page 1 of 1 (latest)
Hi there
So if you want to do this then you want to create the invoice_item separately from using add_invoice_item, then you can set discountable: false (https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-discountable)
So, first I've to create the subscription, and then create a separate invoiceItem?
Because if I try to add he discountable:false to the add_invoice_item object, stripe throws an error
You would create the Invoice Item and then create the Subscription
That way the initial Invoice for the Subscription will pick up the Invoice Item
The add_invoice_item param on the Subscription endpoint doesn't support discountable
So you have to use the Invoice Item endpoint directly
Okay, so I create the invoice item without any subscription, then I create the subscription, and then? I don't have to tell the invoice item which subscription is related to it?
Nope if you don't specify any Sub or Invoice when creating the Invoice Item the next finalized Invoice will pick up that Invoice Item
ah, ok...!
Since you haven't created the Sub yet you can't specify it 🙂
And you don't want to create the Sub first because then the Invoice will already be finalized
Now I understand. It's weird but at least now I understand haha
Yeah a little strange
Would be easier if add_invoice_item supported discountable
Hopefully in the future it will
thank you @vagrant fractal !