/api/v1/mystery/buyback/:token/accept/prepare packs:readStep 1 of accepting a buyback offer. Returns the EIP-712 data the current holder signs with eth_signTypedData_v4 — a signature, not a transaction — plus nft_approval, which tells you whether the holder must first send a one-time approval transaction. If nft_approval.approved is false, have the holder send nft_approval.call from their wallet (it approves the rip.fun marketplace to transfer the NFT — the one step that can’t be done by signature, and never needs repeating for that contract). Then pass the signature to POST …/accept. The :token segment is the on-chain token id that has an active offer; add item_type if the same id exists as both a raw and a graded card. Nothing is created or sent on-chain by this endpoint itself.
POST /api/v1/mystery/buyback//accept/prepare write 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/prepare' \
-H 'X-API-Key: rip_…' \
-H 'Content-Type: application/json' \
-d '{}' | Field | Type | Required | Description |
|---|---|---|---|
item_type | string | — | "CARD" or "GRADED_CARD" — only needed if the id exists as both a raw and a graded card |
data)| Field | Description |
|---|---|
typed_data | The EIP-712 payload to pass to eth_signTypedData_v4 |
receiver | The LIVE on-chain owner — the wallet that must approve + sign, even if the token moved after the offer was created |
nft_approval.approved | Whether the marketplace can already transfer the NFT — must be true before …/accept can succeed |
nft_approval.call | Ready-to-send { to, data, value } for the one-time setApprovalForAll — pass it to the holder’s wallet (eth_sendTransaction) when approved is false |
transfer_frozen | frozen: true means a pending burn (physical redemption or grading) blocks ALL transfers — accept cannot succeed. cancel_call is the owner-only cancelBurn tx, but cancelling abandons that redemption/grading |
self_submit.call | Alternative to signing + POST …/accept: complete acceptOffer calldata the HOLDER’s wallet submits directly (works only with the holder as sender — same path the rip.fun app uses). Batch with nft_approval.call via EIP-5792 wallet_sendCalls for one atomic confirmation; gas is on the submitter on this path |
offer_id / deadline | The offer and when it expires |
price_usdc / seller_receives_usdc | Offer price and what the holder nets after the marketplace fee |
| Status | Code | When |
|---|---|---|
| 404 | no_active_offer | this token has no active offer |
| 409 | ambiguous_token | id is both a raw and a graded card — pass item_type |
See Errors for the response envelope and the full code list.