/api/v1/mystery/buyback/:purchase_id packs:buybackMakes a buyback offer on a card at 85% of its value (override with offer_price_usdc). The current holder accepts it and receives the payout minus the marketplace fee — either from their own wallet, or gaslessly via the accept endpoints below. The path accepts a purchase id OR an on-chain token id (works for cards you distributed yourself, raw or graded; those return value_usdc / value_source). Fill in either input below; purchase ids take precedence.
POST /api/v1/mystery/buyback/ money These inputs are shared across all docs pages — an id entered here carries over.
{}Not run yet — press Run to make a live call against https://service.rip.fun (through this demo's server-side proxy; the API key never reaches the browser).
curl -X POST 'https://service.rip.fun/api/v1/mystery/buyback/' \
-H 'X-API-Key: rip_…' \
-H 'Content-Type: application/json' \
-d '{}' | Field | Type | Required | Description |
|---|---|---|---|
token_id | string | — | Purchase path: required when the purchase revealed multiple items (ignored on the token-id path — the path segment IS the token) |
item_type | string | — | Token-id path only: "CARD" or "GRADED_CARD" — disambiguates a numeric id shared by a raw and a graded card |
offer_price_usdc | string | — | Overrides the default 85%-of-value price (can never exceed the value) |
data)| Field | Description |
|---|---|
offer_signature / offer_id | The signed marketplace offer |
price / price_usdc | Gross offer price |
seller_receives_usdc / marketplace_fee_usdc | Net to the holder vs rip.fun fee |
requester / target / deadline | rip.fun signer, current holder, offer expiry |
value_usdc / value_source | Token-id path only: what was priced and from which source (card_raw_price / buyback_oracle / graded_market_price) |
| Status | Code | When |
|---|---|---|
| 409 | value_unknown | no market price available for the card |
| 409 | not_fulfilled | purchase path: purchase has not revealed yet |
| 404 | token_not_found | token-id path: neither a purchase of yours nor a known token |
| 409 | offer_exists | this token already has an active offer |
| 409 | ambiguous_token | token-id path: id is both a raw and a graded card — pass item_type |
| 409 | nft_not_whitelisted | the marketplace doesn’t trade that NFT contract in this environment yet — the offer is refused up front rather than signed un-acceptably |
See Errors for the response envelope and the full code list.