Submit purchase

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

Purchase step 2. After the user sends the purchase transaction, record its hash (plus the request_id from the receipt, if you have it) so CardOS can link the reveal to it. The items land in the user’s own wallet. The 202 body is the same serialized purchase GET /purchase/:id returns — including items[] when the reveal has already settled (idempotent re-submit, or the indexer beat you to it) — so check data.status before scheduling the first poll.

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

These inputs are shared across all docs pages, so 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://service.rip.fun (through this demo's server-side proxy; the API key never reaches the browser).

tracks the inputs above
curl -X POST 'https://service.rip.fun/api/v1/mystery/purchase/submit' \
  -H 'X-API-Key: rip_…' \
  -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_idstringrequest id from the receipt logs (speeds up linking)