#Santos-Sub-Update
1 messages ยท Page 1 of 1 (latest)
Okay, I have an example. Note: my team is not using Stripe Tax but we are using Tax Rates.
Original price for lower product is $59.99 and tax rate amount paid was $5.16 (Arizona tax percentage is 8.6%)
When upgrading to a higher price of $69.99, new tax rate amount is $6.02.
So when upgrading to the higher price, the original $59.99 price + $5.16 was marked as unused time and the customer was charged the difference. So $69.99 + 6.02 - $59.99 - $5.16 = $10.86
Invoice for upgrade was $10.86. Is this correct?
Do you have the invoice ID so I can take a look?
Thanks! Give me a moment.
Yes this looks correct to me! You basically just end up getting taxed for the prorated amount As we credit the previous tax amount and then charge the new tax amount. Does this look incorrect to you?
Yes, that makes sense to me because of the credit
I confirmed with my team that this is correct too. Thanks!
One more question: the unused time amount would vary if the subscription was further along in the billing cycle - what about the sales tax amount? Would this also be prorated or would the entire tax amount that was charged initially be calculated in the proration?
You are asking about the amount shown on the line item?
It should show the same amount credited each time (the entire amount).
Yes the line item. The line item amount for the lower subscription price would be lower if the upgrade happened 6 months later instead of today but what about the line item amount for the sales tax on the lower subscription price? Does this amount vary?
No the tax amount on the price you are upgrading from should always be the full amount. Then the total tax will be the tax amount of the prorated line item minus that previous tax amount.
What about this invoice? in_1KW3o1ELRGuFUMs6ALGl9uSJ
It looks like the tax amounts were both prorated
Looking!
Ah okay, so you backdated the proration here
I was trying to mimic a customer who was a couple of months into their subscription when they upgraded
It looks like the new and old price are prorated, and then the sales tax also gets prorated when generating the final invoice amount for an upgrade
I think you set your test clock for the wrong date ๐
You set it for 2021
So this cause backdating which is why you don't see the full amount
Hmm the full tax amounts?
On the invoice
Sales tax โ Arizona (8.6%)
-$2.88
Sales tax โ Arizona (8.6%)
$3.36
These are prorated right?
Yes, sorry, I didn't explain this well.
You created a subscription with a period start in the past.
This means you backdated the start_date.
When you do that, we prorate the first period between that backdated start date and the current time.
Of the upgrade I mean.
So that is why you see all line items prorated here
As opposed to having the full amount like the previous example you shared.
Let me know if that doesn't make sense!
Okay, let's say I have one product that costs $10 with a 10% tax rate and a higher price product of $20 with a 10% tax rate.
Original purchase invoice is 10 + 1 so $11
Let's say I'm exactly halfway through the subscription period when upgrading. Will the upgrade invoice line items look like this:
- Remaining time on $20 after 22 Feb 2022 $10
- Unused time on $10 after 22 Feb 2022 -$5
- Older tax amount -$1
- Newer tax amount $2 (sales tax on newer price)
Total $6
OR THIS:
- Remaining time on $20 after 22 Feb 2022 $10
- Unused time on $10 after 22 Feb 2022 -$5
- Older tax amount -$.50 (half of sales tax originally charged)
- Newer tax amount $1 (sales tax of remaining time)
Total $5.50
My understanding is that it should be the first scenario unless you backdate the subscription start date!
I do think you are doing the right thing by testing here though. I'd recommend testing this with a test clock but not backdating the initial billing period.
You can also test this by previewing the upcoming invoice: https://stripe.com/docs/api/invoices/upcoming
Test clocks are useful but then I also have to use future proration dates for the preview and subscription modification end points; my current Stripe integration relies on using something like int(time.time()) when coming up with the proration date.
But this has been helpful, thanks!
Previewing the upcoming invoice and setting price_data (https://stripe.com/docs/api/invoices/upcoming#upcoming_invoice-subscription_items-price_data) for the sub items and tax rate should show you exactly what the line items will look like.
Let us know if we can help further!
I believe I am seeing the second case to be true where tax amounts are prorated: https://dashboard.stripe.com/test/logs/req_Cb9KxJQgJGCnNe
I am using a billing clock set to the future
>>> items
[{'id': 'si_LCUIggSOlt76YH', 'price': 'plan_print_standard6999', 'tax_rates': ['txr_1KW5eDELRGuFUMs63Wtish9I']}]
>>> customer_details
{'shipping': {'address': {'line1': '4342 Lit Ave', 'city': 'Phoenix', 'state': 'AZ', 'postal_code': '85001', 'country': 'US'}, 'name': 'Testing One Two'}}
>>> invoice_kwargs
{'customer': 'cus_LCUI4gEH5gmgpl', 'subscription': 'sub_1KW5K3ELRGuFUMs6jzq0C3yt', 'subscription_proration_date': 1669150328, 'subscription_proration_behavior': 'always_invoice', 'expand': ['total_tax_amounts.tax_rate']}
>>> invoice = stripe.Invoice.upcoming(subscription_items=items,automatic_tax={"enabled": False},customer_details=customer_details,**invoice_kwargs)
catching up here give me a min
@prime inlet mind catching me up real quick here, what is the "second case" in
#945746508429545562 message