{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/qualpay/json-schema/qualpay-checkout-response-schema.json",
  "title": "CheckoutResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/qualpay-checkout-api-openapi.yml#/components/schemas/CheckoutResponse",
  "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
    },
    "data": {
      "$ref": "#/$defs/Checkout"
    }
  },
  "$defs": {
    "BillingCard": {
      "type": "object",
      "properties": {
        "card_number": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 16 AN<br><strong>Description: </strong>The masked card number. "
        },
        "exp_date": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 4 N, MMYY format<br><strong>Description: </strong>The card's expiration date. "
        },
        "card_id": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 32 AN<br><strong>Description: </strong>The card ID received from a tokenization request."
        },
        "billing_first_name": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>Billing first name. "
        },
        "billing_last_name": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>Billing last name. "
        },
        "billing_firm_name": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 64 AN<br><strong>Description: </strong>Business name on billing card, if applicable. "
        },
        "billing_email": {
          "type": "array",
          "description": "<strong>Format: </strong>Variable length, up to 128 AN<br><strong>Description: </strong>An array of billing email addresses.",
          "items": {
            "type": "string"
          }
        },
        "billing_addr1": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 128 AN<br><strong>Description: </strong>Billing street address. This address will also be used for AVS verification if AVS verification is enabled. "
        },
        "billing_addr2": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 128 AN<br><strong>Description: </strong>Billing address line 2."
        },
        "billing_city": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 64 AN<br><strong>Description: </strong>Billing city."
        },
        "billing_state": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 3 AN<br><strong>Description: </strong>Billing state."
        },
        "billing_zip": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 10 AN<br><strong>Description: </strong>Billing zip code."
        },
        "billing_zip4": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 4 N<br><strong>Description: </strong>Billing zip+4 code if applicable."
        },
        "billing_country": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 128 AN<br><strong>Description: </strong>Billing country."
        },
        "billing_country_code": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 3 AN<br><strong>Description: </strong>The ISO numeric country code for the billing address. Refer to <a href=\"/docs/references\" target=\"_blank\">Country Codes</a> for a list of country codes."
        },
        "primary": {
          "type": "boolean",
          "description": "<strong>Description: </strong>This is `true` if this is the default card. The default card will be used in recurring billing payments.<br><strong>Default: </strong>false"
        },
        "card_type": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 2 AN<br><strong>Description: </strong>The card type, a value derived from the card number. Refer to <a href=\"/docs/api-conventions#card-types\" target=\"_blank\">Card Types</a> for a list of card types. ",
          "enum": [
            "VS",
            "MC",
            "AM",
            "DS",
            "JC",
            "PP",
            "AP"
          ]
        },
        "verified_date": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length<br><strong>Description: </strong>The date the card was last successfully verified.",
          "readOnly": true
        }
      }
    },
    "Checkout": {
      "required": [
        "amt_tran"
      ],
      "type": "object",
      "properties": {
        "checkout_id": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 32 AN<br><strong>Description: </strong>A unique identifier that identifies a checkout."
        },
        "checkout_link": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 128 AN<br><strong>Description: </strong>A redirect link that will direct a customer to the payment page. This link is unique for each checkout."
        },
        "db_timestamp": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length AN<br><strong>Description: </strong>The checkout resource creation timestamp. "
        },
        "merchant_id": {
          "type": "integer",
          "description": "<strong>Format: </strong>Variable length, up to 16 AN<br><strong>Description: </strong>The unique ID assigned to a merchant.",
          "format": "int64"
        },
        "expiry_time": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length AN<br><strong>Description: </strong>The expiration timestamp for the `checkout_link`. Once expired, the link cannot be used to make a payment.  "
        },
        "amt_tran": {
          "type": "number",
          "description": "<strong>Format: </strong>Variable length, up to 12,2 AN<br><strong>Description: </strong>The total amount of the transaction including sales tax (if applicable).",
          "format": "double"
        },
        "amt_balance": {
          "type": "number",
          "description": "<strong>Format: </strong>Variable length, up to 12,2 N<br><strong>Description: </strong>Amount pending. Valid only for partial payments. If the amount is paid in full, `amt_balance` will be 0.",
          "format": "double"
        },
        "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. If the `profile_id` field is provided, this field will be overridden by the profile’s currency code."
        },
        "purchase_id": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 25 AN<br><strong>Description: </strong>The purchase identifier (also referred to as the invoice number) generated by the merchant."
        },
        "profile_id": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 20 AN<br><strong>Description: </strong>The unique profile ID that will be used during a payment gateway request. "
        },
        "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."
        },
        "customer_first_name": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>The customer's first name. "
        },
        "customer_last_name": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>The customer's last name."
        },
        "customer_email": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 64 AN<br><strong>Description: </strong>The customer's email address."
        },
        "customer_phone": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 16 AN<br><strong>Description: </strong>The customer's phone number with country code."
        },
        "billing_addr1": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 64 AN<br><strong>Description: </strong>The billing address of the cardholder."
        },
        "billing_state": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 2 AN<br><strong>Description: </strong>The billing state of the cardholder."
        },
        "billing_city": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 64 AN<br><strong>Description: </strong>The billing city of the cardholder."
        },
        "billing_zip": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 10 AN<br><strong>Description: </strong>The billing zip code of the cardholder."
        },
        "customer_id": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>The customer ID associated with this transaction."
        },
        "preferences": {
          "$ref": "#/$defs/CheckoutPreferences"
        },
        "transactions": {
          "type": "array",
          "description": "An array of responses from the payment gateway. Each element of the array represents a transaction for this Checkout. In addition, if subscribed to a Checkout webhook, the transaction object is also posted to the webhook URL once a Checkout payment is made.",
          "items": {
            "$ref": "#/$defs/GatewayResponse"
          }
        },
        "subscription": {
          "$ref": "#/$defs/CheckoutSubscription"
        }
      }
    },
    "CheckoutCustomer": {
      "required": [
        "billing_zip",
        "customer_firm_name",
        "customer_phone"
      ],
      "type": "object",
      "properties": {
        "customer_first_name": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>Customer's first name."
        },
        "customer_last_name": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>Customer's last name."
        },
        "customer_email": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 64 AN<br><strong>Description: </strong>Customer's email address."
        },
        "billing_addr1": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 128 AN<br><strong>Description: </strong>Billing street address. This address will also be used for AVS verification if AVS verification is enabled. "
        },
        "billing_addr2": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 128 AN<br><strong>Description: </strong>Billing apartment/suite number."
        },
        "billing_city": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>Billing city."
        },
        "billing_state": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 3 AN<br><strong>Description: </strong>Billing state."
        },
        "billing_country": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 3 AN<br><strong>Description: </strong>Billing country."
        },
        "billing_zip": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 10 AN<br><strong>Description: </strong>Billing zip code. This zip code will be used for AVS verification if AVS verification is enabled."
        },
        "customer_phone": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 16 N<br><strong>Description: </strong>The customer's phone number with country code."
        },
        "customer_firm_name": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>The customer's firm name."
        }
      }
    },
    "CheckoutOptionFields": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>The option field's label on the Checkout page."
        },
        "desc": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>The option field's description on the Checkout page."
        },
        "value": {
          "type": "array",
          "description": "<strong>Description: </strong>The option field's provided values that appear on the Checkout page.",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "CheckoutPreferences": {
      "type": "object",
      "properties": {
        "success_url": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 128 AN<br><strong>Description: </strong>The URL to which the customer will be directed after a successful payment. If not defined in the API or in the Checkout settings page, the customer will be directed to the default receipt page. Must be formatted as `http://www.domain.com/` or `https://www.domain.com/`."
        },
        "failure_url": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 128 AN<br><strong>Description: </strong>The URL to which the customer will be directed if a transaction is declined. If not defined in the API or in the Checkout settings page, the customer will be directed to the default receipt page. Must be formatted as `http://www.domain.com/` or `https://www.domain.com/`."
        },
        "allow_partial_payments": {
          "type": "boolean",
          "description": "<strong>Description: </strong>If set to `true`, the customer can make changes to the transaction amount."
        },
        "allow_save_card": {
          "type": "boolean",
          "description": "<strong>Description: </strong>Applicable only for Checkouts associated with a customer. If set to `true`, the Checkout page will display the 'Save Card' checkbox that lets the customer decide if the card information can be saved. If set to `false`, the 'Save Card' box is not displayed and the customer card information is always updated.<br><strong>Default: </strong>false"
        },
        "require_save_card": {
          "type": "boolean",
          "description": "<strong>Description: </strong> Applicable only for Checkouts associated with a customer ID where `allow_save_card` is set to `true`. If `require_save_card` is set to `true`, the Checkout page will display the 'Save Card' checkbox set to `true`, and the customer payment information will always be saved. If `require_save_card` is undefined or `false` and `allow_save_card` is set to `true`, the customer is allowed to decide if the card information can be saved.<br><strong>Default: </strong>false"
        },
        "show_saved_payment_methods": {
          "type": "boolean",
          "description": "<strong>Description: </strong> Applicable only for Checkouts associated with a customer ID. If `show_saved_payment_methods` is set to `true`, the Checkout page will display the stored payment methods.<br><strong>Default: </strong>false"
        },
        "card_type_order": {
          "type": "array",
          "description": "<strong>Description: </strong> Applicable only for Checkouts associated with a customer ID where `show_saved_payment_methods` is set to `true`. If `card_type_order` is specified, the Checkout page will display the stored payment methods according to the order defined by the provided array.<br><strong>Default: </strong>[]",
          "items": {
            "type": "string"
          }
        },
        "card_id_order": {
          "type": "array",
          "description": "<strong>Description: </strong> Applicable only for Checkouts associated with a customer ID where `show_saved_payment_methods` is set to `true`. If `card_id_order` is specified, the Checkout page will display the stored payment methods according to the order defined by the provided array. This option will override `card_type_order` if both are present. <br><strong>Default: </strong>[]",
          "items": {
            "type": "string"
          }
        },
        "allow_ach_payment": {
          "type": "boolean",
          "description": "<strong>Description: </strong>Applicable only if your merchant account is configured to take ACH payments. If set to `true`, the Checkout page will present ACH as one of the payment modes to the customer. <br><strong>Default: </strong>false"
        },
        "email_receipt": {
          "type": "boolean",
          "description": "<strong>Description: </strong>If set to `true` and the customer's email address is provided, a receipt is sent to the customer. "
        },
        "request_type": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 10 AN<br><strong>Description: </strong>Identifies the type of request when the customer submits the payment data on the Checkout page.  ",
          "enum": [
            "auth",
            "sale"
          ]
        },
        "expire_in_secs": {
          "type": "integer",
          "description": "<strong>Format: </strong>Variable length, up to 7 N<br><strong>Description: </strong>The time period, in seconds, for which the `checkout_link` will be valid. The minimum value for this field is `900`  (900 seconds, or 5 minutes),  the maximum value is `7776000` (90 days).",
          "format": "int32"
        },
        "show_cvv": {
          "type": "boolean",
          "description": "<strong>Description: </strong>If set to `true`, the Checkout page will show the CVV field to the customer. <br><strong>Default: </strong>false"
        },
        "require_cvv": {
          "type": "boolean",
          "description": "<strong>Description: </strong>Applicable only if `show_cvv` is `true`. If set to `true`, the Checkout page will make the CVV field required. <br><strong>Default: </strong>false"
        },
        "show_merch_ref_num": {
          "type": "boolean",
          "description": "<strong>Description: </strong>If set to `true`, the Checkout page will show the merchant reference number field.<br><strong>Default: </strong>false"
        },
        "merch_ref_num_label": {
          "type": "string",
          "description": "<strong>Description: </strong>Used to override the default label for the merchant reference number field.<br><strong>Default: </strong>Merchant Reference Number"
        }
      }
    },
    "CheckoutSubscription": {
      "type": "object",
      "properties": {
        "subscription_id": {
          "type": "integer",
          "description": "<strong>Format: </strong>Variable length, up to 10 N<br><strong>Description: </strong>The generated ID that identifies a subscription. Save this ID to manage the subscription. ",
          "format": "int64"
        },
        "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"
        },
        "customer_id": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>The customer ID of the subscriber."
        },
        "card_id": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 32 AN<br><strong>Description: </strong>The payment method that will be used for the recurring charge. If empty, the recurring charge will be made using the customer's primary payment method. "
        },
        "status": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 1 AN<br><strong>Description: </strong> Status of the subscription. The following are possible statuses: <ul><li>`A` - Active</li> <li>`D` - Complete</li> <li>`P` - Paused</li> <li>`C` - Canceled</li> <li>`S` - Suspended</li></ul>",
          "enum": [
            "A",
            "D",
            "P",
            "C",
            "S"
          ]
        },
        "profile_id": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 20 AN<br><strong>Description: </strong>The profile ID to be used in payment gateway requests."
        },
        "subscription_on_plan": {
          "type": "boolean",
          "description": "<strong>Description: </strong>`true` for on-plan subscriptions, `false` for off-plan subscriptions."
        },
        "plan_id": {
          "type": "integer",
          "description": "<strong>Format: </strong>Variable length, up to 10 N<br><strong>Description: </strong>The plan ID of the recurring plan associated with this subscription. `0` if this is an off-plan subscription. ",
          "format": "int64"
        },
        "plan_name": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 64 AN<br><strong>Description: </strong>A name assigned by the merchant to the plan."
        },
        "plan_code": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 16 AN<br><strong>Description: </strong>A code assigned by the merchant to the plan."
        },
        "plan_desc": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length AN<br><strong>Description: </strong>A short description of the plan. "
        },
        "plan_frequency": {
          "type": "integer",
          "description": "<strong>Format: </strong>Fixed length, 1 N<br><strong>Description: </strong>This field identifies the frequency of billing. Use one of the following codes for frequency: <ul> <li>`0` - Weekly</li><li>`1` - Bi-Weekly</li><li>`3` - Monthly</li><li>`4` - Quarterly</li> <li>`5` - Bi-Annually</li><li>`6` - Annually</li><li>`7` - Daily</li></ul>",
          "format": "int32"
        },
        "plan_duration": {
          "type": "integer",
          "description": "<strong>Format: </strong>Variable length, up to 4 N<br><strong>Description: </strong> The number of billing cycles in the recurring transaction. `-1` commands to bill until canceled.",
          "format": "int32"
        },
        "interval": {
          "type": "integer",
          "description": "<strong>Format: </strong>Variable length, up to 2 N<br><strong>Description: </strong> Number of months in a subscription cycle. Applicable only for monthly frequency.",
          "format": "int32"
        },
        "customer_first_name": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>First name of the subscriber."
        },
        "customer_last_name": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>Last name of the subscriber."
        },
        "date_start": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 10 AN, YYYY-MM-DD format<br><strong>Description: </strong>Start date of the subscription. "
        },
        "date_next": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 10 AN, YYYY-MM-DD format<br><strong>Description: </strong>Next billing date of subscription. This field will be empty for canceled and completed subscriptions."
        },
        "date_end": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 10 AN, YYYY-MM-DD format<br><strong>Description: </strong>Date the subscription will end. "
        },
        "amt_setup": {
          "type": "number",
          "description": "<strong>Format: </strong>Variable length, up to 10,2 N<br><strong>Description: </strong>One-time fee amount. This fee will be charged when a subscription is added."
        },
        "prorate_date_start": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 10 AN, YYYY-MM-DD format<br><strong>Description: </strong>The date the customer will be billed the prorated amount. For prorated subscriptions only."
        },
        "prorate_amt": {
          "type": "number",
          "description": "<strong>Format: </strong>Variable length, up to 10,2 N<br><strong>Description: </strong>The prorated amount. (For prorated subscriptions only.)"
        },
        "trial_date_start": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 10 AN, YYYY-MM-DD format<br><strong>Description: </strong>The start date of the trial period.  Applicable only for subscriptions that include a trial period."
        },
        "trial_date_end": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 10 AN, YYYY-MM-DD format<br><strong>Description: </strong>The end date of the trial period.  Applicable only for subscriptions that include a trial period."
        },
        "trial_amt": {
          "type": "number",
          "description": "<strong>Format: </strong>Variable length, up to 10,2 N<br><strong>Description: </strong>The amount billed during the trial period.  Applicable only for subscriptions that include a trial period."
        },
        "recur_date_start": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 10 AN, YYYY-MM-DD format<br><strong>Description: </strong>The date the regular billing cycle will start."
        },
        "recur_date_end": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 10 AN, YYYY-MM-DD format<br><strong>Description: </strong>The date the regular billing cycle will end. "
        },
        "recur_amt": {
          "type": "number",
          "description": "<strong>Format: </strong>Variable length, up to 10,2 N<br><strong>Description: </strong>Regular billing amount."
        },
        "customer": {
          "$ref": "#/$defs/CustomerVault"
        },
        "tran_currency": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 3 AN<br><strong>Description: </strong>The ISO numeric currency code. 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 possible values.<br><strong>Default: </strong>840"
        },
        "option_info": {
          "$ref": "#/$defs/CheckoutOptionFields"
        },
        "recurring": {
          "type": "boolean",
          "description": "<strong>Description: </strong>`true` for recurring Checkout, `false` for non-recurring Checkout."
        }
      }
    },
    "CustomerVault": {
      "type": "object",
      "properties": {
        "customer_id": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>Unique ID established by the merchant to identify a customer. The customer ID can be used to add subscriptions through Recurring Billing requests or make payments through Payment Gateway requests. Once established, this ID cannot be updated. This field is case sensitive. Only letters and numbers are allowed."
        },
        "rec_id": {
          "type": "integer",
          "description": "For INTERNAL USE ONLY.",
          "format": "int64"
        },
        "node_id": {
          "type": "integer",
          "description": "<strong>Format: </strong>Variable length, up to 16 N<br><strong>Description: </strong>The merchant ID to which this customer profile belongs.",
          "format": "int64"
        },
        "customer_first_name": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>Customer's first name."
        },
        "customer_last_name": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>Customer's last name."
        },
        "customer_firm_name": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 64 AN<br><strong>Description: </strong>Customer's business name, if applicable. "
        },
        "customer_phone": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 16 AN<br><strong>Description: </strong>Customer's phone number."
        },
        "customer_email": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 64 AN<br><strong>Description: </strong>Customer's email address. "
        },
        "reference_id": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 128 AN<br><strong>Description: </strong>A merchant-provided value that will be stored with the Customer Vault data for merchant reference."
        },
        "comments": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 128 AN<br><strong>Description: </strong>Comments stored with the Customer Vault data."
        },
        "developer_id": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>Used to indicate which company developed the integration, or the name of the solution or system that is connected to us. Suggested usage is `softwareABCv1.0` or `companyXYZv2.0`."
        },
        "primary_card_number": {
          "type": "string",
          "description": "The default card number for this customer."
        },
        "shipping_addresses": {
          "type": "array",
          "description": "<strong>Description: </strong>An array of shipping addresses. ",
          "items": {
            "$ref": "#/$defs/ShippingAddress"
          }
        },
        "billing_cards": {
          "type": "array",
          "description": "<strong>Description: </strong>An array of billing cards. ",
          "items": {
            "$ref": "#/$defs/BillingCard"
          }
        }
      }
    },
    "GatewayResponse": {
      "type": "object",
      "properties": {
        "pg_id": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 16 AN<br><strong>Description: </strong>A generated ID for the Payment Gateway transaction."
        },
        "rcode": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 3 AN<br><strong>Description: </strong>The Payment Gateway response code. Refer to <a href=\"/docs/api-conventions#payment-gateway-api-response-codes\" target=\"_blank\">Payment Gateway Response Codes</a> for possible values."
        },
        "rmsg": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length AN<br><strong>Description: </strong>A short description of the response code. Refer to <a href=\"/docs/api-conventions#payment-gateway-api-response-codes\" target=\"_blank\">Payment Gateway Response Codes</a> for response code descriptions."
        },
        "status": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 8 A<br><strong>Description: </strong>The status of the Payment Gateway transaction.",
          "enum": [
            "Approved",
            "Declined"
          ]
        },
        "auth_code": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 6 AN<br><strong>Description: </strong>The authorization code from the issuer."
        },
        "card_id": {
          "type": "string",
          "description": "<strong>Description: </strong>The `card_id` generated by the system if the customer chooses to save the card. Applicable only for Checkout transactions with a customer ID."
        },
        "card_number": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 16 AN<br><strong>Description: </strong>The masked number of the card used in the transaction. "
        },
        "tran_time": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, in YYYY-MM-DD HH:MM:ss format<br><strong>Description: </strong>The transaction time. All times are in PST (U.S.). "
        },
        "amt_tran": {
          "type": "number",
          "description": "<strong>Format: </strong>Variable length, up to 12,2 N<br><strong>Description: </strong>The transaction amount.",
          "format": "double"
        },
        "amt_tran_fee": {
          "type": "number",
          "description": "<strong>Format: </strong>Variable length, up to 12,2 N<br><strong>Description: </strong>The surcharge fee amount if the transaction includes a surcharge.",
          "format": "double"
        },
        "purchase_id": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 25 AN<br><strong>Description: </strong>The purchase ID of the transaction."
        },
        "cvv2_result": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 1 AN<br><strong>Description: </strong>If a CVV value is sent, the result from the card issuer will be returned in this field. Refer to <a href=\"/docs/api-conventions#payment-result-codes-for-cvv2\" target=\"_blank\">Payment Result Codes for CVV2</a>."
        },
        "avs_result": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 1 AN<br><strong>Description: </strong>If `billing_zip` is sent, the result from the card issuer will be returned in this field. Refer to <a href=\"/docs/api-conventions#payment-result-codes-for-avs\" target=\"_blank\">Payment Result Codes for AVS</a>."
        },
        "duration": {
          "type": "integer",
          "description": "<strong>Format: </strong>Variable length, up to 16 N<br><strong>Description: </strong>The duration of the Payment Gateway request in ms.",
          "format": "int32"
        },
        "http_status": {
          "type": "integer",
          "description": "<strong>Format: </strong>Variable length AN<br><strong>Description: </strong>The HTTP status of the Payment Gateway request.",
          "format": "int32"
        },
        "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"
        },
        "profile_id": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 20 AN<br><strong>Description: </strong>The unique profile ID used in Payment Gateway requests."
        },
        "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."
        },
        "tran_currency": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 3 AN<br><strong>Description: </strong>The ISO numeric currency code for 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."
        },
        "dba_name": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 25 AN<br><strong>Description: </strong>The 'Doing Business As' name associated with the profile."
        },
        "customer_id": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>A unique ID established by the merchant to identify a customer. The customer ID is included in the response if it is sent in the request. "
        },
        "customer": {
          "$ref": "#/$defs/CheckoutCustomer"
        },
        "option_info": {
          "$ref": "#/$defs/CheckoutOptionFields"
        },
        "recurring": {
          "type": "boolean",
          "description": "<strong>Description: </strong>This is `true` for a recurring Checkout. It is `false` for a non-recurring Checkout."
        }
      }
    },
    "ShippingAddress": {
      "type": "object",
      "properties": {
        "shipping_id": {
          "type": "integer",
          "description": "<strong>Format: </strong>Variable length, up to 10 N<br><strong>Description: </strong>Unique ID generated to identify the shipping address for a customer.",
          "format": "int64"
        },
        "shipping_first_name": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>Shipping first name."
        },
        "shipping_last_name": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 32 AN<br><strong>Description: </strong>Shipping last name."
        },
        "shipping_firm_name": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 64 AN<br><strong>Description: </strong>Shipping address business name, if applicable. "
        },
        "shipping_addr1": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 128 AN<br><strong>Description: </strong>Shipping address line 1."
        },
        "shipping_addr2": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 128 AN<br><strong>Description: </strong>Shipping address line 2."
        },
        "shipping_city": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 64 AN<br><strong>Description: </strong>Shipping city."
        },
        "shipping_state": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 3 AN<br><strong>Description: </strong>Shipping state."
        },
        "shipping_zip": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 10 AN<br><strong>Description: </strong>Shipping zip code."
        },
        "shipping_zip4": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 4 N<br><strong>Description: </strong>Shipping zip+4 code, if applicable."
        },
        "shipping_country": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length, up to 128 AN<br><strong>Description: </strong>Shipping country."
        },
        "shipping_country_code": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 3 AN<br><strong>Description: </strong>ISO numeric country code for the shipping address. Refer to <a href=\"/docs/references\" target=\"_blank\">Country Codes</a> for a list of country codes."
        },
        "primary": {
          "type": "boolean",
          "description": "<strong>Description: </strong>If set to `true`, this is the default shipping address. <br><strong>Default: </strong>`false`"
        }
      }
    }
  }
}