#mehdi_ece-tax-calculations

1 messages ยท Page 1 of 1 (latest)

sage dockBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1289263005141303326

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

steady stratus
#

Hi ๐Ÿ‘‹

What type of Tax calculations are you attempting to perform? The Express Checkout Element does not natively support tax calculations at the moment. You need to provide the full amount you intend to charge the customer up front.

vapid monolith
#

hmmmm

#

we're charging for a saas service

#

in the US there is no tax but in the UK, there is a 20% tax for instance

#

is there no way to update the express checkout amount after we have determined the billing address from onConfirm?

steady stratus
#

Actually our integration guide kind of covers this.

vapid monolith
#

hmm that's only for shipping though

#

we're charging for a saas product and don't need to collect the shipping address

steady stratus
#

Unfortunately we don't expose an event for changes in billing address

vapid monolith
#

ahh okay, so there is no way to handle this with express checkout?

#

or actually, if i create a payment intent on the server with the correct amount

#

and then call confirmPayment on the client side

#

will that pop up apple pay/google pay requesting for the new amount?

steady stratus
#

I ... don't think so. I think it will either error or charge an amount that is different from what was displayed to the user. The Apple/Google Pay modal window is used to collect the payment method and, at that point, we already have it.

vapid monolith
#

ahhhh

#

hmm okay, maybe we'll just use this for our tax inclusive products then

#

seems like it will be perfect there

steady stratus
#

If you can collect the billing address earlier in the flow and pre-calculate the tax amounbt you can include the tax as a line item like we show in this code snippet

expressCheckoutElement.on('click', (event) => {
  const options = {
    lineItems: [
      {
        name: 'Sample item',
        amount: 1000
      },
      {
        name: 'Tax',
        amount: 100
      },
      {
        name: 'Shipping cost',
        amount: 1000
      }
    ]
  };
  event.resolve(options);
});
vapid monolith
#

ahhh yeah but then when we do express payment, we'll get a new billing address?

#

and wouldn't that be the one we are actually charged for by stripe tax

steady stratus
#

That is the billing address associated with the payment method used. I cannot say whether that would be different than any other billing address you collect.

vapid monolith
#

ahhh yeah true

#

alright thanks for the clarification

#

i think we'll punt on adopting this until we can add tax calculation into the flow

steady stratus