/api/v1/instant/purchase/prepare packs:purchase Purchase step 1. Returns the USDC-approve and buy-and-open transactions for the END USER to send from their own wallet. CardOS never touches their funds, and the cards deliver straight to that wallet once the VRF settles. Creates nothing.
POST /api/v1/instant/purchase/prepare write These inputs are shared across all docs pages, so an id entered here carries over.
{
"wallet_address": "0x0000000000000000000000000000000000000000",
"packet_type_id": 14
}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/prepare' \
-H 'X-API-Key: rip_…' \
-H 'Content-Type: application/json' \
-d '{"wallet_address":"0x0000000000000000000000000000000000000000","packet_type_id":14}' | Field | Type | Required | Description |
|---|---|---|---|
wallet_address | string | yes | End-user wallet that will sign + pay |
packet_type_id | number | yes | Packet type to buy, from GET /instant/catalog |
max_price_usdc | string | — | Price cap; defaults to the current pack price |
data)| Field | Description |
|---|---|
chain_id / payment_token / contract | Chain + USDC + store contract addresses |
packet_type_id | Echoed packet type the calls purchase |
price / price_usdc | Approval amount (USDC micros string + decimal display) |
calls[] | {to, data, description}: approve USDC, then the buy-and-open (purchaseInstantOpenFor) call |
| Status | Code | When |
|---|---|---|
| 400 | invalid_packet_type | packet_type_id is not a purchasable instant pack |
| 400 | invalid_wallet_address | wallet_address is not a valid 0x-prefixed EVM address |
| 409 | sold_out | no card bundles available for that packet type right now |
| 409 | max_price_exceeded | the current pack price exceeds your max_price_usdc |
| 503 | instant_disabled | instant pack purchasing temporarily disabled |
See Errors for the response envelope and the full code list.