Skip to main content
When a store turns on automatic tax, the platform calculates tax for each order’s shipping destination — rates differ by country, state, county, and city, and they change — and records a full per-jurisdiction breakdown on the order. A storefront’s part is to show the shopper the right total before they pay, which takes a single preview call.

How tax works

  • A store either has automatic tax turned on (calculated for the destination) or uses a single manual rate it configures. Either way, the order endpoint is the authority on the tax amount — it recalculates tax server-side and rejects an order whose total doesn’t match, so a tampered total can’t slip through.
  • Because the order’s total must already include tax, your storefront previews the tax first (client.tax.previewTax), shows the shopper the final total, and submits that same total to createOrder.
  • Every order response carries the resolved tax inline — tax_amount, a per-jurisdiction tax_breakdown, and a tax_source telling you how it was produced. There’s no separate “get the tax for this order” call.

Preview tax before checkout

Call previewTax with the shipping destination and the cart lines. It returns the tax without creating an order (it’s only an estimate, never recorded), so you can render the final total live as the shopper edits their cart or address. Publishable keys are accepted, so you can call it straight from the browser.
Response
Pass each line’s category_name so the right tax code is applied — some categories (food, clothing, books, digital goods) are taxed differently from general merchandise. Without it, the line is taxed as standard tangible goods.

Place the order with the previewed total

Compute the order total from the preview, then submit that exact total. The order endpoint recomputes the tax and confirms the total matches.
If you send your own tax_amount (because you calculate tax elsewhere), it is honored as-is and tax_source is omitted — the server still verifies the total adds up.

When automatic tax isn’t configured

previewTax returns { "tax_source": "fallback" } (no breakdown). Apply the store’s own configured rate to compute the total — the order endpoint uses that same rate, so the totals agree. The same fallback covers a momentary outage: if automatic tax is unavailable while an order is being placed, the order is calculated with the store’s rate and marked tax_source: "fallback" rather than failing, so a sale is never blocked.

Returns

When a returned order is refunded, Galactic Core automatically reverses the tax that was recorded for it, for the same jurisdictions — you don’t issue a separate tax adjustment. Returns themselves are lodged through the Returns API.

Marketplace

On a marketplace deployment each merchant is the seller of record for their own items, so tax is calculated per merchant against that merchant’s own tax setup. Preview still works the same way from the storefront; the unified checkout records each merchant’s tax on their portion of the split order.