#dylanfm - GST + Stamp Duty

1 messages ยท Page 1 of 1 (latest)

tardy charm
#

Do you already have code that attempts to do this?

harsh shadow
#

Yes. Here's an example invoice

tardy charm
#

Looking in to how to achieve this.

harsh shadow
#

in_1KoRQ9EWqPhSrKlyewbVu0Ji

tardy charm
#

Thank you. Can you send me your code snippet where you try to set this up?

harsh shadow
#

Left is what stripe is calculating with my current setup, right is our system's calculations

#

There's a fair amount of code in different places ๐Ÿ˜„ I'll run through it

#

Stripe tax rates setup: GST 10% exclusive, Stamp Duties (differ by state) inclusive, e.g 5%

#

My current stab at this is using that combination of inclusive / exclusive. Then sending to stripe only the GST inclusive amount and an array of tax rates including GST and the applicable stamp duty

#

However it's calculating the stamp duty off the amount - GST in that screenshot, so it's not there yet

#

This is all happening inside a subscription schedule with dynamic prices using price data etc. But I don't think that matters.

#
def subscription_line_item(bill, line_item, billing_cycle)
    premium = line_item.premium
    product = premium.product

    # Divide this line item's GST inclusive amount by the number of
    # payments according to billing cycle.
    # ONLY including GST as Stripe should have that configured as inclusive
    # and stamp duty as exclusive (it will calculate SD, which should match ours)
    amount = line_item.gst_inclusive_amount.to_d / billing_cycle.count.to_d

    {
      price_data: {
        currency: bill.currency,
        product: product.stripe_product_id,
        recurring: {
          # Likely that this will communicate:
          # - this is the price for 1 year of this product
          # - or, this is the price for 1 month of this product
          interval: interval(billing_cycle.unit),
          interval_count: '1'
        },
        unit_amount: (amount.to_d * 100.to_d).to_i.to_s, # in cents as string
      },
      tax_rates: line_item.taxes.map(&:stripe_tax_rate_id)
    }
  end
tardy charm
#

Thanks for the info and code. Looking in to this. I agree that I don't think the dynamic prices are part of this but I am not immediately sure how to properly set this up otherwise

harsh shadow
#

What I'm expecting is for the stamp duty to be calculated off the 901.34 (amount + gst) in that example above. Instead it's being calculated just off the amount (819.40)

#

And in the end I'd like the GST + Stamp Duty itemised on the invoices and available for reporting.

tardy charm
#

I am still having trouble figuring out how to do this. I am reaching out to my colleagues now who are more knowledgable on Stripe Tax and will get back with what we can find.

harsh shadow
#

Thanks Pompey

tardy charm
#

Do you hav the IDs of the two tax rates that you created for this? (txr_12345678)

harsh shadow
#

I have an angle that I am considering trying. but it would result in stripe itemising the stamp duty rate with an incorrect %

#

yes 1 second

#

Stamp duty for that invoice: txr_1KmKUhEWqPhSrKlyhQF6LsL7
GST for that invoice: txr_1KmKTHEWqPhSrKlymlsuL81a

#

An idea I have is to instead:

  • send stripe the full tax inclusive amount
  • set the SD rate to inclusive in Stripe, like GST
  • modify the SD rate to accomodate that it's calculated off the GST inclusive amount
    • in this case I think if I changed SD rate to 0.04761905 it would calculate it right, and that number appears to be constant
    • however that's not the right SD rate to list on the invoice
tardy charm
#

Thank you, will definitely pass your workaround along as well.

harsh shadow
#

Thanks

tardy charm
#

So unfortunately our tax rates don't support taxing on top of each other at the moment. Our recommended way to do this is to set the rate of your SD taxes as their effective tax rate with GST. So for 10% GST and 5% SD, you would actually want to set your SD tax to 5.5%

#

Is that a viable workaround here?

harsh shadow
#

Yes I think I'll need to do that. I'll do that and make both tax rates inclusive. Hopefully it's acceptable that the % rate is incorrect on the tax invoices.

#

Thanks

tardy charm
#

It sounds like you may still want them to be exclusive if you want them on top of what you are charging. Unfortunately I am not sure how acceptable that is in a business sense, our support may be able to speak to that if you reach out https://support.stripe.com/?contact=true

harsh shadow
#

Ok, thanks I'll try setting them as exclusive as well.

#

This has been a good tour through the stripe tax stuff ๐Ÿ™‚ This is our easiest tax calculations too.

harsh shadow
#

Looks good, thanks folks

tribal mesa
#

NP!

#

Glad we could help