{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/qualpay/json-schema/qualpay-pgapi-transaction-response-schema.json",
  "title": "PGApiTransactionResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/qualpay-payment-gateway-api-openapi.yml#/components/schemas/PGApiTransactionResponse",
  "type": "object",
  "properties": {
    "merchant_advice_code": {
      "type": "string",
      "description": "<strong>Format: </strong>Fixed length, 4 AN<br><strong>Description: </strong>Recurring transaction advice for Mastercard authorizations.  Refer to <a href=\"/docs/test-conventions#mastercard-merchant-advice-codes\" target=\"_blank\">Mastercard Merchant Advice Codes</a> for possible values.",
      "readOnly": true
    },
    "pg_id": {
      "type": "string",
      "description": "<strong>Format: </strong>Fixed length, 32 AN<br><strong>Description: </strong>32-byte unique identifier generated by the payment gateway, returned in all valid responses."
    },
    "rcode": {
      "type": "string",
      "description": "<strong>Format: </strong>Fixed length, 3 AN<br><strong>Description: </strong>Response code from the payment gateway. `000` indicates success. Refer to <a href=\"/docs/api-conventions#payment-gateway-api-response-codes\" target=\"_blank\">Payment Gateway Response Codes</a> for the entire list of Payment Gateway response codes.",
      "readOnly": true
    },
    "rmsg": {
      "type": "string",
      "description": "<strong>Format: </strong>Variable length<br><strong>Description: </strong>Response text from the payment gateway.",
      "readOnly": true
    },
    "card_id": {
      "type": "string",
      "description": "<strong>Format: </strong>Fixed length, 32 AN<br><strong>Description: </strong>The 32-byte value returned for a successful tokenize request or when a transaction requests tokenization of the cardholder's data.",
      "readOnly": true
    },
    "auth_code": {
      "type": "string",
      "description": "<strong>Format: </strong>Fixed length, 6 AN<br><strong>Description: </strong>The card issuer authorization code returned for a successful authorization request. The `auth_code` will not appear in the payment gateway response for sales on accounts that are not net-new because those accounts have already been validated.",
      "readOnly": true
    },
    "auth_avs_result": {
      "type": "string",
      "description": "<strong>Format: </strong>Fixed length, 1 AN<br><strong>Description: </strong>Address Verification Service result from card issuer (if `avs_zip` and optionally `avs_address` were provided in the request). Refer to <a href=\"/docs/api-conventions#payment-result-codes-for-avs\" target=\"_blank\">Payment Result Codes for AVS</a> for possible values.",
      "readOnly": true
    },
    "auth_cvv2_result": {
      "type": "string",
      "description": "<strong>Format: </strong>Fixed length, 1 AN<br><strong>Description: </strong>CVV2 result from card issuer (if CVV2 data was sent in the request). Refer to <a href=\"/docs/api-conventions#payment-result-codes-for-cvv2\" target=\"_blank\">Payment Result Codes for CVV2</a> for possible values.",
      "readOnly": true
    },
    "echo_fields": {
      "type": "string",
      "description": "<strong>Format: </strong>Variable length<br><strong>Description: </strong>Data that was provided in `echo_fields` in the request.",
      "readOnly": true
    },
    "amt_tran": {
      "type": "number",
      "format": "double",
      "description": "<strong>Format: </strong>Variable length, up to 12,2 N<br><strong>Description: </strong>Transaction amount, returned only on partial approvals.",
      "readOnly": true
    },
    "amt_tran_fee": {
      "type": "number",
      "description": "<strong>Format: </strong>Variable length, up to 8,2 N<br><strong>Description: </strong>Amount of transaction fee, returned only if the requested/expected amount was not possible.",
      "format": "double"
    },
    "type_tran_fee": {
      "type": "string",
      "description": "<strong>Format: </strong>Variable length<br><strong>Description: </strong>Describes the type of amt_tran_fee, if it has a value.",
      "readOnly": true
    }
  }
}