/api/v1/mystery/buyback/:token/accept packs:buybackStep 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).
POST /api/v1/mystery/buyback//accept 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//accept' \
-H 'X-API-Key: rip_…' \
-H 'Content-Type: application/json' \
-d '{}' | Field | Type | Required | Description |
|---|---|---|---|
receiver_signature | string | yes | The signature from …/accept/prepare |
item_type | string | — | "CARD" or "GRADED_CARD" — only needed if the id exists as both a raw and a graded card |
data)| Field | Description |
|---|---|
transaction_hash | The on-chain acceptance |
token_id / offer_id | The token and offer that were accepted |
price_usdc / seller_receives_usdc | Offer price and what the holder received after the fee |
status | "submitted" — the card transfer and webhooks follow |
| Status | Code | When |
|---|---|---|
| 400 | invalid_receiver_signature | signature missing or malformed |
| 404 | no_active_offer | this token has no active offer |
| 409 | nft_approval_missing | the holder hasn’t approved the marketplace — details.nft_approval.call is the exact transaction to have them send, then retry with the same signature |
| 409 | card_frozen | a 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 |
| 409 | nft_not_whitelisted | the marketplace doesn’t trade that NFT contract in this environment (offer creation refuses these too) |
| 409 | stale_offer_fee | the 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) |
| 409 | no_holder | the token has no current on-chain holder (burned) — a token that merely moved is NOT an error; the accept follows the live holder |
| 409 | receiver_signature_mismatch | the signature doesn’t verify against the holder — re-fetch …/accept/prepare and sign that exact payload |
| 409 | accept_simulation_failed | anything else the chain rejected (decoded reason in the message) |
| 503 | insufficient_signer_funds | temporary — retry shortly |
| 503 | relayer_disabled | accept is not available in this environment |
See Errors for the response envelope and the full code list.