{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/subotiz-com/json-schema/subotiz-com-list-payment-response-schema.json",
  "title": "ListPaymentResponse",
  "description": "ListPaymentResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/subotiz-com-payment-api-openapi.yml#/components/schemas/ListPaymentResponse",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "error code"
    },
    "message": {
      "type": "string",
      "description": "error message"
    },
    "data": {
      "$ref": "#/$defs/ListPaymentResponse_Data"
    }
  },
  "$defs": {
    "Avs": {
      "type": "object",
      "properties": {
        "line1_check": {
          "type": "string",
          "description": "Address line check: pass / fail / unchecked / unavailable"
        },
        "postal_code_check": {
          "type": "string",
          "description": "Postal code check: pass / fail / unchecked / unavailable"
        }
      },
      "description": "Avs - Address verification results"
    },
    "CardInfo": {
      "type": "object",
      "properties": {
        "brand": {
          "type": "string",
          "description": "Card brand"
        },
        "country": {
          "type": "string",
          "description": "Issuing country"
        },
        "last4": {
          "type": "string",
          "description": "Last 4 digits of card number"
        },
        "funding": {
          "type": "string",
          "description": "Card type (credit/debit)"
        },
        "authcode": {
          "type": "string",
          "description": "Issuer authorization code; present for card payments, empty otherwise"
        },
        "network_transaction_id": {
          "type": "string",
          "description": "Card network transaction ID; present for card payments, empty otherwise"
        },
        "bin": {
          "type": "string",
          "description": "First 6 digits of the card number (BIN); present for card payments, empty otherwise"
        }
      },
      "description": "CardInfo"
    },
    "ChannelPaymentMethod": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "Type, fixed value \"card\""
        },
        "card": {
          "allOf": [
            {
              "$ref": "#/$defs/CardInfo"
            }
          ],
          "description": "Card information"
        }
      },
      "description": "ChannelPaymentMethod"
    },
    "ListPaymentResponse_Data": {
      "type": "object",
      "properties": {
        "list": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Payment"
          },
          "description": "Payment flow list (ordered by created_at DESC, id DESC)"
        },
        "has_more": {
          "type": "boolean",
          "description": "Whether or not there are more elements available after this set. \n If false, this set comprises the end of the list."
        }
      },
      "description": "ListPaymentResponse"
    },
    "Payment": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Database primary key ID (Snowflake ID, string format)"
        },
        "out_trans_id": {
          "type": "string",
          "description": "Payment flow ID"
        },
        "trade_id": {
          "type": "string",
          "description": "Order ID / Trade ID"
        },
        "merchant_id": {
          "type": "string",
          "description": "Merchant ID"
        },
        "payment_method": {
          "type": "string",
          "description": "Payment method"
        },
        "payment_channel": {
          "type": "string",
          "description": "Payment channel"
        },
        "status": {
          "type": "string",
          "description": "Payment status"
        },
        "amount": {
          "type": "string",
          "description": "Payment amount, truncated to two decimal places"
        },
        "currency": {
          "type": "string",
          "description": "Currency"
        },
        "channel_trade_id": {
          "type": "string",
          "description": "Channel transaction ID"
        },
        "order_trans_id": {
          "type": "string",
          "description": "Order transaction ID (globally unique, represents one payment attempt)"
        },
        "channel_payment_method": {
          "allOf": [
            {
              "$ref": "#/$defs/ChannelPaymentMethod"
            }
          ],
          "description": "Payment method information"
        },
        "created_at": {
          "type": "string",
          "description": "Creation time"
        },
        "channel_ret_code": {
          "type": "string",
          "description": "Channel return code"
        },
        "channel_ret_msg": {
          "type": "string",
          "description": "Channel return message"
        },
        "verification": {
          "allOf": [
            {
              "$ref": "#/$defs/Verification"
            }
          ],
          "description": "Card payment verification result (CVC / AVS / 3DS); null for non-card payments or when unavailable"
        }
      },
      "description": "Payment"
    },
    "ThreeDSecure": {
      "type": "object",
      "properties": {
        "authentication_flow": {
          "type": "string",
          "description": "Authentication flow: frictionless / challenge"
        },
        "result": {
          "type": "string",
          "description": "Result: authenticated / attempt_acknowledged / not_supported / failed / exempted / processing_error"
        },
        "result_reason": {
          "type": "string",
          "description": "Failure or downgrade reason, empty when successful"
        },
        "version": {
          "type": "string",
          "description": "3DS protocol version, e.g. 2.2.0"
        },
        "eci": {
          "type": "string",
          "description": "ECI indicator; empty when not returned"
        }
      },
      "description": "ThreeDSecure - 3DS verification details"
    },
    "Verification": {
      "type": "object",
      "properties": {
        "cvc_check": {
          "type": "string",
          "description": "CVC check result: pass / fail / unchecked / unavailable"
        },
        "avs": {
          "allOf": [
            {
              "$ref": "#/$defs/Avs"
            }
          ],
          "description": "Address verification results; null when not triggered"
        },
        "three_d_secure": {
          "allOf": [
            {
              "$ref": "#/$defs/ThreeDSecure"
            }
          ],
          "description": "3DS verification results; null when 3DS not performed"
        }
      },
      "description": "Verification - Card payment verification results"
    }
  }
}