{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aspern-org/json-schema/aspern-org-payment-inspect-request-schema.json",
  "title": "PaymentInspectRequest",
  "description": "The payload you are about to sign, and what you believe it does. Anything omitted from `expect` is not compared, and is reported as not compared.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aspern-org-alerts-api-openapi.yml#/components/schemas/PaymentInspectRequest",
  "type": "object",
  "properties": {
    "data": {
      "type": "string",
      "description": "Calldata, 0x-prefixed. Without it nothing about the transaction is read."
    },
    "to": {
      "type": "string",
      "description": "The contract being called, where you know it."
    },
    "resource": {
      "type": "string",
      "description": "The x402 endpoint this payment is for. With it the bytes are compared against what the endpoint itself asks, and `againstEndpoint.standing` says how old that quote is and what this endpoint’s price has done before."
    },
    "maxQuoteAgeSeconds": {
      "type": "number",
      "description": "How old a quote you are willing to act on, in seconds. YOURS, not ours: four hours is alarming for a market quote and irrelevant for a tariff unchanged since March, so a threshold published here would be a number we invented wearing the clothes of a measurement. `againstEndpoint.standing.freshness` answers against this one — `within-your-limit` or `older-than-your-limit` — and `freshEnough` is the boolean. Without it the answer says `no-limit-given` rather than grading the age, and `standing` still carries what this endpoint’s price has actually done so a limit can be chosen on evidence.",
      "x-unit": "seconds"
    },
    "refresh": {
      "type": "boolean",
      "description": "Knock on `resource` NOW rather than comparing against a stored reading, and set what comes back against the reading it replaced: `againstEndpoint.refreshed.quoteStillMatches` is true, false, or null where the two cannot be compared, with `verdict` as match/changed/unknown and `differs` naming which of amount, asset, network or payee moved. A changed PAYEE is the substitution a payment check exists to catch. It compares the same unpaid GET both times, so an endpoint whose price depends on the body or on who is asking is outside what this can tell you, and a match is what it said a moment ago rather than a promise about the next. Only for an endpoint already in the x402 catalogue we read — we do not fetch a URL because a request named it — and at most one live handshake a minute per resource, shared by every caller, because our user agent promises those hosts one unpaid handshake per resource rather than one per request. `againstEndpoint.refreshed` says whether the knock landed; a probe that failed leaves the stored reading alone and says so."
    },
    "expect": {
      "type": "object",
      "properties": {
        "payTo": {
          "type": "string"
        },
        "amountAtomic": {
          "type": "string",
          "description": "ATOMIC units of the token as a decimal string. Not dollars."
        },
        "chain": {
          "type": "string"
        },
        "validBefore": {
          "type": "string",
          "description": "Seconds since the epoch."
        },
        "validAfter": {
          "type": "string",
          "description": "Seconds since the epoch."
        }
      }
    }
  }
}