#Santos-Sub-Update

1 messages ยท Page 1 of 1 (latest)

harsh nimbus
#

Hi there! I believe we tax the prorated amount, but let me confirm!

prime inlet
#

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?

harsh nimbus
#

Do you have the invoice ID so I can take a look?

prime inlet
#

Yes

#

in_1KW2r9ELRGuFUMs6Wux0CGQM

harsh nimbus
#

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?

prime inlet
#

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?

harsh nimbus
#

You are asking about the amount shown on the line item?

#

It should show the same amount credited each time (the entire amount).

prime inlet
#

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?

harsh nimbus
#

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.

prime inlet
#

What about this invoice? in_1KW3o1ELRGuFUMs6ALGl9uSJ

#

It looks like the tax amounts were both prorated

harsh nimbus
#

Looking!

harsh nimbus
#

Ah okay, so you backdated the proration here

prime inlet
#

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

harsh nimbus
#

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

prime inlet
#

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?

harsh nimbus
#

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!

prime inlet
#

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
harsh nimbus
#

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.

prime inlet
#

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!

harsh nimbus
#

Let us know if we can help further!

prime inlet
#

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)
light delta
#

catching up here give me a min

light delta
prime inlet
#

Second case is

#

I guess what I am trying to understand is if the tax rate amounts are prorated when upgrading a subscription. It looks like they are based on the stripe.Invoice.upcoming() call I made but I would like confirmation.