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

# Sell back an item

> Sells an item back to the pack for its buyback_price.

Sells an item back to the pack it was pulled from for its `buyback_price`. Sellback is an instant server-side transaction. No on-chain signing is required from the end user.

## Request body

<ParamField body="item_id" type="string" required>
  The item's `id` from the purchase response (`nfts[].id`) or [`/api/v1/inventory/:user_id`](/api-reference/inventory) (`items[].id`).
</ParamField>

## Example request

```http theme={"dark"}
POST /api/v1/vm/buyback
X-API-Key: <your_api_key>
Content-Type: application/json

{
  "item_id": "9XnY...mint_address"
}
```

## Response

<ResponseExample>
  ```json 200 theme={"dark"}
  {
    "success": true,
    "amount": 98.5
  }
  ```
</ResponseExample>

## Errors

| Status | Body                                                                        | Meaning                                                                                                                                                               |
| ------ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `400`  | `{ "error": "Item not found" }`                                             | Returned for missing `item_id`, unknown `item_id`, items already sold back, items locked into an active shipping order, or items that don't belong to a tracked user. |
| `400`  | `{ "error": "Item has expired" }`                                           | Sellback window has closed. In [sandbox](/enterprise-api/sandbox), items expire 7 days after purchase.                                                                |
| `400`  | `{ "error": "Transaction failed" }`                                         | Sellback transaction failed (production-only).                                                                                                                        |
| `400`  | `{ "error": "Item already has an active buyback session" }`                 | A sellback is already in progress (production-only).                                                                                                                  |
| `429`  | `{ "error": "A buyback request for this item is already being processed" }` | Concurrent request, retry after a moment (production-only).                                                                                                           |
| `500`  | `{ "error": "An unexpected error occurred" }`                               | Internal server error                                                                                                                                                 |

<Note>
  [Sandbox](/enterprise-api/sandbox) does not emit `429`, the in-progress envelope, or `Transaction failed`. Sandbox sellbacks are atomic with no concurrency control. Production may emit any of the rows above.
</Note>

## Pricing

**Production:** `fmv × buyback_percent` re-fetched from the live oracle at sellback time, with a voucher path of `max(mint_price, fmv × buyback_percent)`.

**[Sandbox](/enterprise-api/sandbox):** the `amount` returned equals the `buyback_price` that was assigned at `buy/init` time. Prices are frozen, not live, and there is no voucher logic. Sellback is always immediate and never settles real funds.

<Note>
  Sellback has a time window. Items can only be sold back within a limited period after being pulled. Check `buyback_expires_at` on inventory items.
</Note>

## Phygitals funds the buyback

The 85% buyback is underwritten by Phygitals, not the partner. When this endpoint returns `success: true`, the liquidity comes from us. Partners don't post capital, don't run a secondary market, and don't carry sellback risk. You route the call, we pay the user.

Pricing comes from our pricing oracle (powered by [Alt](https://www.alt.xyz/)), which provides the live FMV feed used to compute `buyback_price` on every inventory item.

See [platform overview → Phygitals funds the buybacks](/platform-overview#phygitals-funds-the-buybacks).
