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

# 注文エンドポイント

> チェックアウトセッションの作成と注文管理

注文フローはセッションベースのチェックアウトパターンに従います：

1. **Create a checkout session** -- locks the product version, pricing, and currency
2. **Preview tax** -- calculates tax based on the customer's billing details
3. **Create an order** -- initiates payment and returns a PSP-hosted checkout URL
4. **Cancel an order** -- cancels a pending (unpaid) order before payment completes

## 単発注文ステータス値

| ステータス       | 説明                      |
| ----------- | ----------------------- |
| `pending`   | 注文作成済み、支払い待ち。キャンセル可能。   |
| `completed` | 支払い成功、注文履行済み。           |
| `canceled`  | 支払い完了前にキャンセルされた注文。最終状態。 |

## エンドポイント

<CardGroup cols={2}>
  <Card title="チェックアウトセッションの作成" icon="cart-plus" href="/ja/api-reference/endpoints/orders/create-checkout-session">
    チェックアウト用に商品バージョンと価格を固定
  </Card>

  <Card title="税金プレビュー" icon="calculator" href="/ja/api-reference/endpoints/orders/preview-tax">
    注文作成前に税金を計算
  </Card>

  <Card title="単発注文のキャンセル" icon="ban" href="/ja/api-reference/endpoints/orders/cancel-onetime-order">
    支払い前に保留中の注文をキャンセル
  </Card>
</CardGroup>
