{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/stabledrop-me/json-schema/stabledrop-me-settle-response-schema.json",
  "title": "SettleResponse",
  "description": "What a successful settlement returns.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stabledrop-me-openapi.json#/components/schemas/SettleResponse",
  "properties": {
    "terms": {
      "$ref": "#/$defs/TermsNotice",
      "description": "The Terms of Service this call was made under"
    },
    "payment_receipt": {
      "type": "string",
      "title": "Payment Receipt",
      "description": "The authoritative copy: an AP2 PaymentReceipt as a compact ES256 JWT. Verify it against the key published at `https://{iss}/.well-known/jwks.json` — resolved from the receipt's own `iss`, not from whoever handed it to you."
    },
    "receipt_claims": {
      "additionalProperties": true,
      "type": "object",
      "title": "Receipt Claims",
      "description": "The same claims decoded, so you need not unpack the JWT to act on them. The JWT is authoritative; nothing should verify against this."
    }
  },
  "type": "object",
  "required": [
    "terms",
    "payment_receipt",
    "receipt_claims"
  ],
  "$defs": {
    "TermsNotice": {
      "properties": {
        "notice": {
          "type": "string",
          "title": "Notice",
          "description": "That using the API constitutes acceptance of the terms"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Url",
          "description": "This deployment's `<site>/terms-of-service/`; null only if the site could not be named"
        }
      },
      "type": "object",
      "required": [
        "notice",
        "url"
      ],
      "title": "TermsNotice"
    }
  }
}