{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oceanalt-com/json-schema/oceanalt-com-payment-request-result-schema.json",
  "title": "PaymentRequestResult",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oceanalt-com-openapi.json#/components/schemas/PaymentRequestResult",
  "type": "object",
  "required": [
    "decision",
    "reason_code",
    "retry",
    "signal_keys",
    "findings"
  ],
  "properties": {
    "decision": {
      "type": "string",
      "enum": [
        "allow",
        "review",
        "decline"
      ]
    },
    "verdict": {
      "type": "string",
      "enum": [
        "clear",
        "caution",
        "risky",
        "uncertain"
      ]
    },
    "reason_code": {
      "type": "string",
      "enum": [
        "clear",
        "payment_request_needs_confirmation",
        "payment_request_untrusted",
        "screening_unavailable"
      ]
    },
    "signal_class": {
      "type": "string"
    },
    "retry": {
      "type": "string"
    },
    "retry_hint": {
      "type": "string"
    },
    "signal_keys": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "level": {
            "type": "string",
            "enum": [
              "risky",
              "caution",
              "info"
            ]
          },
          "message": {
            "type": "string"
          },
          "messageZh": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "level",
          "message"
        ]
      }
    },
    "sender": {
      "type": "object",
      "properties": {
        "display_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "address": {
          "type": [
            "string",
            "null"
          ]
        },
        "domain": {
          "type": [
            "string",
            "null"
          ]
        },
        "auth": {
          "type": [
            "object",
            "null"
          ]
        }
      }
    },
    "links": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string"
          },
          "verdict": {
            "type": "string"
          },
          "signal_keys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    "payees": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string"
          },
          "verdict": {
            "type": "string"
          },
          "blocked": {
            "type": "boolean"
          },
          "signal_keys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    "checked": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "advice": {
      "type": "string"
    },
    "privacy": {
      "type": "string"
    },
    "lang": {
      "type": "string",
      "enum": [
        "en",
        "zh"
      ]
    },
    "standard": {
      "type": "string"
    },
    "access": {
      "type": "object",
      "description": "Your access level, usage and what the next level adds.",
      "properties": {
        "access_level": {
          "type": "string",
          "enum": [
            "anonymous",
            "registered",
            "kya"
          ]
        },
        "rate_limit_per_minute": {
          "type": "integer"
        },
        "features": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "free_calls_per_month": {
          "type": "integer"
        },
        "used_this_month": {
          "type": "integer"
        },
        "free_calls_remaining": {
          "type": "integer"
        },
        "resets_at": {
          "type": "string",
          "format": "date-time"
        },
        "key_rejected": {
          "type": "string",
          "enum": [
            "unknown_key",
            "revoked",
            "expired",
            "email_unverified",
            "bad_agent_secret"
          ],
          "description": "Present when a key was sent but not accepted; the call is then served at the anonymous level."
        },
        "key_rejected_detail": {
          "type": "string"
        },
        "upgrade": {
          "type": "object",
          "description": "The next access level and how to get it. Absent at the highest level.",
          "properties": {
            "to_level": {
              "type": "string",
              "enum": [
                "registered",
                "kya"
              ]
            },
            "how": {
              "type": "string",
              "description": "Where to get that level."
            },
            "gains": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Human-readable. Do not branch on these."
            },
            "rate_limit_per_minute": {
              "type": "integer"
            },
            "free_calls_per_month": {
              "type": "integer"
            }
          }
        },
        "upgrade_note": {
          "type": "string"
        }
      }
    }
  }
}