/api/v1/mystery/purchase/submit packs:purchaseNon-custodial purchase, step 3. After the user sends the purchase transaction, record its hash (plus the request_id from the receipt, if you have it) so rip.fun can link the reveal to it. The items land in the user’s own wallet.
POST /api/v1/mystery/purchase/submit write These inputs are shared across all docs pages — an id entered here carries over.
{
"wallet_address": "0x0000000000000000000000000000000000000000",
"tier_id": 1,
"transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"request_id": "0"
}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/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"}' | Field | Type | Required | Description |
|---|---|---|---|
wallet_address | string | yes | Wallet that signed the purchase |
tier_id | number | yes | Tier purchased |
transaction_hash | string | yes | 0x… hash of the broadcast purchase tx |
request_id | string | — | request id from the receipt logs (speeds up linking) |