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

# Seller pricing

> Preview and manage resale pricing for your Arcade products.

Seller pricing gives your store an advisory resale price for an Arcade product. Access is available to participating API accounts. Reading and previewing use your usual bearer API key. Saving and clearing rules require a key with seller-pricing write access.

## Understand the price fields

| Field | Use |
| - | - |
| `unitPrice` | The existing product price estimate per sellable unit at the requested quantity, before volume discounts. It may include allocated shipping and duty. |
| `wholesaleUnitPrice` | When present, this is the price you pay to Arcade for the item. `0.00` means free. If omitted, use `unitPrice` as your purchase price reference. |
| `sellerPricing.wholesale` | The same published wholesale amount as `wholesaleUnitPrice`, with its own availability status. |
| `sellerPricing.floor` | The minimum resale price. Uses published wholesale when available, or `unitPrice` when no wholesale rule applies. Relative rules use this basis. |
| `sellerPricing.msrp` | Arcade's merchandise price for this saved configuration. |
| `sellerPricing.resale` | Your advisory resale price per sellable unit before shipping, duty, tax, and discounts. One unit can be a pack. |
| `startingPrice` | The existing category estimate for the lowest known delivered pack price. |

Your storefront controls the amount charged to your customer. Arcade calculates your own purchase charge through checkout, using the applicable quantity, shipping, duty, taxes, and discounts. Seller pricing rules affect the recommendation for your listings. Publishing listings, collecting payment, and creating an Arcade checkout each use their own flow.

## Choose a rule and target

A saved product uses the first configured rule in this order.

1. The rule for that product.
2. The rule for its exact category.
3. Your account default.

When all three are empty, the calculation starts with the saved product's MSRP and applies the purchase-price floor. For example, a $29 MSRP and $35 wholesale price produce a \$35 recommendation. The selected source is in `effectiveRule.source`. If the selected rule needs a price that is missing, the source stays selected and `resale.status` is `unavailable`.

| Rule | Example JSON | Result with \$20 wholesale |
| - | - | - |
| Fixed | `{"type":"fixed","price":{"amount":"32.00","currency":"USD"}}` | \$32.00 |
| Relative amount | `{"type":"wholesale_amount","delta":{"amount":"-5.00","currency":"USD"}}` | \$20.00 with a floor warning |
| Relative percent | `{"type":"wholesale_percent","percent":"25.00"}` | \$25.00 |

Use USD and decimal strings with up to two fractional digits. The fixed amount can be zero. Fixed amounts and the magnitude of dollar adjustments are limited to `9999999999.99`. Percent adjustments can range from `-100.00` to `10000.00`. Calculations outside the supported amount range report `rule_out_of_range`. Results round once to cents using half-even rounding.

The API reports `floor.status` as `below` when the calculated amount is lower than the purchase-price floor. The rule can be saved. `calculatedResale` shows the original amount, which can be negative, and `resale.price` returns the floor. Show both amounts with a warning in your editor. If the purchase price rises above a saved fixed price, the effective price rises to the new floor. The status is `at_or_above` when the calculated price meets the floor. It is `unknown` when the API cannot compare the two amounts. Every saved product needs a verified purchase-price floor to return an effective resale price, including products with a fixed rule. A published zero is a valid wholesale basis for relative rules.

Pass one target to each operation.

| Scope | Target |
| - | - |
| Account | `{"type":"account"}` |
| Category | `{"type":"category","categoryId":"6a861094-02c9-4903-8d69-c2b738f0b2bd"}` |
| Product | `{"type":"product","productId":"4d9a7c12-8e3b-4f60-b5a1-7c2e9d0f3b84"}` |

Use `categories/list` to discover categories and `products/list` or a completed create or generate job to discover saved products. Rules belong to the account that owns the calling key. Keys for the same account share the rules.

## Read, preview, save, and clear

Every request in this example is a JSON POST to `https://staging-platform.arcade.ai/v1`. The helper exposes the pricing actions by name, with the same inputs as the API reference.

```js theme={null}
const baseUrl = 'https://staging-platform.arcade.ai/v1'

async function post(path, input) {
  const response = await fetch(`${baseUrl}/${path}`, {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${process.env.ARCADE_API_KEY}`,
      'Content-Type': 'application/json',
      'User-Agent': 'your-app/1.0 (you@example.com)',
    },
    body: JSON.stringify(input),
  })
  const body = await response.json().catch(() => null)
  if (!response.ok) {
    throw Object.assign(new Error(body?.message ?? 'Arcade request failed'), {
      status: response.status,
      reason: body?.data?.reason,
    })
  }
  if (!body) throw new Error('Arcade returned an unreadable response.')
  return body
}

