{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/qualpay/json-schema/qualpay-settled-transaction-response-schema.json",
  "title": "SettledTransactionResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/qualpay-reporting-api-openapi.yml#/components/schemas/SettledTransactionResponse",
  "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/SettledTransactionRequest"
    }
  },
  "$defs": {
    "SettledTransactionRequest": {
      "type": "object",
      "properties": {
        "rec_id": {
          "type": "integer",
          "description": "<strong>Format: </strong>Variable length, up to 18 N<br><strong>Description: </strong>Unique ID assigned to this deposit.",
          "format": "int64",
          "readOnly": true
        },
        "merchant_id": {
          "type": "integer",
          "description": "<strong>Format: </strong>Variable length, up to 16 N<br><strong>Description: </strong>The unique ID assigned to a merchant.",
          "format": "int64",
          "readOnly": true
        },
        "batch_date": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 10 AN, in YYYY-MM-DD<br><strong>Description: </strong>The date the batch was settled to us.",
          "readOnly": true
        },
        "dba_name": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 25 AN<br><strong>Description: </strong>The 'Doing Business As' (DBA) name of the merchant.",
          "readOnly": true
        },
        "merch_city_ph": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 13 AN<br><strong>Description: </strong>The merchant's city or phone number that was sent to the card issuer.",
          "readOnly": true
        },
        "merch_state": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 3 AN<br><strong>Description: </strong>The merchant's state, which was sent to the card issuer.",
          "readOnly": true
        },
        "merch_zip": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 10 AN<br><strong>Description: </strong>The merchant's ZIP code, which was sent to the card issuer.",
          "readOnly": true
        },
        "merch_country": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 3 AN<br><strong>Description: </strong>The merchant's country code, which was sent to the card issuer.",
          "readOnly": true
        },
        "batch_number": {
          "type": "integer",
          "description": "<strong>Format: </strong>Variable length, up to 3 N<br><strong>Description: </strong>A non-unique ID assigned by the merchant's terminal, POS device, or gateway for this batch, in the range of `1` to `999`.",
          "format": "int64",
          "readOnly": true
        },
        "batch_id": {
          "type": "integer",
          "description": "<strong>Format: </strong>Variable length, up to 10 N<br><strong>Description: </strong>Unique ID assigned to this batch.",
          "format": "int64",
          "readOnly": true
        },
        "card_number": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 16 AN<br><strong>Description: </strong>The masked card number of the transaction.",
          "readOnly": true
        },
        "card_type": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 2 AN<br><strong>Description: </strong>The card brand of this transaction.",
          "readOnly": true,
          "enum": [
            "VS",
            "MC",
            "AM",
            "DS",
            "JC",
            "PP",
            "AP"
          ]
        },
        "auth_date": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 10 AN, in YYYY-MM-DD<br><strong>Description: </strong>The date the transaction was authorized by the merchant.",
          "readOnly": true
        },
        "tran_date": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 10 AN, in YYYY-MM-DD<br><strong>Description: </strong>The date the transaction was captured by the merchant.",
          "readOnly": true
        },
        "settle_date": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 10 AN, in YYYY-MM-DD<br><strong>Description: </strong>The date we settled the transaction with the issuer.",
          "readOnly": true
        },
        "amt_auth": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 12,2 N<br><strong>Description: </strong>The amount of the original authorization.",
          "readOnly": true
        },
        "amt_tran": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 12,2 N<br><strong>Description: </strong>The amount of the settled transaction.",
          "readOnly": true
        },
        "tran_currency": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 3 AN<br><strong>Description: </strong>The ISO numeric currency code of the transaction. This must be a currency code associated with one of your payment profiles; contact Qualpay to add currencies. Refer to <a href=\"/docs/references#currency-codes\" target=\"_blank\">Currency Codes</a> for a list of currency codes.",
          "readOnly": true
        },
        "reference_number": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 23 AN<br><strong>Description: </strong>The bank reference number of the deposit.",
          "readOnly": true
        },
        "purchase_id": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 25 AN<br><strong>Description: </strong>The invoice or purchase number generated by the merchant. This number may be visible to the cardholder, depending on card issuer.",
          "readOnly": true
        },
        "auth_code": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 6 AN<br><strong>Description: </strong>The authorization code provided by the card issuer when the card was approved.",
          "readOnly": true
        },
        "moto_ecomm_ind": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 1 AN<br><strong>Description: </strong>The transaction e-commerce indicator (ECI), an indicatior of how the card was processed.",
          "readOnly": true
        },
        "pos_entry_mode": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 3 AN<br><strong>Description: </strong>Indicates the way a card number was entered. For all codes, see <a href=\"/docs/api-conventions#entry-mode\" target=\"_blank\">POS Entry Modes</a>.",
          "readOnly": true
        },
        "amt_funded": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 12,2 N<br><strong>Description: </strong>The amount of this transaction funded to the merchant, displayed in the currency denoted in the `funded_currency` field.",
          "readOnly": true
        },
        "funded_currency": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 3 AN<br><strong>Description: </strong>The ISO numeric currency code of the amount of the transaction funded to the merchant (`amt_funded`). Refer to <a href=\"/docs/references#currency-codes\" target=\"_blank\">Currency Codes</a> for a list of currency codes.",
          "readOnly": true
        },
        "pg_id": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 32 AN<br><strong>Description: </strong>The Payment Gateway ID (PG ID), a 32-byte unique identifier generated by the payment gateway, returned in all valid responses to Payment Gateway transactions.",
          "readOnly": true
        },
        "merch_ref_num": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 128 AN<br><strong>Description: </strong>A merchant-provided reference value that will be stored with the transaction and included with the transaction data reported in Merchant Manager. This value will also be attached to any lifecycle transactions (e.g. retrieval requests and chargebacks) that may occur.",
          "readOnly": true
        },
        "acq_reference_number": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 11 N<br><strong>Description: </strong>The acquirer reference number, an 11-digit number generated by the product initiating the transaction. This is a unique number that both the acquirer and the issuer can use to identify a transaction. For chargeback adjustments, the acquirer reference number is used as the deposit reference number.",
          "readOnly": true
        },
        "auth_rrn": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 12 AN<br><strong>Description: </strong>The authorization Retrieval Reference Number (RRN), a unique identifier assigned by the acquirer to an authorization.",
          "readOnly": true
        },
        "auth_tran_id": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 15 AN<br><strong>Description: </strong>The authorization transaction ID, a unique identifier returned by the issuing bank for an electronically authorized transaction.",
          "readOnly": true
        }
      }
    }
  }
}