{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quickbooks/json-schema/quickbooks-echeckresponse-schema.json",
  "title": "echeckresponse",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quickbooks-payments-openapi-generated.yml#/components/schemas/echeckresponse",
  "type": "object",
  "properties": {
    "Status": {
      "type": "object",
      "x-intuit-type": "ECheckStatus",
      "description": "The current status of the check. Learn more about check states.\n\nValid values types:PENDING: The check is being processed.\nSUCCEEDED: The check was funded and the transaction is complete.\nDECLINED: The check was rejected.\n VOIDED: The check was voided.\nREFUNDED: The check was refunded."
    },
    "BankAccount": {
      "allOf": [
        {
          "$ref": "#/$defs/bankaccount"
        }
      ],
      "description": "Specify or create the bank account associated with this transaction. \n\nRequired if the token or bankAccountOnFile aren't specified.\n\nReview the bankAccount entity for field details.",
      "x-intuit-required": "Conditionally required"
    },
    "Description": {
      "type": "string",
      "description": "Additional details about the eCheck and transaction.",
      "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."
    },
    "CheckNumber": {
      "type": "string",
      "description": "The number of the eCheck associated with the transaction. \n\nThis number must be unique. Using the same checkNumber to create multiple eChecks will result in declines.",
      "x-intuit-required": "Optional"
    },
    "AuthCode": {
      "type": "string",
      "description": "The authorization code for the echeck.",
      "x-intuit-required": "Optional"
    },
    "PaymentMode": {
      "type": "object",
      "x-intuit-type": "PaymentModeType",
      "description": "The payment mode. This is also known as the SEC Code.\n\nValid values:WEB: Internet-initiated entry mode used for internet transactions.",
      "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 bankAccount or bankAccountOnFile aren't specified. Learn more about creating tokens.",
      "x-intuit-required": "Conditionally Required"
    },
    "BankAccountOnFile": {
      "type": "string",
      "description": "An existing bank account that was previously stored.\n\nSpecify the ID of the existing bank account. Required if the token or bankAccount aren't specified.",
      "x-intuit-required": "Conditionally Required"
    },
    "Amount": {
      "type": "number",
      "description": "The eCheck amount.\n\nValid values: Any value between 0.01 and 99999.99.",
      "x-intuit-required": "Required"
    },
    "Context": {
      "allOf": [
        {
          "$ref": "#/$defs/checkcontext"
        }
      ],
      "description": "Additional info stored with the transaction.",
      "x-intuit-required": "Optional"
    },
    "Id": {
      "type": "string",
      "description": "The unique identifier for the eCheck.",
      "x-intuit-required": "Conditionally required"
    }
  },
  "required": [
    "Amount",
    "PaymentMode"
  ],
  "$defs": {
    "bankaccount": {
      "type": "object",
      "title": "bankaccount",
      "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"
        },
        "entityType": {
          "type": "string",
          "description": "The entity or user type the bank account is associated with. Example values: Customer, Employee, Vendor or Company",
          "x-intuit-required": "Optional"
        },
        "Name": {
          "type": "string",
          "description": "The name of the bank account owner.",
          "x-intuit-required": "Required"
        },
        "AccountNumber": {
          "type": "string",
          "description": "The number of the bank account.\n\n For privacy and security,\nAccount numbers that are 6 digits or less: all but the last 2 digits are masked\nAccount numbers that are 7 digits or longer: all but the last 4 digits are masked\n Account Number masking changes are available in Sandbox companies currently and will be available from July 11th, 2022 for Production companies.",
          "x-intuit-required": "Required"
        },
        "Default": {
          "type": "boolean",
          "description": "Indicates if the bank account is the default. When users set a default, the account flag is true.\n\n This is the bank account QuickBooks uses when another isn't specified.\n\n The flag defaults to false. When a bank account flag is true, all other stored bank accounts are automatically set to false.",
          "x-intuit-required": "Optional"
        },
        "Country": {
          "type": "string",
          "description": "The ISO-standard country code. Refer to the ISO Country Code List.",
          "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."
        },
        "InputType": {
          "type": "string",
          "description": "Specifies the input type. \n\nValid values:KEYED: Indicates a manually-entered key.\nSCANNED",
          "x-intuit-required": "Optional"
        },
        "Phone": {
          "type": "string",
          "description": "The phone number associated with the bank account.",
          "x-intuit-required": "Required"
        },
        "AccountType": {
          "type": "string",
          "description": "The type of bank account. \n\nValid values:PERSONAL_CHECKING: Use for personal checking accounts.\n PERSONAL_SAVINGS: Use for personal savings accounts.\nBUSINESS_CHECKING: Use for business checking accounts.\nBUSINESS_SAVINGS: Use for business savings accounts.",
          "x-intuit-required": "Required"
        },
        "BankCode": {
          "type": "string",
          "description": "For US: This should also be the routing number for the bank associated with the account.",
          "x-intuit-required": "Optional"
        },
        "entityId": {
          "type": "string",
          "description": "The ID of the entity the bank account is associated with.",
          "x-intuit-required": "Optional"
        },
        "RoutingNumber": {
          "type": "string",
          "description": "The routing number for the bank associated with the account.\n\n For privacy and security, we only display the last four digits of the routing number.",
          "x-intuit-required": "Required"
        },
        "Id": {
          "type": "string",
          "description": "The unique identifier of a bank account object.\n\n The id is required for update or delete operations.",
          "x-intuit-required": "Conditionally required"
        }
      },
      "required": [
        "AccountNumber",
        "AccountType",
        "Name",
        "Phone",
        "RoutingNumber"
      ]
    },
    "checkcontext": {
      "type": "object",
      "title": "checkcontext",
      "properties": {
        "DeviceInfo": {
          "allOf": [
            {
              "$ref": "#/$defs/deviceinfo"
            }
          ],
          "description": "Info about the device used to process the payment.",
          "x-intuit-required": "Optional"
        }
      }
    },
    "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"
        }
      }
    }
  }
}