{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nmi/json-schema/nmi-create-merchant-request-schema.json",
  "title": "Create a Merchant",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nmi-merchants-api-openapi.yml#/components/schemas/CreateMerchantRequest",
  "allOf": [
    {
      "type": "object",
      "required": [
        "type",
        "company",
        "country",
        "address1",
        "city",
        "state",
        "zip",
        "timezone",
        "firstName",
        "lastName",
        "email",
        "phone",
        "language",
        "username",
        "accountInfo"
      ],
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of merchant account being created."
        },
        "company": {
          "type": "string",
          "description": "The merchant's company name."
        },
        "externalIdentifier": {
          "type": "string",
          "description": "A description to further describe or identify the merchant"
        },
        "country": {
          "type": "string",
          "description": "The country associated with the merchant's address"
        },
        "address1": {
          "type": "string",
          "description": "The first line of the merchant's address"
        },
        "address2": {
          "type": "string",
          "description": "The second line of the merchant's address"
        },
        "city": {
          "type": "string",
          "description": "The city associated with the merchant's address"
        },
        "state": {
          "type": "string",
          "description": "The state associated with the merchant's address"
        },
        "zip": {
          "type": "string",
          "description": "The postal code associated with the merchant's address"
        },
        "url": {
          "type": "string",
          "description": "The merchant's website URL"
        },
        "timezone": {
          "type": "string",
          "description": "The merchant's timezone"
        },
        "firstName": {
          "type": "string",
          "description": "The first name of the merchant's company contact"
        },
        "lastName": {
          "type": "string",
          "description": "The last name of the merchant's company contact"
        },
        "email": {
          "type": "string",
          "description": "The email of the merchant's company contact"
        },
        "phone": {
          "type": "string",
          "description": "The phone number of the merchant's company contact"
        },
        "fax": {
          "type": "string",
          "description": "The fax number of the merchant's company contact"
        },
        "language": {
          "type": "string",
          "description": "The merchant's language"
        },
        "username": {
          "type": "string",
          "description": "The username to be assigned to the primary user account on the merchant"
        },
        "accountInfo": {
          "type": "object",
          "description": "Banking information for merchant billing",
          "required": [
            "checkAccount",
            "checkAba",
            "accountHolderType",
            "accountType"
          ],
          "properties": {
            "checkAccount": {
              "type": "string",
              "description": "The account number used to bill the merchant"
            },
            "checkAba": {
              "type": "string",
              "description": "The routing/ABA number used to bill the merchant"
            },
            "accountHolderType": {
              "type": "string",
              "description": "The type of holder for the bank account being used"
            },
            "accountType": {
              "type": "string",
              "description": "The type of bank account being used"
            }
          }
        }
      }
    }
  ]
}