{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/qualpay/json-schema/qualpay-checkout-link-response-schema.json",
  "title": "CheckoutLinkResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/qualpay-checkout-api-openapi.yml#/components/schemas/CheckoutLinkResponse",
  "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/CheckoutLink"
    }
  },
  "$defs": {
    "CheckoutLink": {
      "type": "object",
      "properties": {
        "checkout_id": {
          "type": "string",
          "description": "<strong>Format: </strong>Fixed length, 32 AN<br><strong>Description: </strong>A unique identifier that is generated when a Checkout record is created. It can be stored as a reference to the checkout and used to pull payment details."
        },
        "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."
        },
        "merchant_id": {
          "type": "integer",
          "description": "<strong>Format: </strong>Variable length, up to 20 N<br><strong>Description: </strong>The unique ID assigned to a merchant.",
          "format": "int64"
        },
        "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."
        },
        "amt_tran": {
          "type": "number",
          "description": "<strong>Format: </strong>Variable length, up to 12,2 N<br><strong>Description: </strong>Transaction amount from the request message.",
          "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 Checkout 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\" target=\"_blank\">Country Codes</a> for a list of currency codes."
        },
        "db_timestamp": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length AN<br><strong>Description: </strong>The request creation timestamp. "
        },
        "expiry_time": {
          "type": "string",
          "description": "<strong>Format: </strong>Variable length AN<br><strong>Default: </strong>The timestamp of when the `checkout_link` will expire.  A link will expire once the complete payment is made or if the current date is past the expiry time.  Once a link expires, redirects to the link will be forwarded to your failure URL, if provided, or to the Checkout error page if a failure URL is not provided. "
        }
      }
    }
  }
}