> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.taxwire.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pre-orders

> Orders paid at checkout and shipped weeks or months later

A pre-order follows the [checkout flow](https://apidocs.taxwire.com/api-reference/flows/checkout.md), with a long gap between payment and shipment. The tax is charged at checkout, and the sale is recorded when it ships.

```mermaid theme={null}
sequenceDiagram
    participant B as Buyer
    participant S as Your store
    participant T as Taxwire
    Note over B,T: January 1: checkout
    S->>T: POST /calculations
    T-->>S: tax_amount
    B->>S: Pay, including that tax
    Note over S: Nothing is recorded yet
    Note over B,T: March 1: the order ships
    S->>T: POST /transactions (transaction_date: March 1, tax_amount: charged on January 1)
    T-->>S: Saved transaction
```

## 1. Quote and charge at checkout

Quote with `POST /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

Send `POST /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.

For example, a pre-order paid on January 1 and shipped on March 1 is recorded with a `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 with `transaction_date` set to the checkout time, so the rates match what the buyer paid. See [Cancellations](https://apidocs.taxwire.com/api-reference/flows/cancellations.md#cancelled-before-shipping).

## Refunded after it ships

Record a credit linked to the sale. When you quote the refund with `POST /calculations`, set `transaction_date` to the sale's date, which is the shipping date. See [Refunds](https://apidocs.taxwire.com/api-reference/flows/refunds.md#partial-refund).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.