#kornacho-dynamic-discount
1 messages ยท Page 1 of 1 (latest)
Hi!
On this subject, I've been thinking also on issuing credit notes after the invoices are paid, but this will require 2 objects (1 invoice, 1 credit note) and a constant returns of money which seems a bit complicated on the accounting side of things
Gotcha. Looking into if a fixed discount can be applied several times.
quick question:
are you trying to apply the same discount multiple times to a subscription?
Thanks. Yes, that's the objective. Apply a fixed discount multiple times according to, for example, users referrals. Let's say, $5 discount per new registered user this month
when you say discount, you mean to use coupons correct?
that was my initial idea but it would require me to create hundreds of coupons. if I charge the user 100 a month, I need to be able to add discounts of $5 for each action the user made. So that would be 20 coupons just to get to 100. If I have a $500 plan, that would be a lot of coupons :/
I mean, if this was the only option, I would need to create coupons for values fo 5, 10, 15, 20, 25, and so on. Instead of one of 5 that I can apply n amount of times to the invoice
An option you could explore instead of using coupons is to create invoice items with a negative amount (https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-amount) every time you want to offer an additional discount to your customers
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Can credit notes be applied to a draft invoice? I'm having issues understanding the timing of it. If that's the case, I could do the following:
- receive a invoice.created webhook event
- issue a credit note to the user
- check if the credit is applied to the invoice
- profit!
Credit notes should only be applied to finalized invoices
Oh I see. so the logic is almost the same
I get a webhook when the draft is created, so I add items with negative values, and that would be it, right?
In that case, I can add a single item for any value I'd like
Yup!
That solves the issue! Thanks to both of you for your help!
You can also create the invoice item at any point during the subscription (making sure to specify subscription see https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-subscription) and it should be automatically pulled in to the next invoice created for it. You don't necessarily have to wait until the invoice has already been created)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I see. That's also very convenient