{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quickbooks/json-schema/quickbooks-billpaymentrequest-schema.json",
  "title": "billpaymentrequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quickbooks-billpayment-api-openapi.yml#/components/schemas/billpaymentrequest",
  "type": "object",
  "properties": {
    "VendorRef": {
      "allOf": [
        {
          "$ref": "#/$defs/referencetype"
        }
      ],
      "description": "Reference to the vendor for this transaction.",
      "x-intuit-required": "Required",
      "x-intuit-filterable": true,
      "x-intuit-sortable": true
    },
    "CurrencyRef": {
      "type": "object",
      "x-intuit-type": "CurrencyRefType",
      "description": "Reference to the currency in which all amounts on the associated transaction are expressed. This must be defined if multicurrency is enabled for the company.\n\nMulticurrency is enabled for the company if Preferences.MultiCurrencyEnabled is set to true. Read more about multicurrency support here. Required if multicurrency is enabled for the company.",
      "x-intuit-required": "Conditionally required"
    },
    "TotalAmt": {
      "type": "number",
      "description": "Indicates the total amount of the associated with this payment. This includes the total of all the payments from the BillPayment Details.",
      "x-intuit-required": "Required",
      "x-intuit-filterable": true,
      "x-intuit-sortable": true
    },
    "Line": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/line"
      },
      "description": "Individual line items representing zero or more Bill, VendorCredit, and JournalEntry objects linked to this BillPayment object. Valid Line types include:\n\n LinkedTxnLine:",
      "x-intuit-required": "Required"
    },
    "PayType": {
      "type": "string",
      "description": "The payment type.  Valid values include: Check, CreditCard",
      "x-intuit-required": "Required"
    },
    "CreditCardPayment": {
      "allOf": [
        {
          "$ref": "#/$defs/billpaymentcreditcard"
        }
      ],
      "description": "Information about a credit card payment for the transaction. Not applicable to Estimate and SalesOrder. \nRequired when PayType is CreditCard.",
      "x-intuit-required": "Conditionally required",
      "x-intuit-filterable": true,
      "x-intuit-sortable": true
    },
    "CheckPayment": {
      "allOf": [
        {
          "$ref": "#/$defs/billpaymentcheck"
        }
      ],
      "description": "Reference to the vendor for this transaction.\nRequired when PayType is Check.",
      "x-intuit-required": "Conditionally required"
    }
  },
  "required": [
    "Line",
    "PayType",
    "TotalAmt",
    "VendorRef"
  ],
  "$defs": {
    "billpaymentcheck": {
      "type": "object",
      "title": "billpaymentcheck",
      "properties": {
        "PrintStatus": {
          "type": "string",
          "description": "NeedToPrint\nPrinting status of the invoice.\nValid values:\nNotSet,\nNeedToPrint,\nPrintComplete.",
          "x-intuit-required": "Optional",
          "x-intuit-default": "NeedToPrint"
        },
        "BankAccountRef": {
          "allOf": [
            {
              "$ref": "#/$defs/referencetype"
            }
          ],
          "description": "Reference to the bank account. Query the Account name list resource to determine the appropriate Account object for this reference. Use Account.Id and Account.Name from that object for APAccountRef.value and APAccountRef.name, respectively. The specified account must have Account.AccountType set to Bank and Account.AccountSubType set to Checking.",
          "x-intuit-required": "Required",
          "x-intuit-filterable": true,
          "x-intuit-sortable": true
        }
      },
      "required": [
        "BankAccountRef"
      ]
    },
    "billpaymentcreditcard": {
      "type": "object",
      "title": "billpaymentcreditcard",
      "properties": {
        "CCAccountRef": {
          "allOf": [
            {
              "$ref": "#/$defs/referencetype"
            }
          ],
          "description": "Reference to the credit card account. Query the Account name list resource to determine the appropriate Account object for this reference. Use Account.Id and Account.Name from that object for CCAccountRef.value and CCAccountRef.name, respectively. The specified account must have Account.AccountType set to Credit Card and Account.AccountSubType set to CreditCard.\nInject with data only if the payment was transacted through Intuit Payments API.",
          "x-intuit-required": "Required",
          "x-intuit-filterable": true,
          "x-intuit-sortable": true
        }
      },
      "required": [
        "CCAccountRef"
      ]
    },
    "line": {
      "type": "object",
      "title": "line",
      "properties": {
        "Received": {
          "type": "string",
          "description": "Supported for Purchase Order only. The amount/quantity received of the line, which depends on the type of the line. It can represent the received amount or received quantity based on the line type detail. Applies to existing and new entities."
        },
        "LinkedTxn": {
          "type": "array",
          "items": {},
          "description": "Transaction to which the current entity is related. For example, an invoice line may link to a sales order or estimate.",
          "x-intuit-required": "Optional"
        },
        "Description": {
          "type": "string",
          "description": "Free form text description of the line item that appears in the printed record.",
          "x-intuit-required": "Optional"
        },
        "ProjectRef": {
          "allOf": [
            {
              "$ref": "#/$defs/referencetype"
            }
          ],
          "description": "Reference to the Project ID associated with this transaction.",
          "x-intuit-required": "Conditionally required"
        },
        "LineNum": {
          "type": "number",
          "description": "Specifies the position of the line in the collection of transaction lines. Positive integer",
          "x-intuit-required": "Optional"
        },
        "Amount": {
          "type": "number",
          "description": "The amount of the line item.",
          "x-intuit-required": "Required"
        },
        "Id": {
          "type": "string",
          "description": "The Id of the line item. Its use in requests is as folllows:\nIf\nIdis greater than zero and exists for the company, the request is considered an update operation for a line item.\n\nIf no\nIdis provided, the\nIdprovided is less than or equal to zero, or the\nIdprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.\n\nAvailable in all objects that use lines and support the update operation.",
          "x-intuit-required": "Required for update"
        }
      },
      "required": [
        "Amount"
      ]
    },
    "referencetype": {
      "type": "object",
      "title": "referencetype",
      "properties": {
        "name": {
          "type": "string",
          "description": "An identifying name for the object being referenced by value and is derived from the field that holds the common name of that object. This varies by context and specific type of object referenced. For example, references to a Customer object use Customer.DisplayName to populate this field. Optionally returned in responses, implementation dependent.",
          "x-intuit-required": "Optional"
        },
        "value": {
          "type": "string",
          "description": "The ID for the referenced object as found in the Id field of the object payload. The context is set by the type of reference and is specific to the QuickBooks company file.",
          "x-intuit-required": "Required"
        }
      },
      "required": [
        "value"
      ]
    }
  }
}