{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quickbooks/json-schema/quickbooks-chargeresponse-schema.json",
  "title": "chargeresponse",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quickbooks-payments-openapi-generated.yml#/components/schemas/chargeresponse",
  "type": "object",
  "properties": {
    "Status": {
      "type": "object",
      "x-intuit-type": "ChargeStatusEnumerator",
      "description": "The status of the charge. Charge athorization and capture are a two part process. Learn more about charge states for the QuickBookls Payments API.\n\nValid values:AUTHORIZED: The card's issuing bank has authorized the cardholder's ability to pay. This ensures the credit or debit card account is in good standing with sufficient funds.\nDECLINED: The card authorization was declined, rejected by the payment transaction service (PTS), or returned by the payment processor.\nCAPTURED: The payment is in the second part of the two-step authorization and capture process.\nCANCELLED: The transaction was cancelled.\nSETTLED: The payment was successfully funded. The money moved to the seller’s (i.e. merchant’s) bank account. At this point, the charge is complete.\nREFUNDED: The money successfully transferred back to the buyer (i.e. card holder)."
    },
    "Capture": {
      "type": "boolean",
      "description": "A flag that indicates if the charge was captured.\n\nValid values:True: The charge was captured\nFalse: The charge wasn't captured. It's pending authorization.\nDefaults to true.",
      "x-intuit-required": "Optional",
      "x-intuit-default": true
    },
    "Description": {
      "type": "string",
      "description": "Free form text description. Additional details associated with the charge.",
      "x-intuit-required": "Optional"
    },
    "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."
    },
    "AuthCode": {
      "type": "string",
      "description": "The authorization code for the charge.\n\nNote: This is only available for uncaptured charges.",
      "x-intuit-required": "Optional"
    },
    "CaptureDetail": {
      "type": "object",
      "x-intuit-type": "Capture",
      "description": "Details about the captured charge. Available for previously authorized charges."
    },
    "RefundDetail": {
      "type": "object",
      "x-intuit-type": "Array [refund]",
      "description": "Details for one or more refunds applied to this charge.",
      "x-intuit-required": "Optional"
    },
    "AvsZip": {
      "type": "string",
      "description": "The address verification service (AVS). This service verifies the ZIP code submitted by the customer for their credit or debit card.\n\nAVS compares the ZIP code submitted at the time of the transaction with what's on file at the cardholder's bank. AVS is supported by most US banks and some international banks.\n\nValid responses:Pass\nFail\nNotAvailable",
      "x-intuit-required": "Response Only"
    },
    "Currency": {
      "type": "string",
      "description": "The 3-letter ISO 4217 compliant currency code, which defines the currency for the charge.",
      "x-intuit-required": "Required"
    },
    "Amount": {
      "type": "number",
      "description": "The transaction amount.\n\nValid values: Any value between 0.01 and 99999.99.",
      "x-intuit-required": "Required"
    },
    "Token": {
      "type": "string",
      "description": "The opaque container for the credit or debit card account associated with the transaction.\n\nRequired if the card isn't specified.\n\nTokens are preferred to directly specifying a card or cardOnFile to comply with PCI standards. Learn more about creating tokens.",
      "x-intuit-required": "Conditionally Required"
    },
    "Context": {
      "allOf": [
        {
          "$ref": "#/$defs/paymentcontext"
        }
      ],
      "description": "Additional info that will be stored with the transaction.",
      "x-intuit-required": "Required"
    },
    "CardSecurityCodeMatch": {
      "type": "string",
      "description": "The 3 or 4 digit card security code number that appears on credit and debit cards. This number is not part of the main credit card number.\n\nThis field indicates if the security code submitted at the time of the transaction matches what's on file at the cardholder's bank.\n\nValid responses:Pass\nFail\nNotAvailable",
      "x-intuit-required": "Response Only"
    },
    "AvsStreet": {
      "type": "string",
      "description": "The address verification service (AVS). This service verifies the street address submitted by the customer for their credit or debit card.\n\nAVS compares the ZIP code submitted at the time of the transaction with what's on file at the cardholder's bank. AVS is supported by most US banks and some international banks.\n\nValid responses:Pass\nFail\nNotAvailable",
      "x-intuit-required": "Response Only"
    },
    "Id": {
      "type": "string",
      "description": "The unique identifier for the charge. This is a system-generated alpha-numeric ID.",
      "x-intuit-required": "Conditionally required"
    },
    "Card": {
      "allOf": [
        {
          "$ref": "#/$defs/card"
        }
      ],
      "description": "The credit or debit card used for the charge.\n\nRequired if token isn't specified.",
      "x-intuit-required": "Conditionally required"
    }
  },
  "required": [
    "Amount",
    "Context",
    "Currency"
  ],
  "$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"
        }
      }
    }
  }
}