API reference · v1

Starship REST API

A versioned REST API for partners who want gift cards delivered as a service. Stateless auth (API key + secret + HMAC-SHA256 per request), idempotent writes, signed webhook callbacks, IP allowlisting, cache-hit instant allocation.

Sandbox base URL · https://api-playground.starshiprewards.com/api/v1
Production base URL issued to certified partners during onboarding.
Access by invitation. API credentials are issued per-partner after a sandbox certification. To request access, email hello@rocketincentive.com with your expected volumes, vendors of interest, and settlement currency. Postman collection + reference request-signing snippets provided to certified partners.
Full documentation site · starshiprewards.com/docs

Authentication

Stateless auth. No sessions, no bearer tokens, no OAuth, no refresh flows. Every API request carries your partner key + secret on the headers. The server validates identity per-call; there is no server-side session state to expire or re-establish.

X-API-Key: pk_live_01HX9...
X-API-Secret: sk_live_...

Keys are issued per partner during onboarding, scoped to a single partner organization, bound to an IP allowlist, and can be rotated on request. They remain valid until explicitly revoked — no expiry, no re-auth cycle, no token refresh.

Why stateless: partner integrations live long-term; a fresh header-based signature on every request is simpler to operate than an OAuth dance with refresh tokens, and it keeps replay windows short.

Request signing · HMAC-SHA256

Identity alone isn't enough — every write request (POST, PUT, DELETE) is also HMAC-signed for integrity and replay protection. Compute an HMAC-SHA256 over the concatenated timestamp + method + path + body using your API secret, then attach:

X-Timestamp: 1744646400          # unix seconds, must be within 5 min of server time
X-Signature: t=1744646400,v1=7a2c4f...   # v1 = hex-encoded HMAC-SHA256

The t= prefix binds the timestamp into the signature (replay protection). Signatures older than the clock-skew window are rejected.

Reference signer (pseudo-code)

// Any language — 10 lines
ts  = unix_now()
msg = ts + method + path + body    // all strings, concatenated
sig = hmac_sha256(api_secret, msg).hex()

headers["X-API-Key"]    = api_key
headers["X-API-Secret"] = api_secret
headers["X-Timestamp"]  = ts
headers["X-Signature"]  = "t="+ts+",v1="+sig

Reference implementations (Go, Node, Python, PHP) are 15–30 lines each and shared with certified partners on request. A public OpenAPI 3.1 spec is on the roadmap; a Postman collection is available today.

Idempotency

Write endpoints that create state — POST /orders, POST /payouts — require an Idempotency-Key header. Retries with the same key return the original response without re-executing. Keys are retained for 24 hours.

Idempotency-Key: order-2026-04-14-a7f3c9b2

Rate limits

Limits are applied per API key, per endpoint class. The most relevant defaults:

When limits are exceeded the API returns 429 Too Many Requests with a Retry-After header. Enterprise partners can negotiate higher limits per contract.

Error shape

Errors use standard HTTP status codes plus a structured body:

{
  "error": {
    "name":    "InsufficientInventory",
    "code":    "INSUFFICIENT_INVENTORY",
    "message": "No vouchers available for product amazon-gift-500"
  }
}

Every response also carries an X-Trace-ID response header when distributed tracing is enabled — quote it in support tickets so we can find the exact request.

Core endpoints

Catalog

GET/categories
List product categories available to your client organization.
GET/products
List all products (SKUs) with denominations, vendor, currency, and expiry policy. Filter by currency and country via query params.
GET/products/{product_id}
Fetch a single product by ID, including full denomination list and availability.

Orders

POST/orders
Place a voucher order. Requires Idempotency-Key. Cache-hit returns vouchers in the response body. Cache-miss returns PENDING and fires a webhook when fulfilled (or when the admin gate decides otherwise).
GET/orders/{order_id}
Retrieve order status, allocated vouchers, fulfillment timeline.

Wallet & transactions

GET/wallets
Current wallet balances across settlement currencies.
GET/transactions
Paginated transaction history with filters by date range, order ID, and type.

Webhooks

POST/webhooks
Register or update a webhook endpoint for your partner account. Starship will sign every delivery using your per-endpoint signing secret.

Reconciliation Planned · not yet built

Daily reconciliation matches every allocation against vendor-side records and surfaces drifts. Today this runs internally and is visible in the operator console; a public partner endpoint is in design. The shape below is the planned contract — subject to change before release. Tell us if you need it prioritized for your integration.

GET/reconciliation/{date} PLANNED
date: ISO date YYYY-MM-DD (UTC). Returns the daily reconciliation summary for orders settled on that date.

Planned response shape

{
  "date":           "2026-04-13",
  "summary": {
    "orders_total":      847,
    "vouchers_allocated": 1283,
    "matched":           1281,
    "drifted":           2,
    "unmatched":         0
  },
  "drifts": [
    {
      "order_id":        "ord_01HX9...",
      "vendor":          "voucherkart",
      "product_id":      "amazon-gift-500",
      "our_allocation":  "VOUCHER-A",
      "vendor_record":   "VOUCHER-B",
      "detected_at":     "2026-04-13T18:42:00Z",
      "resolution":      "pending"      // pending | resolved | escalated
    }
  ],
  "generated_at":   "2026-04-14T00:30:12Z"
}

Internal status today: reconciliation runs as a scheduled job, drifts are flagged in the operator console, and corrections happen via admin action. The public endpoint formalizes that pipeline so partners can poll their own daily summary instead of asking us. ETA depends on partner demand — it’s a small Go addition once we lock the contract.

Webhooks

Starship emits signed webhooks for lifecycle events. Your endpoint must return 2xx within 5 seconds or the delivery is retried with exponential backoff for 24 hours.

Event types (current)

Roadmap: reconciliation-drift and wallet-balance-threshold events are tracked internally today and will be exposed as webhook events once we standardize the payload contract.

Sample payload

{
  "event":      "order.delivered",
  "event_id":   "evt_01HX9ABC...",
  "created_at": "2026-04-14T08:42:15Z",
  "data": {
    "order_id":       "ord_01HX9...",
    "status":         "DELIVERED",
    "total_amount":   500.00,
    "currency":       "USD",
    "fulfilled_from": "cache",
    "vouchers": [
      { "product_id": "amazon-gift-500", "expiry": "2027-04-14" }
    ]
  }
}

Voucher codes are delivered via a secure, separately-fetched endpoint — they are not included in webhook payloads. This protects them from log leakage and from clients that mishandle retry.

Environments

The companion admin surface for operator users is at admin-playground.starshiprewards.com (sandbox). Partner-API clients never need it — everything an integration needs lives under the /api/v1 prefix above.

Postman & samples

Shared with certified partners during onboarding:

Roadmap: a public OpenAPI 3.1 specification and official SDK packages (Go-first) are planned. Current partners typically integrate in a few hundred lines using the reference signers — we share them on request.

Next step. Email hello@rocketincentive.com with your integration scope and we’ll issue sandbox credentials within 2 business days.
API v1 · Last reviewed: