{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oceanalt-com/json-schema/oceanalt-com-payment-intent-v1-schema.json",
  "title": "PaymentIntentV1",
  "description": "Payment Intent v1: the canonical description of one payment. Every value is a non-empty JSON string: numbers, booleans, null, empty strings and unknown fields are rejected with 400 invalid_payment_intent (code non_string_value:<field>, empty_value:<field>, unknown_field:<field>, missing_required:<field>). The chain part of asset_id must equal network (asset_network_mismatch). On eip155 networks payee and payer_address must be 0x + 40 hex. Normalization before hashing: on eip155 networks payee, payer_address and the erc20 contract address in asset_id are lowercased; nothing else changes. Other namespaces are kept as sent. payment_intent_digest = \"sha256:\" + hex SHA-256 of the UTF-8 bytes of the RFC 8785 (JCS) form of the normalized intent.",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oceanalt-com-openapi.json#/components/schemas/PaymentIntentV1",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "v",
    "payee",
    "amount_atomic",
    "asset_id",
    "network"
  ],
  "properties": {
    "v": {
      "type": "string",
      "enum": [
        "1"
      ],
      "description": "Version. Only \"1\" is accepted."
    },
    "payee": {
      "type": "string",
      "minLength": 1,
      "description": "The address that receives the payment (the x402 payTo). Takes the place of `to`; if both are sent they must match."
    },
    "amount_atomic": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]*)$",
      "description": "Amount in the asset's smallest unit, as a decimal string without leading zeros (1 USDC = \"1000000\")."
    },
    "asset_id": {
      "type": "string",
      "pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$",
      "description": "CAIP-19 asset id, e.g. eip155:8453/erc20:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 (USDC on Base)."
    },
    "network": {
      "type": "string",
      "pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$",
      "description": "CAIP-2 chain id, e.g. eip155:8453 (Base). Known EVM chains also select the chain the on-chain checks run on."
    },
    "resource_ref": {
      "type": "string",
      "minLength": 1,
      "description": "Optional, opaque reference to what is being paid for. An absolute http(s) URL (the URL that returned the 402 quote) also enables listing_check against that endpoint and origin_binding."
    },
    "request_ref": {
      "type": "string",
      "minLength": 1,
      "description": "Optional, opaque caller reference for this payment request."
    },
    "payer_address": {
      "type": "string",
      "minLength": 1,
      "description": "Optional: the paying address. On eip155 networks 0x + 40 hex."
    },
    "principal_ref": {
      "type": "string",
      "minLength": 1,
      "description": "Optional, opaque reference to the principal the agent pays for."
    },
    "purpose_ref": {
      "type": "string",
      "minLength": 1,
      "description": "Optional, opaque reference to the purpose of the payment."
    },
    "mandate_ref": {
      "type": "string",
      "minLength": 1,
      "description": "Optional, opaque reference to the mandate that authorizes the payment."
    }
  }
}