Prepare accept

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

Step 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.

Try it POST /api/v1/mystery/buyback//accept/prepare write

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/prepare' \
  -H 'X-API-Key: rip_…' \
  -H 'Content-Type: application/json' \
  -d '{}'

Request fields

FieldTypeRequiredDescription
item_typestring"CARD" or "GRADED_CARD" — only needed if the id exists as both a raw and a graded card

Response fields (data)

FieldDescription
typed_dataThe EIP-712 payload to pass to eth_signTypedData_v4
receiverThe LIVE on-chain owner — the wallet that must approve + sign, even if the token moved after the offer was created
nft_approval.approvedWhether the marketplace can already transfer the NFT — must be true before …/accept can succeed
nft_approval.callReady-to-send { to, data, value } for the one-time setApprovalForAll — pass it to the holder’s wallet (eth_sendTransaction) when approved is false
transfer_frozenfrozen: 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.callAlternative 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 / deadlineThe offer and when it expires
price_usdc / seller_receives_usdcOffer price and what the holder nets after the marketplace fee

Errors

StatusCodeWhen
404no_active_offerthis token has no active offer
409ambiguous_tokenid is both a raw and a graded card — pass item_type

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