I would prefer that merchants estimate the tax and indicate that to the user by placing a `pending: true` on the tax in `displayItems`. The merchant is also able to confirm the updated price after they receive the `PaymentResponse`.
If we must calculate the tax precisely during the PaymentRequest flow, Chrome needs to provide billing address to the website before the user clicks "Pay" in browser UI. Is the country enough for tax purposes? A user agent generally should require a user action for this to happen in a privacy-preserving manner. Therefore, we need:
1. New option `"requestBillingAddress"` (or `"requestBillingCountry"`). This is similar to existing option `"requestShipping"`.
1. New user interface in implementing user agents to prompt the user to send their billing address or country to the website.
1. A new event on `PaymentRequest` object: `"billingAddressChange"` or `"billingAddressChange"`, for example. This would work similarly to `"shippingAddressChange"`.
This is a fairly involved addition to the API. Therefore, I prefer the estimation workaround. How strong is the preference for this?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/browser-payment-api/pull/409#issuecomment-275504015