{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/send21-io/json-schema/send21-io-payment-request-response-schema.json",
  "title": "PaymentRequestResponse",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/send21-io-openapi.json#/components/schemas/PaymentRequestResponse",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "shareToken": {
      "type": [
        "string",
        "null"
      ]
    },
    "payPath": {
      "type": [
        "string",
        "null"
      ]
    },
    "orderId": {
      "type": [
        "string",
        "null"
      ]
    },
    "fiatCurrency": {
      "type": [
        "string",
        "null"
      ]
    },
    "fiatAmount": {
      "type": "number",
      "format": "double"
    },
    "memo": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "$ref": "#/$defs/PaymentRequestStatus"
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "options": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/PaymentRequestOptionDto"
      }
    },
    "activeDraftId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "draftStatus": {
      "$ref": "#/$defs/DraftStatus"
    },
    "fee": {
      "$ref": "#/$defs/PaymentRequestFeeInfo"
    },
    "amountMismatch": {
      "$ref": "#/$defs/AmountMismatchInfo"
    },
    "declineNote": {
      "type": [
        "string",
        "null"
      ]
    },
    "shortfallPolicy": {
      "$ref": "#/$defs/ShortfallPolicyDto"
    },
    "changeSignals": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "changeNotes": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "optionChangeSignals": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/OptionChangeSignalsInfo"
      }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "AmountMismatchInfo": {
      "type": "object",
      "properties": {
        "txId": {
          "type": [
            "string",
            "null"
          ]
        },
        "expectedBaseUnits": {
          "type": "integer",
          "format": "int64"
        },
        "receivedBaseUnits": {
          "type": "integer",
          "format": "int64"
        },
        "differenceBaseUnits": {
          "type": "integer",
          "format": "int64"
        },
        "receivedFormatted": {
          "type": [
            "string",
            "null"
          ]
        },
        "differenceFormatted": {
          "type": [
            "string",
            "null"
          ]
        },
        "confirmations": {
          "type": "integer",
          "format": "int32"
        },
        "detectedAt": {
          "type": "string",
          "format": "date-time"
        },
        "acceptedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "acceptReason": {
          "type": [
            "string",
            "null"
          ]
        },
        "acceptedBy": {
          "type": [
            "string",
            "null"
          ]
        },
        "reviewState": {
          "type": [
            "string",
            "null"
          ]
        },
        "rejectedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "rejectReason": {
          "type": [
            "string",
            "null"
          ]
        },
        "rejectedBy": {
          "type": [
            "string",
            "null"
          ]
        },
        "reviewReason": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "DraftStatus": {
      "enum": [
        "AwaitingPayment",
        "Seen",
        "Confirmed",
        "Expired",
        "Cancelled"
      ],
      "type": "string"
    },
    "OptionChangeSignalsInfo": {
      "type": "object",
      "properties": {
        "currency": {
          "$ref": "#/$defs/PaymentCurrency"
        },
        "network": {
          "$ref": "#/$defs/PaymentNetwork"
        },
        "method": {
          "$ref": "#/$defs/PaymentMethod"
        },
        "signals": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        },
        "notes": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "PaymentCurrency": {
      "enum": [
        "Btc",
        "Usdc",
        "Usdt",
        "Eurc",
        "Sol",
        "Eth"
      ],
      "type": "string"
    },
    "PaymentMethod": {
      "enum": [
        "MultiOutput",
        "Lightning"
      ],
      "type": "string"
    },
    "PaymentNetwork": {
      "enum": [
        "Mainnet",
        "Testnet4",
        "Signet",
        "Regtest",
        "Solana",
        "SolanaDevnet",
        "Ethereum",
        "EthereumSepolia",
        "Base",
        "BaseSepolia",
        "Arbitrum",
        "ArbitrumSepolia",
        "Polygon",
        "PolygonAmoy"
      ],
      "type": "string"
    },
    "PaymentRequestFeeInfo": {
      "type": "object",
      "properties": {
        "percent": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        },
        "feeUsd": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        },
        "feeBaseUnits": {
          "type": "integer",
          "format": "int64"
        },
        "feeAmount": {
          "type": [
            "string",
            "null"
          ]
        },
        "currency": {
          "type": [
            "string",
            "null"
          ]
        },
        "waived": {
          "type": "boolean"
        },
        "settledAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      },
      "additionalProperties": false
    },
    "PaymentRequestOptionDto": {
      "type": "object",
      "properties": {
        "currency": {
          "$ref": "#/$defs/PaymentCurrency"
        },
        "network": {
          "$ref": "#/$defs/PaymentNetwork"
        },
        "address": {
          "type": [
            "string",
            "null"
          ]
        },
        "method": {
          "$ref": "#/$defs/PaymentMethod"
        }
      },
      "additionalProperties": false
    },
    "PaymentRequestStatus": {
      "enum": [
        "Open",
        "Completed",
        "Cancelled",
        "Expired"
      ],
      "type": "string"
    },
    "ShortfallPolicyDto": {
      "type": "object",
      "properties": {
        "absorbUpToPercent": {
          "type": "number",
          "format": "double"
        },
        "absorbedBy": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    }
  }
}