{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/auraspay-com/json-schema/auraspay-com-prepare-response-schema.json",
  "title": "PrepareResponse",
  "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/PrepareResponse",
  "type": "object",
  "required": [
    "paymentRequired",
    "transactionPlan",
    "signing"
  ],
  "properties": {
    "paymentRequired": {
      "$ref": "#/$defs/PaymentRequired"
    },
    "transactionPlan": {
      "$ref": "#/$defs/TransactionPlan"
    },
    "signing": {
      "type": "object",
      "required": [
        "mode",
        "privateKeysAccepted",
        "unlimitedApprovalRequested",
        "humanApproved",
        "boundedPreAuthorizationUsed"
      ],
      "properties": {
        "mode": {
          "const": "external-wallet-only"
        },
        "privateKeysAccepted": {
          "const": false
        },
        "unlimitedApprovalRequested": {
          "const": false
        },
        "humanApproved": {
          "type": "boolean"
        },
        "boundedPreAuthorizationUsed": {
          "type": "boolean"
        }
      }
    }
  },
  "$defs": {
    "PaymentRequired": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "x402Version",
        "resource",
        "accepts",
        "extensions"
      ],
      "properties": {
        "x402Version": {
          "const": 2
        },
        "error": {
          "type": "string"
        },
        "resource": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "url",
            "description",
            "mimeType"
          ],
          "properties": {
            "url": {
              "type": "string",
              "format": "uri"
            },
            "description": {
              "type": "string"
            },
            "mimeType": {
              "const": "application/json"
            }
          }
        },
        "accepts": {
          "type": "array",
          "minItems": 1,
          "maxItems": 1,
          "items": {
            "$ref": "#/$defs/PaymentRequirement"
          }
        },
        "extensions": {
          "type": "object"
        }
      }
    },
    "PaymentRequirement": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "scheme",
        "network",
        "amount",
        "asset",
        "payTo",
        "maxTimeoutSeconds",
        "extra"
      ],
      "properties": {
        "scheme": {
          "const": "auraspay-splitter-v1"
        },
        "network": {
          "const": "eip155:8453"
        },
        "amount": {
          "type": "string",
          "pattern": "^[1-9][0-9]*$",
          "description": "Exact Base USDC amount in atomic units"
        },
        "asset": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "payTo": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$",
          "description": "Reviewed AurasPay splitter contract, not the merchant wallet"
        },
        "maxTimeoutSeconds": {
          "const": 900
        },
        "extra": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "paymentFlow",
            "assetTransferMethod",
            "merchant",
            "platform",
            "feeBps",
            "paymentReference",
            "publicId",
            "nonce",
            "expiresAt"
          ],
          "properties": {
            "paymentFlow": {
              "const": "upfront"
            },
            "assetTransferMethod": {
              "const": "auraspay-splitter-v1"
            },
            "merchant": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$"
            },
            "platform": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$"
            },
            "feeBps": {
              "const": 100
            },
            "paymentReference": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{64}$"
            },
            "publicId": {
              "type": "string",
              "pattern": "^pay_[A-Za-z0-9_-]{22}$"
            },
            "nonce": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{64}$"
            },
            "expiresAt": {
              "type": "string",
              "format": "date-time"
            }
          }
        }
      }
    },
    "TransactionPlan": {
      "type": "object",
      "required": [
        "network",
        "chainId",
        "account",
        "token",
        "splitter",
        "merchant",
        "platform",
        "amount",
        "merchantAmount",
        "platformAmount",
        "reference",
        "deadline",
        "steps"
      ],
      "properties": {
        "network": {
          "const": "base"
        },
        "chainId": {
          "const": 8453
        },
        "account": {
          "type": "string"
        },
        "token": {
          "type": "string"
        },
        "splitter": {
          "type": "string"
        },
        "merchant": {
          "type": "string"
        },
        "platform": {
          "type": "string"
        },
        "amount": {
          "type": "string"
        },
        "merchantAmount": {
          "type": "string"
        },
        "platformAmount": {
          "type": "string"
        },
        "reference": {
          "type": "string"
        },
        "deadline": {
          "type": "integer"
        },
        "steps": {
          "type": "array",
          "minItems": 1,
          "maxItems": 3,
          "items": {
            "$ref": "#/$defs/TransactionStep"
          }
        }
      }
    },
    "TransactionStep": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "step",
        "to",
        "value",
        "data",
        "chainId"
      ],
      "properties": {
        "step": {
          "type": "string",
          "enum": [
            "reset",
            "approve",
            "pay"
          ]
        },
        "to": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "value": {
          "const": "0"
        },
        "data": {
          "type": "string",
          "pattern": "^0x[0-9a-fA-F]*$"
        },
        "chainId": {
          "const": 8453
        }
      }
    }
  }
}