{
  "$schema": "https://docs.stripe.com/agentic-commerce/manifest-v1.schema.json",
  "version": "1.0",
  "merchant": {
    "name": "SkinPreview",
    "operator": "tattoo.co",
    "support": "agents@tattoo.co",
    "homepage": "/"
  },
  "auth": {
    "type": "bearer",
    "scheme": "agent_credential",
    "header": "Authorization",
    "format": "Bearer ak_live_<key>",
    "issuance": "Contact agents@tattoo.co with customer email, label, and daily spend cap (default $20)."
  },
  "endpoints": {
    "spt_redeem": {
      "method": "POST",
      "path": "/api/agentic/spt/redeem",
      "protocol": "stripe.shared_payment_token",
      "body_schema": {
        "sharedPaymentToken": "string (spt_... from user wallet)",
        "packId": "string (one of credit_packs[].id)"
      },
      "idempotency": "PaymentIntent id (returned in response.paymentIntentId)"
    },
    "mpp_render": {
      "method": "POST",
      "path": "/api/render/photoreal-mpp",
      "protocol": "stripe.merchant_payment_protocol",
      "envelope": {
        "phase1": "Call without x-payment-receipt → 402 with x-payment-required header carrying the JSON envelope.",
        "phase2": "Call with x-payment-receipt: <pi_id> after funding the PaymentIntent. Idempotent on PI id."
      },
      "price": { "amountCents": 20, "currency": "usd" }
    },
    "discovery": {
      "method": "GET",
      "path": "/.well-known/agentic-commerce.json"
    },
    "credit_packs_catalog": {
      "method": "GET",
      "path": "/api/credit-packs"
    }
  },
  "credit_packs": [
    {
      "id": "starter_5",
      "name": "5 renders",
      "credits": 5,
      "amountCents": 499,
      "currency": "usd"
    },
    {
      "id": "pro_25",
      "name": "25 renders",
      "credits": 25,
      "amountCents": 1999,
      "currency": "usd"
    },
    {
      "id": "studio_100",
      "name": "100 renders",
      "credits": 100,
      "amountCents": 6999,
      "currency": "usd"
    }
  ],
  "policies": {
    "rate_limit_renders_per_hour": 30,
    "daily_spend_cap_default_cents": 2000,
    "refunds": "Render failures after MPP settlement: contact agents@tattoo.co with the PaymentIntent id."
  },
  "human_equivalents": {
    "buy_credits": "/credits",
    "render": "/",
    "render_history": "/me/renders"
  }
}
