#Jones.Jeffery
1 messages ยท Page 1 of 1 (latest)
Hi ๐
Yes the initial invoice will be finalized immediately so it can be used to collect payment details from the customer.
What is the use case that you do not want to use the application_fee_percent parameter to achieve this outcome?
We are looking to apply a flat fee for the initial and every following invoice.
Is the amount of each invoice subject to change?
Nope, it should be the same amount throughout the subscription. We could calculate the percentage for the initial, is it correct that it applies the same fee amount to all the following invoices as well?
That would be correct
If we were to apply the percentage, how would we manage adjusting the fee if the customer were to change from say annual sub to a monthly sub?
You could get to a flat rate at that point. If the customer changes their subscription you can update the application_fee_percent
https://stripe.com/docs/api/subscriptions/update#update_subscription-application_fee_percente
By listening for the Subscription Created event and updating it from there?
I'm not sure I follow
You linked application_fee_percent but stated application_fee_amount. I'd assume that we would receive a webhook for the subscription change and have to update the percent at that time.
When you create the subscription, you know the amount you are going to charge
Ah my mistake
Right. But if the customer changes the subscription through the portal, how would that work?
- don't let them use the portal to do that.
or - listen to the
.updatedevent for that customer subscription and update theapplication_fee_percent.
OR - Undo the
application_fee_percentafter the initial invoice and then (when invoices are generated with a 1 hour draft period) use the `invoice.created webhook event to trigger adding the flat fee
Got it. That is helpful, thank you! As a thought, is it possible to "override" the application fee on the draft invoices? So we can always sanity check that they are getting the correct application fee and would allow us to handle subscription changes. Receive the invoice.created event, validate their fee matches the correct subscription amount. If not, send an update for the application fee amount on the invoice.
Yes that approach would work but only after the initial invoice, which is finalized immediately.
Happy to shed what ๐ก I can ๐