1. Quote and charge at checkout
Quote withPOST /calculations as for any order, and charge the buyer the returned tax_amount. Keep the lines, discounts and tax you charged with the order.
Nothing is recorded at payment. The sale is recorded once it ships, with the actual shipping date.
2. Record the sale when it ships
SendPOST /transactions with status: finalized, and:
transaction_date: when the order shipped.tax_amount: the tax you charged at checkout. Don’t quote again at shipping.
transaction_date of March 1 and the tax charged on January 1.
If a rate changes between checkout and shipping, the tax due at the shipping date can differ from what you collected. The response shows both: tax_amount is what you sent, and tax_calculation.tax_amount is the tax at the shipping date’s rates. The buyer isn’t charged again or refunded for the difference.
Cancelled before it ships
Nothing was recorded. To find the tax to refund, quote the cancelled lines withtransaction_date set to the checkout time, so the rates match what the buyer paid. See Cancellations.
Refunded after it ships
Record a credit linked to the sale. When you quote the refund withPOST /calculations, set transaction_date to the sale’s date, which is the shipping date. See Refunds.