Sell-back quote

POST /api/v1/mystery/sellback/quote packs:read

Per-card eligibility and payout for the NATIVE sell-back — the same loop a first-party rip.fun user runs, and the only sell-back path if you sell CardOS tiers. The pack price already funded the on-chain buyback float, so the payout comes from that float, the card restocks the pool it came from, and nothing is fronted or owed: a sell-back reduces your net revenue rather than creating a debt. Two rules the contract enforces and this endpoint pre-flights: only the ORIGINAL recipient may sell (a card that changed hands never can), and only before its buyback window expires. A batch is capped at 50 cards and is all-or-nothing on-chain, so check every token here before preparing.

Try it POST /api/v1/mystery/sellback/quote

These inputs are shared across all docs pages, so an id entered here carries over.

request body
object · 2 keys
{
  "wallet_address": "0x0000000000000000000000000000000000000000",
  "token_ids": []
}
response
403 26ms preloaded server-side with the default context
object · 3 keys
{
  "success": false,
  "message": "Mystery partner API key required",
  "error": "This endpoint requires an API key linked to a mystery partner account"
}
tracks the inputs above
curl -X POST 'https://service.rip.fun/api/v1/mystery/sellback/quote' \
  -H 'X-API-Key: rip_…' \
  -H 'Content-Type: application/json' \
  -d '{"wallet_address":"0x0000000000000000000000000000000000000000","token_ids":[]}'

Request fields

FieldTypeRequiredDescription
wallet_addressstringyesThe holder — must be the wallet that received the cards
token_idsstring[]yesCard token ids to quote (max 50)

Response fields (data)

FieldDescription
items[].eligible / reasonPer card. reason: no_window (never pool-distributed, or already sold), wrong_holder, window_expired, value_unknown
items[].expires_atWhen this card’s buyback window closes — after it, sell-back is impossible
items[].payout_usdcWhat the pool pays: oracle group price × the pool’s discount permille
items[].from_raw_card_packWhether the card came from a pack whose contents included a raw card (the revenue-share qualifying subset)
approval_neededWhether the holder still owes the one-time setApprovalForAll (prepare includes it as a call)
sufficient_liquidityWhether the pool currently holds enough USDC — the contract checks this too, so a false here is a revert you can avoid

Errors

StatusCodeWhen
403not_tier_partneryour account sells your own inventory, so the pool sell-back does not apply
400invalid_token_idstoken_ids is empty or not numeric token ids
400too_many_tokensmore than 50 cards in one batch

See Errors for the response envelope and the full code list.