Shipping quote

POST /api/v1/shipping-quote tenant key

Tenant fulfillment, step 1. Requires a TENANT API key (set yours in the sidebar — the demo key here is a mystery-partner key and 403s). Validates the ship-to address and returns live carrier rates for the listed cards. Opens a PENDING_PAYMENT order and locks in the quoted rates, so committing bills exactly what you were quoted. Hand the order_id + a chosen rate_id to POST /api/v1/orders.

Try it POST /api/v1/shipping-quote write

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

request body
object · 2 keys
{
  "unique_ids": [
    "CARD-EXAMPLE-1"
  ],
  "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/shipping-quote' \
  -H 'X-API-Key: rip_…' \
  -H 'Content-Type: application/json' \
  -d '{"unique_ids":["CARD-EXAMPLE-1"],"address":{"name":"Demo Buyer","street1":"1 Market St","city":"San Francisco","state":"CA","zip":"94105","country":"US"}}'

Request fields

FieldTypeRequiredDescription
unique_idsstring[]yesTenant card unique ids to ship together (deduped; every card must belong to you and be OFFCHAIN)
address.namestringyesRecipient full name
address.street1stringyesStreet line 1 (`street2` optional)
address.citystringyesCity
address.statestringyesState / region
address.zipstringyesPostal code
address.countrystringyesISO country code, e.g. `US` (`phone`, `email` optional)

Response fields (data)

FieldDescription
order_idNew PENDING_PAYMENT tenant order id — pass to POST /orders to commit
unique_idsEchoed card ids on the order
rates[]Live Shippo rates (cheapest first): rate_id, amount, currency, provider, servicelevel, estimated_days
shippo_shipment_id / shippo_address_idShippo shipment + validated address object ids
ship_by_at / expires_atTarget ship date + when these rates expire (~24h)

Errors

StatusCodeWhen
400unique_ids requiredunique_ids missing or not a non-empty string array
400invalid addressaddress incomplete or Shippo cannot validate it
404card(s) not founda unique_id is not a card of this tenant
409card(s) not OFFCHAINa card is not in an OFFCHAIN (shippable) state

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

Flow

  1. Tenant: POST /api/v1/shipping-quote with unique_ids + address → order_id + rates[]
  2. Tenant: pick a rate_id, POST /api/v1/orders {order_id, rate_id} → commits the order (billed the quoted amount, pass-through)
  3. rip.fun warehouse buys a FRESH label at print time matching the chosen carrier + service, then ships
  4. Tenant: GET /api/v1/orders/:order_id to poll status + tracking (or GET /api/v1/orders to list)
  5. Tenant: POST /api/v1/orders/:order_id/cancel while still PENDING_PAYMENT to void + release the cards