const pricing = {
  listRules: (input = {}) => post('pricing/listRules', input),
  previewRule: (input) => post('pricing/previewRule', input),
  setRule: (input) => post('pricing/setRule', input),
  clearRule: (input) => post('pricing/clearRule', input),
}
```

### Read the live recommendation

Set `ARCADE_PRODUCT_ID` to an ID from your saved products.

```js theme={null}
const target = { type: 'product', productId: process.env.ARCADE_PRODUCT_ID }
const product = await post('products/get', {
  productId: target.productId,
  includePriceRule: true,
})
if (!product.sellerPricing) {
  throw new Error('Seller pricing is required for this workflow.')
}
console.log(product.sellerPricing.resale)
```

For participating accounts, `products/get` and `categories/get` include `sellerPricing` automatically when the lookup succeeds. If your workflow requires the block, pass `includePriceRule: true` and check that the API returned it. A missing block means the pricing state is unknown. An explicit `resale.status: "unavailable"` means the API verified the applicable rule and gives a reason the price could not be calculated.

| Unavailable reason | Meaning |
| - | - |
| `wholesale_unavailable` | The purchase-price floor could not be verified. |
| `msrp_unavailable` | The MSRP fallback is selected and there is no MSRP for this configuration. |
| `product_required` | The selected rule needs a saved product as its basis. |
| `unsupported_currency` | Pricing for the configuration uses a currency other than USD. |
| `rule_out_of_range` | The relative calculation is outside the supported amount range. |

A product response prices its saved configuration. The purchase estimate can depend on the requested quantity. Seller rules apply to its per-unit purchase-price floor before volume discounts. `basis.quantity` echoes the requested quantity. Published wholesale is per unit at any quantity, while the `unitPrice` fallback can vary by quantity. On a category read, pass `exampleProductId` to evaluate the category using a saved product you own from that exact category. A category or account preview or write also accepts a sample. An account sample uses the account rule. A category sample uses the category rule or inherits the account rule. A product's more specific overrides can still apply on product detail. Without a sample, a fixed rule can show its configured amount with an unknown floor. Use the saved product projection for a price you can publish. Relative rules and MSRP need a saved product.

### Preview before saving

```js theme={null}
const rule = { type: 'fixed', price: { amount: '32.00', currency: 'USD' } }
const proposal = await pricing.previewRule({
  target,
  change: { operation: 'set', rule },
})
if (proposal.operation !== 'previewRule' || !proposal.current?.revision) {
  throw new Error('Arcade did not return a valid pricing preview.')
}
console.log(
  proposal.preview.resale,
  proposal.preview.floor,
  proposal.preview.calculatedResale,
)
```

Show the hypothetical `preview` separately from the saved `current` entry. `change: { operation: "clear" }` shows what the target would inherit after clearing. Closing a preview leaves rules intact.

### Save the confirmed rule

```js theme={null}
const saved = await pricing.setRule({
  target,
  expectedRevision: proposal.current.revision,
  rule,
})
if (
  saved.operation !== 'setRule' ||
  !['applied', 'unchanged'].includes(saved.status) ||
  !saved.entry?.revision ||
  saved.entry.target?.productId !== target.productId ||
  saved.entry.configuredRule?.type !== 'fixed' ||
  saved.entry.configuredRule.price?.amount !== rule.price.amount ||
  saved.entry.configuredRule.price.currency !== rule.price.currency
) {
  throw new Error(
    'Write could not be confirmed. Look up the rule before retrying.',
  )
}
```

The receipt confirms the committed rule and revision. A save at the current revision returns `unchanged` if the rule is already identical. A receipt can also include a `sellerPricing` projection. `pricingStatus: "unavailable"` indicates that the projection could not be completed after the write was validated. `"no_context"` means the action did not have a pricing projection. An evaluated projection can itself report an unavailable resale.

### Clear the override and resume inheritance

```js theme={null}
const cleared = await pricing.clearRule({
  target,
  expectedRevision: saved.entry.revision,
})
if (
  cleared.operation !== 'clearRule' ||
  !['applied', 'unchanged'].includes(cleared.status) ||
  !cleared.entry?.revision ||
  cleared.entry.configuredRule !== null
) {
  throw new Error(
    'Clear could not be confirmed. Look up the rule before retrying.',
  )
}
```

Use the returned revision for subsequent edits. A parent rule or a change to wholesale can alter the recommendation while the direct revision stays the same, so refresh the product before using its resale price in your storefront.

## Inventory and write recovery

Send `{}` to `pricing/listRules` for the first page of configured rules. Pass `nextCursor` as `cursor` on the next request until it is null. To look up one entry, send `{ target }` or `{ ruleId }`. A target lookup includes its revision and rule ID even if no direct rule is saved. Record both before writing.

```js theme={null}
const { entries } = await pricing.listRules({ target })
console.log(entries[0].configuredRule, entries[0].revision)
```

If a target becomes unavailable, the saved rule remains visible in inventory as `targetStatus: "inactive"`. Its receipt carries the rule and revision. You can clear it with `{ ruleId, expectedRevision }`. A `409` with `data.reason: "target_active"` means the target became accessible again. Look up the active target before deciding whether to clear it.

Seller pricing writes use revision checks. On a `412`, a timeout, a lost response, a server error, or an invalid receipt, use `pricing/listRules` to read the current saved rule and revision before deciding whether to write again. A readback describes the current state. It cannot say which request caused a change. A `428` means the write needs `expectedRevision`. A `422` means the input or rule needs correction. A `403` means the API key lacks the required access.

The API reference includes the [OpenAPI document](https://staging-docs.arcade.ai/openapi.json) for generating client types.


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