Submit (non-custodial)

POST /api/v1/mystery/purchase/submit packs:purchase

Non-custodial purchase, step 3: after the user broadcasts the purchase tx, record its hash (+ the VRF request_id read from the receipt logs) so rip.fun can link the reveal. No ledger touch — proceeds and items belong to the user’s wallet. Settlement is driven by the on-chain event hook / poller.

Try it POST /api/v1/mystery/purchase/submit write

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

request body
object · 4 keys
{
  "wallet_address": "0x0000000000000000000000000000000000000000",
  "tier_id": 1,
  "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "request_id": "0"
}
response

Not run yet — press Run to make a live call against https://staging-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://staging-service.rip.fun/api/v1/mystery/purchase/submit' \
  -H 'X-API-Key: rip_v1_…' \
  -H 'Content-Type: application/json' \
  -d '{"wallet_address":"0x0000000000000000000000000000000000000000","tier_id":1,"transaction_hash":"0x0000000000000000000000000000000000000000000000000000000000000000","request_id":"0"}'

Request fields

FieldTypeRequiredDescription
wallet_addressstringyesWallet that signed the purchase
tier_idnumberyesTier purchased
transaction_hashstringyes0x… hash of the broadcast purchase tx
request_idstringVRF requestId decoded from the receipt (speeds up linking)