Web payments + tax

I am creating an online mobile game.
In this game items are purchased.
The purchases must have sales tax applied to them.
I am using your web payments nodejs examples as a starting point.

In theory, square should know enough information about the customer to apply the correct sales tax. But I can’t find out how to prompt square to do this, or even how to query the user’s location.

I can’t find an example that does this. Is there one?

How do I do this?

Square does not automatically calculate and apply sales tax for you. Instead, you will need to set up the appropriate tax rates within your Square account and then apply them to the items being purchased in your game.

To set up tax rates in Square, you can follow either of these flows:

  1. Create Catalog tax objects with our Catalog API.

Or:

  1. Log in to your Square Dashboard and navigate to the “Items” section.
  2. Click on “Taxes” and then “Create Tax.”
  3. Enter the tax rate information, including the name, rate, and the locations where it applies.
  4. Save the tax rate.

Once you have set up the tax rates, you can use the Square API to apply the tax to the items being purchased in your game. You can do this by including the tax_ids field in the CreateOrder request when creating an order. Or you can setup auto applied taxes you set in the Catalog will have pricing rules and are automatically applied to order items. :slightly_smiling_face:

Thank you for this response.

I just want to verify.

Auto taxes are only available on “orders” - not web-payments.

So, instead of the flow: “single page has checkout, user does card-stuff, clicks buy, I get resulting order information.”

I’ll have a:
User says they want X.
Backend creates the order for X with auto taxes, I present the order in my own page, and then there is probably something similar to webpayments for card/googlepay/applepay - Square tells me the order was paid for in JS, which I pass on to the backend.

Is this correct?

Both square and stripe are sort of failing with taxes. In a weird 1990’s sort of way.
As a developer of my own small start up in 2024 I want this:

I label each item with a tax attribute: “digital goods”, “clothing.”
Square does everything else.
It knows the buyer’s location. It knows the type of goods. It knows my type of business.

We’re really just querying a lookup table.

It would be even better if there was a way to automatically enroll with states to collect sales tax. I mean, why do I need to this?

This isn’t exactly the flow. The order will be created first and then paid for. Plus you can do what you want with our APIs. If you setup the tax percentage and rules we will auto apply taxes to order. Here’s the link on Square applied taxes. :slightly_smiling_face: