Shipping quote

POST /api/v1/mystery/redemption/quote cards:redeem

A pre-checkout shipping quote for redeeming an item physically. Validates the address and returns the cheapest live rate. Supply purchase_id OR token_id. Creates nothing, so it’s safe to call just to show shipping cost before the user commits.

Try it POST /api/v1/mystery/redemption/quote write

These inputs are shared across all docs pages — an id entered here carries over.

request body
object · 1 keys
{
  "shipping_address": {
    "name": "Demo Buyer",
    "street1": "1 Market St",
    "city": "San Francisco",
    "state": "CA",
    "zip": "94105",
    "country": "US"
  }
}
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).

curl (tracks the inputs above)
curl -X POST 'https://service.rip.fun/api/v1/mystery/redemption/quote' \
  -H 'X-API-Key: rip_…' \
  -H 'Content-Type: application/json' \
  -d '{"shipping_address":{"name":"Demo Buyer","street1":"1 Market St","city":"San Francisco","state":"CA","zip":"94105","country":"US"}}'

Request fields

FieldTypeRequiredDescription
purchase_idnumberThe fulfilled purchase holding the item (supply this OR token_id)
token_idstringOn-chain token id (supply this OR purchase_id; also disambiguates a multi-item purchase)
item_typestring"CARD" | "GRADED_CARD" | "PACKET" | "SEALED_PRODUCT" — disambiguates a token number that exists as more than one asset (raw Card #N vs GradedCard slab #N)
shipping_address.namestringyesRecipient full name
shipping_address.street1stringyesStreet line 1 (`street2` optional)
shipping_address.citystringyesCity
shipping_address.statestringState / region
shipping_address.zipstringyesPostal code
shipping_address.countrystringyesISO country code, e.g. `US` (`phone`, `email` optional)

Response fields (data)

FieldDescription
shipping_quote.amount_usdcQuoted shipping cost (USD decimal string)
shipping_quote.carrier / service / service_tokenCheapest live Shippo rate — provider, service name, and Shippo servicelevel token (the token the warehouse exact-matches when buying the fresh label)
shipping_quote.estimated_daysCarrier transit estimate
shipping_quote.rate_id / quoted_atShippo rate object id + quote timestamp

Errors

StatusCodeWhen
400purchase_or_token_requiredneither purchase_id nor token_id supplied
400missing_shipping_addressshipping_address omitted or incomplete
400invalid_addressShippo cannot validate the address
404token_not_foundtoken-first: no rip.fun item for that token
409ambiguous_tokenthe token number is both a raw and a graded card — pass item_type
409item_type_mismatchitem_type contradicts what the token actually is
409not_fulfilledpurchase has not revealed yet

See Errors for the response envelope and the full code list.