#stellarloony-invoice
1 messages · Page 1 of 1 (latest)
https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-amount takes a negative amount (e..g -4200 )
i need to discount a subscription, so i should just provide negative amount and customer id right?
yes , or negative amount and subscription
definitely try it in testmode and experiment with it!
ok
is there a way to add negative invoice item when creating a subscription ?
I don't think it works with https://stripe.com/docs/api/subscriptions/create#create_subscription-add_invoice_items , so instead you'd create the Invoice Item as normal(amount + customer), when the subscription is created it will pull in that item and apply it to the first invoice.
ok
let me tell you my use case, please suggest a right way to do it, i've been stuck on discounts
so i have 9 products, our subscription plan is divided into 3 tiers, each tier has 3 products, so total 9.
each tier has different discount rates,
i tried using coupons to apply discounts, but i can't change coupons when updating subscription, when updating proration_behavior: 'always_invoice', payment_behavior: 'pending_if_incomplete',
subscription update request throws error
so now i'm trying negative invoice items
yes, pending updates have some restrictions and one of them is probably that you can't create a pending update with a coupon involved.
you could potentially not use pending updates, it depends which one if more important to you, the pending behaviour that pending_if_incomplete allows, or the ability to use coupons. No great answer here unfortunately.
when plan changes, products will change and so then the subscription items, that's y pending behaviour is important
i should go with negative invoice item then??
if you can't use coupons due to the requirement to use pending updates, and you need to have discounts, then negative invoice items seem like the only option yes