#Blakai-automatictax-subs
1 messages · Page 1 of 1 (latest)
hello, what happens when you do:
Now, with automatic tax, we’re coming across an error that does not allow us to add negative custom line items.
we're getting an error message that says that negative line items cannot be added to invoices with automatic tax
as a result, the invoice is not getting created
Hello @crimson shale this is the error message that we are getting from stripe api:
"The price price_1LbsoIH8Zl3ZWCK2TQ7cCzKx has a negative amount which is not supported with automatic tax."
This is the Request ID that you can check:
(Request req_q0xgeYduBIwjZ2) The price price_1LbsoIH8Zl3ZWCK2TQ7cCzKx has a negative amount which is not supported with automatic tax.
thanks for sharing that. To better understand, in this case, Invoice in_1Lbsk6H8Zl3ZWCK2zyUFphhL is for total $10 (for example) due to 2x Monthly Prices of $5 each.
What would you like to reduce this by? I'm trying to understand the full use-case so I can think up a solution that works
What would you like to reduce this by?
like, not in terms of arbitrary $5 but instead, is this something unused by the end Customer? like did they only use one of those Prices (each for $5/month)
we offer a monthly subscription where accounts pay per user. In this case, the 2x Monthly Price of $5 each represents an account with 2 users. If midway through the subscription one user was deleted from the account, it means that upon renewal of the subscription, since the account has only one user, we would charge them 1x Monthly Price of $5.
we do not prorate or credit the subscription immediately after the account removes the 2nd user. We update the subscription quantity at the beginning of each subscription cycle based on the number of users that an account has active when the subscription renews.
why don't you reduce the quantity of the Price on the Subscription and disable proration with proration_behavior: none
so that there is no proration and when you reduce from qty: 2 to qty: 1, the next month only charges for $5 instead of $10 (for qty 2) and this way you don't have to create a negative Invoice Item to credit that unused time
well, during the same month that the account removed one user and downgraded from qty 2 to qty 1, they could then add another user and increase subscription quantity to 2 again. In this case, we wouldn't want to charge them for the increase of quantity since, in fact, they have paid for qty 2 in the beginning of the subscription
as a result, we do not decrease a subscription's quantity during an active period to ensure they have access to all units they've purchased
you could still do that with my approach, no?
like you're not doing the Subscription change at the time of end customer changing it. You still wait until the Invoice is in draft and by then, you know if they changed qty 2 -> 1 -> back to 2, so you know what qty to update on the Subscription
Yes, when we receive a webhook for invoice.created, at that time we are recalculating the customers quantity and adding this difference as an invoice item with the price as unit_amount and quantity. At least this was working fine until now that we are upgrading to Stripe tax
We had this logic before but it was not working as expected due to the business logic that we have. The customers can add/remove all the time during the active subscription, but we had to track how many available seats or in general for how much quantity they paid
👋 Hopping in since @crimson shale has to head out
Give me a minute to catch up
Just to confirm I understand - when downgrading from 2 -> 1 you don't want to charge for any prorations and the changes are reflected at the NEXT billing cycle. When upgrading (say from 2-> 3), do you also want to delay charging for any changes until the next billing cycle, or do you want to prorate in that case?
when upgrading we prorate immediately, but we do not do downgrade when decreasing the quantity until we receive a draft invoice for billing cycle
Gotcha - so the best way to do this would probably be through using Schedules. You can schedule all downgrades to not take place until the subscription is renewed (see https://stripe.com/docs/billing/subscriptions/subscription-schedules/use-cases#downgrading-subscriptions for an example where they are subscribed to two prices for the first cycle, and then automatically downgraded to one price when the subscription renews)