Skip to content

Spike: Inconsistent tax behavior when using Express Checkout for virtual products #8373

Open
@gpressutto5

Description

Describe the bug

As noted in #7577 (comment), we have a fundamental problem calculating taxes for virtual products in Express Checkout. The problem happens because all the payment data is loaded when the page is rendered, so unless the customer is logged in, we have no data about their billing or shipping address. This data is only updated subsequently when we need to calculate the shipping fee, and since virtual products do not require shipping, the tax amount will not be updated.
In this issue we must look for a way to resolve this and calculate taxes correctly.
One idea I had is to always ask for a shipping address when using Apple Pay or Google Pay, even for products that don't require shipping.

The solution might be affected by #8297

To Reproduce

  1. Go to the taxes settings and create different Taxes zones
  2. On a new window, as a guest, clear all your cookies and local storage and use Apple Pay / Google Pay to pay for a virtual product
  3. Experiment with different settings for "Calculate tax based on" (Customer shipping address / Customer billing address / Shop base address)

Actual behavior

Tax calculation is inconsistent

Screenshots

image

Apple Pay modal Price changed after confirmed
image image
From checkout select billing country US See Apple Pay modal with US tax price After confirming, it changed to Brazil because of the card
image image Screenshot 2024-03-12 at 16 39 03

Expected behavior

Tax calculation should be correct

Additional context

7859784-zd-a8c

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    focus: checkout paymentspriority: highThe issue/PR is high priority—it affects lots of customers substantially, but not critically.status: blockedThe issue is blocked from progressing, waiting for another piece of work to be done.type: bugThe issue is a confirmed bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions