#Ninjesus-subs
1 messages ยท Page 1 of 1 (latest)
Hi there! When you create an invoice item you can set a coupon on that item: https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-discounts-coupon
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You can also update the item with a coupon: https://stripe.com/docs/api/invoiceitems/update#update_invoiceitem-discounts-coupon
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok and I can link the invoice item there ? : https://stripe.com/docs/api/subscriptions/create#create_subscription-add_invoice_items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Nope, when you create the Subscription an invoice will be created and that invoice will sweep up any invoice items sitting on the customer unless those invoice items are specified for a certain subscription ID
See: https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-subscription where we explain this behavior.
ok! so I create invoice Items ant then I create subscription ?
Yes that is one way to do it
Or you can create the invoice items when you create the Subscription as you noted above
It just depends on your model
If you create the invoice items when creating the Subscription, then you apply the coupon to the Subscription
Not the invoice items
ok so if I create an invoice item (A) without specifying the subscription, because subscription doesn't exists yet,
and then I create a subscription, It will automatically put the invoice item (A) in the new subscription ?
Yep
Alright I try it thanks
Ok it works well thanks for quick support !
I have a feedback if I may :
When reading the documentation, the phrase "the invoice item will be be added to the next upcoming scheduled invoice", more precisely "scheduled invoice" had me thought that it would attach the invoice item to the scheduled invoice of any existing subscription, implying that a subscription already exists.
To me there would be no way that the first invoice generated upon subscription creation could be "sheduled", as "I'm the one who" create it.
So I've been telling for weeks to my clients that we cannot put coupons to other items when creating a subscription ๐ they will be happy