Instant Pack API

Sell real booster packs that buy and open in a single on-chain transaction. There's no pack NFT to hold and open later: the purchase itself draws a pre-built card bundle — assembled from a physically ripped pack — and the cards land in the recipient wallet seconds later. A sibling of the Gacha API: same partner keys, its own catalog and purchase surface.

Three calls to a working pack shop

Prepare the transactions, the end-user sends them from their own wallet, and the cards arrive moments later. CardOS never holds their funds.

// 1. Show the packs you're selling
const { data } = await cardos.instant.catalog.list();

// 2. Hand the buy-and-open transactions to the user's wallet
const { data: prep } = await cardos.instant.purchase.prepare({
  wallet_address: userWallet,
  packet_type_id: data.packs[0].packet_type_id
});
const txHash = await userWallet.sendCalls(prep.calls);

// 3. Record it — the cards land in their wallet seconds later
const purchase = await cardos.instant.purchase.submit({ transaction_hash: txHash });

That's the whole integration. The catalog tells you what's on the shelf, prepare returns the transactions the end-user sends from their own wallet, submit records the hash, and the purchase status endpoint (or a webhook) hands you the cards. No balance is held or spent on your side: the money moves from the buyer's wallet, once, on-chain.

Base URLs

EnvironmentOriginNotes
Sandbox (staging)https://staging-service.rip.funBase Sepolia, which is what the "Try it" runners in these docs call
Productionhttps://api.getcardos.comBase mainnet

All endpoints live under the /api/v1/instant base path and require an X-API-Key. All money is USDC with 6 decimals: prices are integer micros returned as strings ("4990000" = 4.99 USDC), plus a *_usdc decimal string for display.

Custody

There is one model: the end-user holds their own funds and their own cards. The API returns the transactions to send (prepare), the end-user sends them from their own wallet, and you record the transaction (submit). CardOS never touches their funds, and the cards deliver straight to that wallet.

How an instant pack works

  1. Every pack in the catalog is backed by pre-built card bundles: CardOS physically rips real booster packs and records each pack's cards as one on-chain bundle, so available_packs is live inventory, not a synthetic number.
  2. The user pays from their own wallet with the calldata prepare returns. The VRF picks which bundle they get, so neither you nor CardOS can choose the outcome.
  3. Delivery is asynchronous: usually a few seconds, up to ~90 seconds while VRF settles. Poll purchase status until FULFILLED, or consume the instant_purchase.* webhooks.
  4. The cards are on-chain tokens in the recipient wallet, each backed by a specific physical card in the CardOS vault — the same cards the Card Data API prices.

Shared with the Gacha API

  • Keys and scopes. One partner key covers both products. Instant packs use read:catalog (catalog), packs:purchase (purchase) and packs:read (purchase reads) — see Authentication.
  • Webhooks. Managed via the shared /api/v1/webhooks endpoints; the instant_purchase.submitted / fulfilled / refunded / failed events use the same signing and retry scheme, documented in the webhooks guide.

Endpoints

Quick start

  1. Get a partner API key (see Authentication).
  2. List the catalog to render your shop — each entry carries the packet_type_id you purchase with.
  3. Purchase: prepare → the end-user signs from their own wallet → submit the hash.
  4. Poll purchase status (or use instant_purchase.* webhooks) until FULFILLED, then show the cards.
  5. From there the cards behave like any CardOS card: a physical redemption via the Gacha API. (Buyback is a combo-pool mechanic — instant pack cards come from a different pool, so they carry no buyback window.)