{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quickbooks/json-schema/quickbooks-chargerequest-schema.json",
  "title": "chargerequest",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quickbooks-payments-openapi-generated.yml#/components/schemas/chargerequest",
  "type": "object",
  "properties": {
    "Capture": {
      "type": "boolean",
      "description": "Capture flag. Valid values include:\n\n   true  —The charge has been captured.\n\n   false  —The charge is uncaptured and pending authorization.",
      "x-intuit-required": "Optional",
      "x-intuit-default": true
    },
    "Description": {
      "type": "string",
      "description": "Additional text details to be associated with the charge.",
      "x-intuit-required": "Optional"
    },
    "Token": {
      "type": "string",
      "description": "Preferred to specifying card or cardOnFile in order to ensure PCI compliance.\nOpaque representation of the credit card or debit card associated with this charge, as returned by the token endpoint. Applications that access cardholder information using the Payments API are required to follow the payment application data security standard (PA DSS) established by the payment card industry, which specifies how cardholder data must be protected. As such, the token resource provides a programatic way to comply with this standard without having to hold sensitive card information on your own servers.",
      "x-intuit-required": "Required"
    },
    "Currency": {
      "type": "string",
      "description": "Three-letter ISO 4217 currency code representing the currency in which the charge was made.",
      "x-intuit-required": "Required"
    },
    "Amount": {
      "type": "number",
      "description": "Amount of the transaction. Valid values range 0.00 through 99999.99.",
      "x-intuit-required": "Required"
    },
    "Context": {
      "allOf": [
        {
          "$ref": "#/$defs/paymentcontext"
        }
      ],
      "description": "Additional data you wish to store for this transaction.",
      "x-intuit-required": "Required"
    },
    "CardOnFile": {
      "type": "object",
      "x-intuit-type": "CardOnFile",
      "description": "The id for a card that has been previously stored on file. Required if neither  token  nor  card  are specified.",
      "x-intuit-required": "Conditionally Required"
    },
    "Card": {
      "allOf": [
        {
          "$ref": "#/$defs/card"
        }
      ],
      "description": "Token is preferred in order to avoid PCI compliance requirements.\n\nExplicit credit card or debit card details associated with this charge. Required if neither  token  nor  cardOnFile  are specified.",
      "x-intuit-required": "Conditionally Required"
    }
  },
  "required": [
    "Amount",
    "Context",
    "Currency",
    "Token"
  ],
  "$defs": {
    "address": {
      "type": "object",
      "title": "address",
      "properties": {
        "PostalCode": {
          "type": "string",
          "description": "The postal code for the address. For US and Canada, this is the zip code. \n\nRequired if no region is provided.",
          "x-intuit-required": "Conditionally Required"
        },
        "City": {
          "type": "string",
          "description": "The city name for the address.",
          "x-intuit-required": "Optional"
        },
        "StreetAddress": {
          "type": "string",
          "description": "The full street adddress. This may include the house number and street name (CR acceptable).",
          "x-intuit-required": "Optional"
        },
        "Region": {
          "type": "string",
          "description": "Specifies the region within a country. This is the state, province, prefecture, or region name.\n\nFor the US, this is the state name. For Canada, this is the province name.\n\nRequired if no postal code is provided.",
          "x-intuit-required": "Condtionally Required"
        },
        "Country": {
          "type": "string",
          "description": "The ISO-standard country code. Refer to the ISO Country Code List.",
          "x-intuit-required": "Optional"
        }
      }
    },
    "card": {
      "type": "object",
      "title": "card",
      "properties": {
        "Updated": {
          "type": "string",
          "description": "The time the object was last updated. In ISO 8601 date-time format. It appears as YYYY-MM-DDTHH:MM:SSZ.",
          "x-intuit-required": "Conditionally required"
        },
        "Name": {
          "type": "string",
          "description": "The name of the credit or debit card holder, as it appears on the card.",
          "x-intuit-required": "Optional"
        },
        "IsLevel3Eligible": {
          "type": "boolean",
          "description": "Flag set to true if the credit or debit card falls into the L3 eligible Bank Identification Number (BIN) range.",
          "x-intuit-required": "Response Only"
        },
        "Created": {
          "type": "string",
          "description": "The time the object was originally created. In ISO 8601 date-time format. It appears as YYYY-MM-DDTHH:MM:SSZ."
        },
        "Default": {
          "type": "boolean",
          "description": "Indicates if the credit or debit card is the default. When users set a default, the flag is true.\n\nThis is the credit or debit card QuickBooks uses when another isn't specified. \n\nThe flag defaults to false.\n\nWhen a credit or debit card flag is true, all other cards are automatically set to false.",
          "x-intuit-required": "Optional"
        },
        "entityType": {
          "type": "string",
          "description": "The entity or user type the card is associated with. Example values: Customer, Employee, Vendor or Company."
        },
        "CommercialCardCode": {
          "type": "string",
          "description": "A code that indicates if the card is a commercial or corporate card.\n\nThis can be used to track specific business purchases.",
          "x-intuit-required": "Optional"
        },
        "Number": {
          "type": "string",
          "description": "The credit or debit card number.",
          "x-intuit-required": "Required"
        },
        "ExpMonth": {
          "type": "string",
          "description": "The card's two digit expiration month.",
          "x-intuit-required": "Required"
        },
        "CardType": {
          "type": "object",
          "x-intuit-type": "Enumerator",
          "description": "The type of credit or debit card.\n\nValid values:VISA\nMC\nAMEX\nDISC\nDINERS\nJCB",
          "x-intuit-required": "Conditionally required"
        },
        "Address": {
          "allOf": [
            {
              "$ref": "#/$defs/address"
            }
          ],
          "description": "The cardholder's full address.",
          "x-intuit-required": "Optional"
        },
        "ExpYear": {
          "type": "string",
          "description": "The card's four digit expiration year.",
          "x-intuit-required": "Required"
        },
        "entityId": {
          "type": "string",
          "description": "The ID of the entity the card is associated with."
        },
        "IsBusiness": {
          "type": "boolean",
          "description": "This flag is set to true if the credit or debit card is a business card.",
          "x-intuit-required": "Optional"
        },
        "Id": {
          "type": "string",
          "description": "The unique identifier for the card object.",
          "x-intuit-required": "Conditionally required"
        },
        "Cvc": {
          "type": "string",
          "description": "The Card Verification Code (CVC) on the back of the card.\n\n This can be up to four digits. The number varies by card provider. \n\n For security purposes, the CVC value can't be stored. It must be supplied in transaction requests and then erased.",
          "x-intuit-required": "Required"
        },
        "zeroDollarVerification": {
          "allOf": [
            {
              "$ref": "#/$defs/zerodollarverification"
            }
          ],
          "description": "Stores card verification information.",
          "x-intuit-required": "Response Only"
        }
      },
      "required": [
        "Cvc",
        "ExpMonth",
        "ExpYear",
        "Number"
      ]
    },
    "deviceinfo": {
      "type": "object",
      "title": "deviceinfo",
      "properties": {
        "MacAddress": {
          "type": "string",
          "description": "The device's media access control (MAC) address.",
          "x-intuit-required": "Optional"
        },
        "Encrypted": {
          "type": "boolean",
          "description": "The device's encryption status.",
          "x-intuit-required": "Optional"
        },
        "IpAddress": {
          "type": "string",
          "description": "The device's IP address.",
          "x-intuit-required": "Optional"
        },
        "Longitude": {
          "type": "string",
          "description": "The device's longitude coordinates.",
          "x-intuit-required": "Optional"
        },
        "PhoneNumber": {
          "type": "string",
          "description": "The device's phone number (if available).",
          "x-intuit-required": "Optional"
        },
        "Latitude": {
          "type": "string",
          "description": "The device's latitude coordinates.",
          "x-intuit-required": "Optional"
        },
        "Type": {
          "type": "string",
          "description": "The type of device.",
          "x-intuit-required": "Optional"
        },
        "Id": {
          "type": "string",
          "description": "The device's ID.",
          "x-intuit-required": "Conditionally required"
        }
      }
    },
    "lodging": {
      "type": "object",
      "title": "lodging",
      "properties": {
        "LengthOfStay": {
          "type": "number",
          "description": "The anticipated, actual, or icremental length of stay, depending on the transaction type."
        },
        "CheckInDate": {
          "type": "string",
          "format": "date",
          "description": "The date of actual or anticipated check-in, depending on the transaction type.\n\nThe check-in date can't be later than the check-out date. The date format is dates is CCCC-MM-DD where: CCCC: The four-digit year\nMM: The two digit month\nDD: The Two digit day\n For example: June 5, 2019 is represented as 2019-06-05."
        },
        "RoomRate": {
          "type": "number",
          "description": "The nightly rate for the room. \n\nThis field is only relevant for lodging apps. It should represent the nightly rate for the room as quoted at the time of reservation, including the taxes. If the reservation spans multiple days, provide the average rate for those days."
        },
        "SpecialProgram": {
          "type": "object",
          "x-intuit-type": "SpecialProgramEnumorator",
          "description": "Indicates if the current charge is a normal room charge, an advance deposit, and so forth.\n\nThis field is only relevant for lodging apps. It indicates the reason for the charge.\n\nValid values: AdvanceDeposit\nAssuredReservation\nDelayedCharge\nExpressService\nNormalCharge\nNoShowCharge"
        },
        "ChargeType": {
          "type": "object",
          "x-intuit-type": "ChargeTypeEnumerator",
          "description": "Indicates the specific lodging or non-lodging service charged to the customer.\n\nValid values: ConventionFees\nGiftShop\nGolf\nHealthClub\nHotel\nRestaurant\nSalon\nTennis"
        },
        "FolioID": {
          "type": "string",
          "description": "The unique ID that identifies the bill for a particular guest's stay. This value can be assigned by a hotel or automatically by lodging apps."
        },
        "ExtraCharges": {
          "type": "object",
          "x-intuit-type": "Array of strings",
          "description": "Indicates if the current charge contains one or more additional charges. \n\nThis field is only relevant for lodging apps. It indicates the types of extra charges billed to the customer. They usually apply after a customer checks out. \n\nValid values: GiftShop\nLaundry\nMinibar\nRestaurant\nTelephone\nOther"
        },
        "CheckOutDate": {
          "type": "string",
          "format": "date",
          "description": "The date of actual or anticipated check-out, depending on the transaction type.\n\nThe check-out date must always be later than the check-in date. The date format is dates is CCCC-MM-DD where: CCCC: The four-digit year\nMM: The two digit month\nDD: The Two digit day\n For example: June 5, 2019 is represented as 2019-06-05."
        },
        "TotalAuthAmount": {
          "type": "number",
          "description": "The total amount authorized by the card issuer for the current credit card and the current FolioID.\n\nIt refers to the total amount authorized for the particular card and folio and includes tax and other applicable charges. Apps are responsible for keeping a running total of authorizations and submitting the correct amount in this field."
        }
      }
    },
    "paymentcontext": {
      "type": "object",
      "title": "paymentcontext",
      "properties": {
        "Restaurant": {
          "allOf": [
            {
              "$ref": "#/$defs/restaurant"
            }
          ],
          "description": "For restaurant transactions, provides details about the restaurant."
        },
        "Mobile": {
          "type": "boolean",
          "description": "Flag that indicates if the charge was made from a mobile device.\n\n The card can be keyed, swiped, dipped or tapped on the merchant's POS device.",
          "x-intuit-required": "Required",
          "x-intuit-default": false
        },
        "Tax": {
          "type": "number",
          "description": "The sales tax required for commercial card processing.",
          "x-intuit-required": "Optional"
        },
        "IsEcommerce": {
          "type": "boolean",
          "description": "Flag that indicates if the charge is an eCommerce transaction made over the web.",
          "x-intuit-required": "Required",
          "x-intuit-default": false
        },
        "DeviceInfo": {
          "allOf": [
            {
              "$ref": "#/$defs/deviceinfo"
            }
          ],
          "description": "Provides info about the device used to swipe or take payments.",
          "x-intuit-required": "Optional"
        },
        "Lodging": {
          "allOf": [
            {
              "$ref": "#/$defs/lodging"
            }
          ],
          "description": "For lodging transactions, provides details about the lodging."
        },
        "Recurring": {
          "type": "boolean",
          "description": "This is set to true if the charge is recurring. Note: This value ignored for capture and refund requests.",
          "x-intuit-required": "Optional",
          "x-intuit-default": false
        }
      },
      "required": [
        "IsEcommerce",
        "Mobile"
      ]
    },
    "restaurant": {
      "type": "object",
      "title": "restaurant",
      "properties": {
        "BeverageAmount": {
          "type": "number",
          "description": "The amount of the current charge attributed to beverages."
        },
        "ServerID": {
          "type": "string",
          "description": "The 2-digit string that identifies the individual server responsible for the transaction. Restaurant assign their own identifiers to their servers."
        },
        "TaxAmount": {
          "type": "number",
          "description": "The amount of the current charge attributed to tax."
        },
        "FoodAmount": {
          "type": "number",
          "description": "The amount of the current charge attributed to food."
        },
        "TipAmount": {
          "type": "number",
          "description": "The amount of the current charge attributed to tips."
        }
      }
    },
    "zerodollarverification": {
      "type": "object",
      "title": "zerodollarverification",
      "properties": {
        "Status": {
          "type": "string",
          "description": "Denotes the verification status of the credit or debit card."
        },
        "TransactionId": {
          "type": "string",
          "description": "The ID of the transaction (if returned) from the verification service.",
          "x-intuit-required": "Optional"
        },
        "Type": {
          "type": "string",
          "description": "Contains information about type of verification used to verify the creidt or debit card. It can be $0auth with card networks, or be an internal Intuit service",
          "x-intuit-required": "Optional"
        }
      }
    }
  }
}