/api/v1/instant/purchase/submit packs:purchase Purchase step 2. After the user sends the buy-and-open transaction, record its hash so CardOS can correlate the on-chain events and track the delivery. The transaction is verified on-chain before anything is written — the packet type, price, request id and recipient are read from the receipt, never from the request — and re-submitting the same hash is idempotent. The cards land in the user’s own wallet; poll GET /instant/purchase/:purchase_id or consume the instant_purchase.* webhooks.
POST /api/v1/instant/purchase/submit write These inputs are shared across all docs pages, so an id entered here carries over.
{
"wallet_address": "0x0000000000000000000000000000000000000000",
"packet_type_id": 14,
"transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}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/instant/purchase/submit' \
-H 'X-API-Key: rip_…' \
-H 'Content-Type: application/json' \
-d '{"wallet_address":"0x0000000000000000000000000000000000000000","packet_type_id":14,"transaction_hash":"0x0000000000000000000000000000000000000000000000000000000000000000"}' | Field | Type | Required | Description |
|---|---|---|---|
packet_type_id | number | yes | Packet type purchased |
transaction_hash | string | yes | 0x… hash of the broadcast buy-and-open tx (must be mined) |
external_user_id / wallet_address | string | — | End-user identity to attribute the purchase to |
data)| Field | Description |
|---|---|
id / status | Purchase id; status SUBMITTED |
packet_type_id / set_id / product_id | What was bought |
price / price_usdc | Pack price (micros + decimal) |
transaction_hash | The recorded on-chain purchase |
| Status | Code | When |
|---|---|---|
| 400 | missing_tx_hash | transaction_hash omitted |
| 400 | invalid_packet_type | packet_type_id is not a known instant pack |
| 400 | tx_unverified | the tx isn’t mined yet or isn’t a RipFunStore instant-pack purchase |
| 400 | tx_reverted | the purchase transaction reverted on-chain |
| 400 | packet_type_mismatch | the tx bought a different packet type than submitted |
| 400 | purchaser_mismatch | the declared wallet isn’t the on-chain recipient |
| 409 | tx_already_recorded | the tx already belongs to another purchase |
See Errors for the response envelope and the full code list.