{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/qualpay/json-schema/qualpay-statement-dispute-response-schema.json",
  "title": "StatementDisputeResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/qualpay-reporting-api-openapi.yml#/components/schemas/StatementDisputeResponse",
  "type": "object",
  "properties": {
    "code": {
      "type": "integer",
      "description": "<strong>Format: </strong>Fixed length, 1 N<br><strong>Description: </strong>Response code from the API. `0` indicates success. Refer to <a href=\"/docs/api-conventions#platform-api-response-codes\" target=\"_blank\">Platform API Response Codes</a> for the entire list of return codes.",
      "format": "int32",
      "readOnly": true
    },
    "message": {
      "type": "string",
      "description": "<strong>Format: </strong>Variable length AN<br><strong>Description: </strong>A short description of the API response code.",
      "readOnly": true
    },
    "totalPages": {
      "type": "integer",
      "description": "<strong>Format: </strong>Variable length N<br><strong>Description: </strong>Total number of pages. ",
      "format": "int32",
      "readOnly": true
    },
    "totalRecords": {
      "type": "integer",
      "description": "<strong>Format: </strong>Variable length, up to 3 N<br><strong>Description: </strong>Total number of records up to a maximum of 100.",
      "format": "int32",
      "readOnly": true
    },
    "data": {
      "description": "An array of the resource object.",
      "readOnly": true,
      "$ref": "#/$defs/StatementDisputeData"
    }
  },
  "$defs": {
    "StatementDisputeData": {
      "type": "object",
      "properties": {
        "rec_id_linked": {
          "type": "integer",
          "description": "INTERNAL USE ONLY.",
          "format": "int64"
        },
        "merchant_id": {
          "type": "integer",
          "description": "<strong>Format: </strong>Variable length, up to 16 N<br><strong>Description: </strong>Merchant ID, the unique ID assigned to a merchant.",
          "format": "int64"
        },
        "billing_month": {
          "type": "string",
          "description": "<strong>Format:</strong> Variable length, up to 10 AN, in YYYY-MM-DD format<br><strong>Description:</strong> Billing month of the statement."
        },
        "batch_date": {
          "type": "string",
          "description": "<strong>Format:</strong> Variable length, up to 10 AN, in YYYY-MM-DD format<br><strong>Description:</strong> The date the ACH debit or credit adjustment was made to the depository account.",
          "format": "date-time"
        },
        "reference_number": {
          "type": "integer",
          "description": "<strong>Format:</strong> Fixed length, 11 N <br> <strong>Description:</strong> A number generated by the product initiating the transaction. The number is available when the transaction is settled and is a unique number that both the acquirer and the issuer can use to identify a transaction. The reference is used as the deposit reference number.",
          "format": "int64"
        },
        "plan_type": {
          "type": "string",
          "description": "<strong>Format:</strong> Fixed length, 2 A<br> <strong>Description:</strong> The payment instrument type: Visa, Mastercard, American Express, or Discover."
        },
        "type_id": {
          "type": "string",
          "description": "<strong>Format:</strong> Fixed length, 1 A<br> <strong>Description:</strong>The type of dispute. Possible values: <ul> <li>`C` - Chargeback</li><li>`B` - Reversal</li></ul>"
        },
        "billable": {
          "type": "string",
          "description": "<strong>Format:</strong> Variable length, up to 10 AN, in YYYY-MM-DD format<br><strong>Description:</strong> Defines whether the dispute triggered a billable event. Each billable dispute event will appear as a line item in the Fees section in YYYY-MM-DD format."
        },
        "amt_purch": {
          "type": "number",
          "description": "<strong>Format:</strong> Variable length N <br> <strong>Description:</strong> The USD value of the adjustment that is a debit to the depository account.",
          "format": "double"
        },
        "amt_return": {
          "type": "number",
          "description": "<strong>Format:</strong> Variable length N <br> <strong>Description:</strong> The USD value of the adjustment that is a credit to the depository account.",
          "format": "double"
        }
      }
    }
  }
}