Accept buyback offer

POST /api/v1/mystery/buyback/:token/accept packs:buyback

Step 2. Send the signature the holder produced in …/accept/prepare and rip.fun submits the acceptance on-chain and covers the gas — the holder signs once and pays nothing for the accept itself. Prerequisite: the marketplace must be approved to transfer the NFT (nft_approval in …/accept/prepare; a one-time setApprovalForAll from the holder’s wallet). The card transfers to your pool wallet and the holder receives USDC, minus the marketplace fee. You get a buyback.confirmed webhook, then buyback.card_transferred once the card lands. Every failure is pre-flighted into a specific error code below (machine-readable context rides in the response’s details field) — an already-collected signature stays valid across retries. To try the full flow in a browser, use the storefront demo (the holder signs there).

Try it POST /api/v1/mystery/buyback//accept money

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

request body
object · 0 keys
{}
response

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 (tracks the inputs above)
curl -X POST 'https://service.rip.fun/api/v1/mystery/buyback//accept' \
  -H 'X-API-Key: rip_…' \
  -H 'Content-Type: application/json' \
  -d '{}'

Request fields

FieldTypeRequiredDescription
receiver_signaturestringyesThe signature from …/accept/prepare
item_typestring"CARD" or "GRADED_CARD" — only needed if the id exists as both a raw and a graded card

Response fields (data)

FieldDescription
transaction_hashThe on-chain acceptance
token_id / offer_idThe token and offer that were accepted
price_usdc / seller_receives_usdcOffer price and what the holder received after the fee
status"submitted" — the card transfer and webhooks follow

Errors

StatusCodeWhen
400invalid_receiver_signaturesignature missing or malformed
404no_active_offerthis token has no active offer
409nft_approval_missingthe holder hasn’t approved the marketplace — details.nft_approval.call is the exact transaction to have them send, then retry with the same signature
409card_frozena pending burn (physical redemption or grading — details.burn_type) blocks all transfers; details.cancel_call is the owner-only cancelBurn tx, but only send it if the holder wants to abandon that redemption/grading
409nft_not_whitelistedthe marketplace doesn’t trade that NFT contract in this environment (offer creation refuses these too)
409stale_offer_feethe offer was signed assuming a lower marketplace fee than the contract now charges — the seller can never net the signed minimum; recreate the offer (re-POST /buyback for the token)
409no_holderthe token has no current on-chain holder (burned) — a token that merely moved is NOT an error; the accept follows the live holder
409receiver_signature_mismatchthe signature doesn’t verify against the holder — re-fetch …/accept/prepare and sign that exact payload
409accept_simulation_failedanything else the chain rejected (decoded reason in the message)
503insufficient_signer_fundstemporary — retry shortly
503relayer_disabledaccept is not available in this environment

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

Flow

  1. Holder: fetch the payload from POST /buyback/:token/accept/prepare and sign it
  2. Holder (first time only): if nft_approval.approved is false, send nft_approval.call — the one-time marketplace approval
  3. You: POST /buyback/:token/accept with the signature
  4. rip.fun: submits on-chain and covers gas — the card moves to your pool wallet, the holder receives USDC
  5. Webhooks: buyback.confirmed → buyback.card_transferred