# Checkout

Set the merchandise subtotal and item ranges customers can take through checkout in each market.

Use Checkout settings to decide the smallest and largest merchandise subtotal, and the fewest and most items, a market accepts. The subtotal comparison uses merchandise after product and order discounts; the item limits count the total quantity of the order's items. Shipping, tax, duties, cash-on-delivery charges, checkout fees, payment discounts, store credit, and other payment methods are excluded. Both the minimum and maximum are inclusive. Read requests require `read_markets`; changes require `write_markets`.

## Endpoints

## Get checkout limits

`GET /api/2025-01/markets/{marketId}/checkout-settings/limits`

Use `money_max` when validating minimum and maximum merchandise subtotals. Amounts must be positive and exactly representable in the currency: for example, KRW allows no fractional digits, USD and IDR allow two, and KWD allows three. Trailing zeros are accepted. Display precision can differ from accepted amount precision. The response includes Checkout Fee limits because both settings areas share the Checkout tab.

Scope: `read_markets`

Response:

```json
{
  "success": true,
  "data": {
    "money_max": "9999999999999999.9999",
    "fee_name_max_length": 100,
    "fee_description_max_length": 500,
    "tax_code_max_length": 20,
    "max_fees_per_market": 5,
    "list_page_size": 10,
    "list_max_limit": 50,
    "search_max_length": 100
  }
}
```

## Get checkout settings

`GET /api/2025-01/markets/{marketId}/checkout-settings`

The enabled value limits are compared with merchandise after product and order discounts. Shipping, tax, duties, cash-on-delivery charges, checkout fees, online-payment discounts, store credit, and other payment methods do not change this comparison. The enabled quantity limits are compared with the order's total merchandise quantity. Minimum and maximum boundaries are inclusive.

Scope: `read_markets`

Response:

```json
{
  "success": true,
  "data": {
    "checkout_settings": {
      "id": "8d4f1b2c-6a7e-4890-9c3d-5e6f708192a3",
      "market_id": "9a1f2c3d-4e5f-6789-abcd-ef0123456789",
      "min_order_enabled": true,
      "min_order_amounts": {"EUR": "50.00", "CHF": "45.00"},
      "max_order_enabled": true,
      "max_order_amounts": {"EUR": "1000.00", "CHF": "950.00"},
      "min_quantity_enabled": true,
      "min_quantity": 2,
      "max_quantity_enabled": true,
      "max_quantity": 50,
      "created_at": "2026-07-01T10:15:00+02:00",
      "updated_at": "2026-07-21T16:30:00+02:00"
    }
  }
}
```

## Update checkout settings

`PUT /api/2025-01/markets/{marketId}/checkout-settings`

Send every toggle with its complete currency map or quantity. An enabled value limit requires a positive amount for every currency assigned to the market; an enabled quantity limit requires a whole number of at least 1. Disabled limits ignore and clear their amounts and quantities. When both value limits are enabled, the maximum must be greater than the minimum in every currency; when both quantity limits are enabled, the maximum must be at least the minimum. An unchanged request leaves timestamps untouched and publishes no event; a successful change publishes `checkout_settings/update`.

Scope: `write_markets`

Response:

```json
{
  "success": true,
  "data": {
    "checkout_settings": {
      "id": "8d4f1b2c-6a7e-4890-9c3d-5e6f708192a3",
      "market_id": "9a1f2c3d-4e5f-6789-abcd-ef0123456789",
      "min_order_enabled": true,
      "min_order_amounts": {"EUR": "50.00", "CHF": "45.00"},
      "max_order_enabled": true,
      "max_order_amounts": {"EUR": "1000.00", "CHF": "950.00"},
      "min_quantity_enabled": true,
      "min_quantity": 2,
      "max_quantity_enabled": true,
      "max_quantity": 50,
      "created_at": "2026-07-01T10:15:00+02:00",
      "updated_at": "2026-07-21T16:30:00+02:00"
    }
  },
  "code": "CHECKOUT_SETTINGS_UPDATED",
  "message": "Checkout settings updated."
}
```

## Webhook events

Subscribe to `checkout_settings/update` when your app keeps a local copy of a market's checkout limits. The event contains the complete saved settings and currency amounts. Requests that make no effective change do not publish an event.

## Checkout limits updated

Event: `checkout_settings/update` · App scope: `read_markets` · Staff permission: `markets:write`

Subscribe to receive the current minimum and maximum merchandise subtotal rules after checkout limits change for a market. Money maps contain exact decimal strings keyed by currency code, using currency amount precision (for example KWD 1.234, KRW 1234, USD 12.34). They never use General display separators or symbols.

```json
{
  "checkout_settings": {
    "created_at": "2026-07-01T10:15:00-04:00",
    "id": "8d4f1b2c-6a7e-4890-9c3d-5e6f708192a3",
    "market_id": "9a1f2c3d-4e5f-6789-abcd-ef0123456789",
    "max_order_amounts": {
      "CHF": "950.00",
      "EUR": "1000.00"
    },
    "max_order_enabled": true,
    "max_quantity": 50,
    "max_quantity_enabled": true,
    "min_order_amounts": {
      "CHF": "45.00",
      "EUR": "50.00"
    },
    "min_order_enabled": true,
    "min_quantity": 2,
    "min_quantity_enabled": true,
    "updated_at": "2026-07-21T14:30:00-04:00"
  }
}
```

