Who this is for. Developers and testers preparing a store for launch, and anyone changing its tax or shipping afterwards. After this page you can prove the tax and shipping on every kind of order are right before a real shopper pays.

Where to test

Make test purchases on a development environment of the site. Every completed test purchase is a real order, with a number, an invoice and transactions, so it belongs where the live store's orders and reports never see it. Set up the providers below on the development environment, and keep the live site's configuration for real customers.

An offline set-up

Three mock or template pieces let a whole purchase run with no outside service:

  1. Tax. In the Taxes settings, turn on Enabled and set the Default warehouse to a warehouse with an address. Create a MockTax provider with a Tax Rate of 10, enable it, and make it the Default provider. Every address is then taxed at 10% on every line, the shipping included, on the amount after discounts.
  2. Shipping. Create the store's shipping categories, groups and methods, with their real templates (Shipping methods and their templates). A template method needs no courier account: its rates come from its own code.
  3. Payment. Create a Mock Pay payment method with Failure Rate never (Testing with it).

Checking the numbers

Run one checkout per case. Before paying, read the checkout's figures from the shipping and selection calls (ask for taxTotal, shippingTotal and total with the properties selector, and each rate's name and total), and compare them with a calculation by hand. With the mock provider at 10%:

tax = 10% × (item amounts − discount + shipping)

For two items at 20.00, a 4.00 discount and a 10.00 rate, the tax is 10% of 46.00, so 4.60, and the total is 40.00 − 4.00 + 10.00 + 4.60 = 50.60. Cover at least these cases:

CaseWhat to check
One domestic address per weight bandEach band's rate names and totals, as the template sets them
An address in each other country servedThat country's rates
An address no method servesAn empty rate list, and the checkout page's message (When no method covers the address)
A pickupThe pickup methods' rates
A discount codeTax worked out on the discounted amount
Each currency the store sells inRates and totals in that currency

Then pay with Mock Pay and check the order: the same totals, the financial status Paid, the invoice paid, and the receipt, if the store sends one (Customer emails). Set Mock Pay's Failure Rate to always to run the decline path too.

Testing a real provider

Before launch, test the provider the store will use against its sandbox: Avalara with Sandbox on, which takes the sandbox account's own credentials, or Stripe Tax with Test Mode on. Press Test connection; it answers "Connection to the provider was successful". Then run the same cases with addresses in each place the store sells to, and compare each checkout's tax with the provider's own record of the calculation. With Submit Documents on, check that the test purchase is recorded in the sandbox account. Run this with Pricing includes tax set as it will be at launch (Prices that include tax).

Before launch

  • The live site's Default provider, and the provider of every tax zone, is the real provider, enabled, with its live credentials and Sandbox or Test Mode off, and Test connection succeeds.
  • No tax zone and no Default provider on the live site is a MockTax provider.
  • No Mock Pay method is active on any site of the account (The check before launch).
  • Every live shipping method has its real template, and any test method or test rate stays on the development environment.
  • Pricing includes tax is set as it was tested.

The test orders stay on the development environment with everything else made for testing, so the live store's reporting starts with its first real order.