{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/auraspay-com/json-schema/auraspay-com-payment-receipt-schema.json",
  "title": "PaymentReceipt",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/auraspay-com-agent-checkout-api-openapi.yml#/components/schemas/PaymentReceipt",
  "allOf": [
    {
      "$ref": "#/$defs/PaymentStatus"
    },
    {
      "type": "object",
      "required": [
        "receipt",
        "idempotent"
      ],
      "properties": {
        "receipt": {
          "$ref": "#/$defs/SettlementResponse"
        },
        "idempotent": {
          "type": "boolean"
        }
      }
    }
  ],
  "$defs": {
    "PaymentStatus": {
      "type": "object",
      "required": [
        "publicId",
        "status",
        "network",
        "asset",
        "amount",
        "completed",
        "transactionHash",
        "verifiedAt",
        "expiresAt"
      ],
      "properties": {
        "publicId": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "PENDING",
            "EXPIRED",
            "COMPLETED"
          ]
        },
        "network": {
          "const": "base"
        },
        "asset": {
          "const": "USDC"
        },
        "amount": {
          "type": "string"
        },
        "completed": {
          "type": "boolean"
        },
        "transactionHash": {
          "type": [
            "string",
            "null"
          ]
        },
        "verifiedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "SettlementResponse": {
      "type": "object",
      "required": [
        "success",
        "transaction",
        "network",
        "payer"
      ],
      "properties": {
        "success": {
          "type": "boolean"
        },
        "transaction": {
          "type": "string"
        },
        "network": {
          "const": "eip155:8453"
        },
        "payer": {
          "type": "string"
        },
        "errorReason": {
          "type": "string"
        }
      }
    }
  }
}