{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/recurly/json-schema/recurly-account-list-schema.json",
  "title": "AccountList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/recurly-account-api-openapi.yml#/components/schemas/AccountList",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "title": "Object type",
      "description": "Will always be List."
    },
    "has_more": {
      "type": "boolean",
      "description": "Indicates there are more results on subsequent pages."
    },
    "next": {
      "type": "string",
      "description": "Path to subsequent page of results."
    },
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Account"
      }
    }
  },
  "$defs": {
    "Account": {
      "allOf": [
        {
          "$ref": "#/$defs/AccountReadOnly"
        },
        {
          "$ref": "#/$defs/AccountResponse"
        }
      ]
    },
    "AccountReadOnly": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "maxLength": 13,
          "readOnly": true
        },
        "object": {
          "type": "string",
          "title": "Object type",
          "readOnly": true
        },
        "state": {
          "description": "Accounts can be either active or inactive.",
          "readOnly": true,
          "$ref": "#/$defs/ActiveStateEnum"
        },
        "hosted_login_token": {
          "type": "string",
          "description": "The unique token for automatically logging the account in to the hosted management pages. You may automatically log the user into their hosted management pages by directing the user to: `https://{subdomain}.recurly.com/account/{hosted_login_token}`.",
          "readOnly": true,
          "maxLength": 32
        },
        "shipping_addresses": {
          "type": "array",
          "description": "The shipping addresses on the account.",
          "items": {
            "$ref": "#/$defs/ShippingAddress"
          }
        },
        "has_live_subscription": {
          "type": "boolean",
          "description": "Indicates if the account has a subscription that is either active, canceled, future, or paused."
        },
        "has_active_subscription": {
          "type": "boolean",
          "description": "Indicates if the account has an active subscription."
        },
        "has_future_subscription": {
          "type": "boolean",
          "description": "Indicates if the account has a future subscription."
        },
        "has_canceled_subscription": {
          "type": "boolean",
          "description": "Indicates if the account has a canceled subscription."
        },
        "has_paused_subscription": {
          "type": "boolean",
          "description": "Indicates if the account has a paused subscription."
        },
        "has_past_due_invoice": {
          "type": "boolean",
          "description": "Indicates if the account has a past due invoice."
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "When the account was created.",
          "readOnly": true
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "description": "When the account was last changed.",
          "readOnly": true
        },
        "deleted_at": {
          "type": "string",
          "format": "date-time",
          "description": "If present, when the account was last marked inactive.",
          "readOnly": true
        }
      }
    },
    "AccountResponse": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "The unique identifier of the account. This cannot be changed once the account is created.",
          "maxLength": 50,
          "readOnly": true
        },
        "username": {
          "type": "string",
          "description": "A secondary value for the account.",
          "maxLength": 255
        },
        "email": {
          "type": "string",
          "format": "email",
          "description": "The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique.",
          "maxLength": 255
        },
        "override_business_entity_id": {
          "type": "string",
          "title": "Override Business Entity ID",
          "description": "Unique ID to identify the business entity assigned to the account. Available when the `Multiple Business Entities` feature is enabled."
        },
        "preferred_locale": {
          "description": "Used to determine the language and locale of emails sent on behalf of the merchant to the customer.",
          "$ref": "#/$defs/PreferredLocaleEnum"
        },
        "preferred_time_zone": {
          "type": "string",
          "description": "The [IANA time zone name](https://docs.recurly.com/docs/email-time-zones-and-time-stamps#supported-api-iana-time-zone-names) used to determine the time zone of emails sent on behalf of the merchant to the customer."
        },
        "cc_emails": {
          "type": "string",
          "description": "Additional email address that should receive account correspondence. These should be separated only by commas. These CC emails will receive all emails that the `email` field also receives.",
          "maxLength": 255
        },
        "first_name": {
          "type": "string",
          "maxLength": 255
        },
        "last_name": {
          "type": "string",
          "maxLength": 255
        },
        "company": {
          "type": "string",
          "maxLength": 50
        },
        "vat_number": {
          "type": "string",
          "description": "The VAT number of the account (to avoid having the VAT applied). This is only used for manually collected invoices.",
          "maxLength": 20
        },
        "tax_exempt": {
          "type": "boolean",
          "description": "The tax status of the account. `true` exempts tax on the account, `false` applies tax on the account."
        },
        "exemption_certificate": {
          "type": "string",
          "description": "The tax exemption certificate number for the account. If the merchant has an integration for the Vertex tax provider, this optional value will be sent in any tax calculation requests for the account.",
          "maxLength": 30
        },
        "external_accounts": {
          "type": "array",
          "description": "The external accounts belonging to this account",
          "items": {
            "$ref": "#/$defs/ExternalAccount"
          }
        },
        "parent_account_id": {
          "type": "string",
          "maxLength": 13,
          "description": "The UUID of the parent account associated with this account."
        },
        "bill_to": {
          "maxLength": 6,
          "description": "An enumerable describing the billing behavior of the account, specifically whether the account is self-paying or will rely on the parent account to pay.",
          "$ref": "#/$defs/BillToEnum"
        },
        "dunning_campaign_id": {
          "type": "string",
          "title": "Dunning Campaign ID",
          "description": "Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used."
        },
        "invoice_template_id": {
          "type": "string",
          "title": "Invoice Template ID",
          "description": "Unique ID to identify an invoice template. Available when the site is on a Pro or Elite plan. Used to specify if a non-default invoice template will be used to generate invoices for the account. For sites without multiple invoice templates enabled, the default template will always be used."
        },
        "address": {
          "$ref": "#/$defs/Address"
        },
        "billing_info": {
          "$ref": "#/$defs/BillingInfo"
        },
        "custom_fields": {
          "$ref": "#/$defs/CustomFields"
        },
        "entity_use_code": {
          "type": "string",
          "description": "The Avalara AvaTax value that can be passed to identify the customer type for tax purposes. The range of values can be A - R (more info at Avalara). Value is case-sensitive."
        },
        "bill_date": {
          "title": "Bill Date",
          "type": "string",
          "format": "date-time",
          "description": "The preferred billing date for the account. This date will be used as the billing date for when activating new subscriptions on the account."
        }
      }
    },
    "AccountTypeEnum": {
      "type": "string",
      "enum": [
        "checking",
        "savings"
      ]
    },
    "ActiveStateEnum": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    },
    "Address": {
      "type": "object",
      "properties": {
        "phone": {
          "type": "string",
          "title": "Phone number"
        },
        "street1": {
          "type": "string",
          "title": "Street 1",
          "maxLength": 50
        },
        "street2": {
          "type": "string",
          "title": "Street 2",
          "maxLength": 50
        },
        "city": {
          "type": "string",
          "title": "City"
        },
        "region": {
          "type": "string",
          "title": "State/Province",
          "description": "State or province."
        },
        "postal_code": {
          "type": "string",
          "title": "Zip/Postal code",
          "description": "Zip or postal code."
        },
        "country": {
          "type": "string",
          "title": "Country",
          "description": "Country, 2-letter ISO 3166-1 alpha-2 code."
        },
        "geo_code": {
          "type": "string",
          "maxLength": 20,
          "description": "Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled."
        }
      }
    },
    "BillToEnum": {
      "type": "string",
      "enum": [
        "parent",
        "self"
      ]
    },
    "BillingInfo": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "maxLength": 13,
          "readOnly": true
        },
        "object": {
          "type": "string",
          "title": "Object type",
          "readOnly": true
        },
        "account_id": {
          "type": "string",
          "maxLength": 13,
          "readOnly": true
        },
        "first_name": {
          "type": "string",
          "maxLength": 50
        },
        "last_name": {
          "type": "string",
          "maxLength": 50
        },
        "company": {
          "type": "string",
          "maxLength": 100
        },
        "address": {
          "$ref": "#/$defs/Address"
        },
        "vat_number": {
          "type": "string",
          "description": "Customer's VAT number (to avoid having the VAT applied). This is only used for automatically collected invoices."
        },
        "valid": {
          "type": "boolean",
          "readOnly": true
        },
        "payment_method": {
          "$ref": "#/$defs/PaymentMethod"
        },
        "fraud": {
          "type": "object",
          "x-class-name": "FraudInfo",
          "title": "Fraud information",
          "description": "Most recent fraud result.",
          "readOnly": true,
          "properties": {
            "score": {
              "type": "integer",
              "title": "Kount score",
              "minimum": 1,
              "maximum": 99
            },
            "decision": {
              "title": "Kount decision",
              "maxLength": 10,
              "$ref": "#/$defs/KountDecisionEnum"
            },
            "risk_rules_triggered": {
              "type": "object",
              "title": "Kount rules"
            }
          }
        },
        "primary_payment_method": {
          "type": "boolean",
          "description": "The `primary_payment_method` field is used to indicate the primary billing info on the account. The first billing info created on an account will always become primary. This payment method will be used"
        },
        "backup_payment_method": {
          "type": "boolean",
          "description": "The `backup_payment_method` field is used to indicate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined."
        },
        "payment_gateway_references": {
          "type": "array",
          "description": "Array of Payment Gateway References, each a reference to a third-party gateway object of varying types.",
          "items": {
            "$ref": "#/$defs/PaymentGatewayReferences"
          }
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "When the billing information was created.",
          "readOnly": true
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "description": "When the billing information was last changed.",
          "readOnly": true
        },
        "updated_by": {
          "type": "object",
          "x-class-name": "BillingInfoUpdatedBy",
          "readOnly": true,
          "properties": {
            "ip": {
              "type": "string",
              "description": "Customer's IP address when updating their billing information.",
              "maxLength": 20
            },
            "country": {
              "type": "string",
              "description": "Country, 2-letter ISO 3166-1 alpha-2 code matching the origin IP address, if known by Recurly.",
              "maxLength": 2
            }
          }
        }
      }
    },
    "CardFundingSourceEnum": {
      "type": "string",
      "enum": [
        "credit",
        "debit",
        "charge",
        "prepaid",
        "deferred_debit"
      ]
    },
    "CardNetworkEnum": {
      "type": "string",
      "enum": [
        "Bancontact",
        "CartesBancaires",
        "Dankort",
        "MasterCard",
        "Visa"
      ]
    },
    "CardTypeEnum": {
      "type": "string",
      "enum": [
        "American Express",
        "Dankort",
        "Diners Club",
        "Discover",
        "ELO",
        "Forbrugsforeningen",
        "Hipercard",
        "JCB",
        "Laser",
        "Maestro",
        "MasterCard",
        "Test Card",
        "Union Pay",
        "Unknown",
        "Visa",
        "Tarjeta Naranja"
      ]
    },
    "CustomField": {
      "type": "object",
      "title": "Custom field",
      "properties": {
        "name": {
          "type": "string",
          "title": "Field name",
          "description": "Fields must be created in the UI before values can be assigned to them.",
          "pattern": "/^[a-z0-9_-]+$/i",
          "maxLength": 50
        },
        "value": {
          "type": "string",
          "title": "Field value",
          "description": "Any values that resemble a credit card number or security code (CVV/CVC) will be rejected.",
          "maxLength": 255
        },
        "source_record_type": {
          "type": "string",
          "title": "Source record type",
          "description": "The type of record this custom field was automatically copied from. Only present when the field was copied from another record.",
          "readOnly": true,
          "$ref": "#/$defs/SourceRecordTypeEnum"
        },
        "source_record_id": {
          "type": "string",
          "title": "Source record ID",
          "description": "The UUID of the record this custom field was automatically copied from. Only present when the field was copied from another record.",
          "readOnly": true
        }
      },
      "required": [
        "name",
        "value"
      ]
    },
    "CustomFields": {
      "type": "array",
      "title": "Custom fields",
      "description": "The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.",
      "items": {
        "$ref": "#/$defs/CustomField"
      }
    },
    "ExternalAccount": {
      "type": "object",
      "title": "External Account",
      "properties": {
        "object": {
          "type": "string",
          "default": "external_account"
        },
        "id": {
          "type": "string",
          "description": "UUID of the external_account ."
        },
        "external_account_code": {
          "type": "string",
          "description": "Represents the account code for the external account."
        },
        "external_connection_type": {
          "type": "string",
          "description": "Represents the connection type. One of the connection types of your enabled App Connectors"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "Created at",
          "readOnly": true
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "description": "Last updated at",
          "readOnly": true
        }
      }
    },
    "KountDecisionEnum": {
      "type": "string",
      "enum": [
        "approve",
        "decline",
        "escalate",
        "review"
      ]
    },
    "PaymentGatewayReferences": {
      "type": "object",
      "title": "Payment Gateway References Object",
      "description": "Array of Payment Gateway References, each a reference to a third-party gateway object of varying types.",
      "properties": {
        "token": {
          "type": "string",
          "title": "Token",
          "description": "Reference value used when the external token was created. If a Stripe gateway or Ebanx gateway is used, this value will need to be accompanied by its reference_type."
        },
        "reference_type": {
          "type": "string",
          "title": "Reference Type",
          "$ref": "#/$defs/PaymentGatewayReferencesEnum"
        }
      }
    },
    "PaymentGatewayReferencesEnum": {
      "type": "string",
      "description": "The type of reference token. The value can be omitted for gateways that only support one type of token.",
      "enum": [
        "stripe_confirmation_token",
        "upi_vpa"
      ]
    },
    "PaymentMethod": {
      "type": "object",
      "properties": {
        "object": {
          "$ref": "#/$defs/PaymentMethodEnum"
        },
        "card_type": {
          "description": "Visa, MasterCard, American Express, Discover, JCB, etc.",
          "$ref": "#/$defs/CardTypeEnum"
        },
        "first_six": {
          "type": "string",
          "description": "Credit card number's first six digits.\n\nFor a tokenized wallet payment (`apple_pay`, `google_pay`, or\n`google_pay_device_pan`), this is the DPAN's (the wallet/device token's own\nnumber) first six digits, not the underlying card's (FPAN).\n",
          "maxLength": 6
        },
        "last_four": {
          "type": "string",
          "description": "Credit card number's last four digits. Will refer to bank account if payment\nmethod is ACH.\n\nFor a tokenized wallet payment (`apple_pay`, `google_pay`, or\n`google_pay_device_pan`), this is the DPAN's last four digits, not the\nunderlying card's (FPAN).\n",
          "maxLength": 4
        },
        "last_two": {
          "type": "string",
          "description": "The IBAN bank account's last two digits.",
          "maxLength": 2
        },
        "exp_month": {
          "type": "integer",
          "description": "Expiration month.",
          "maxLength": 2
        },
        "exp_year": {
          "type": "integer",
          "description": "Expiration year.",
          "maxLength": 4
        },
        "gateway_token": {
          "type": "string",
          "description": "A token used in place of a credit card in order to perform transactions.",
          "maxLength": 50
        },
        "cc_bin_country": {
          "type": "string",
          "description": "The 2-letter ISO 3166-1 alpha-2 country code associated with the card's issuer, if known."
        },
        "funding_source": {
          "$ref": "#/$defs/CardFundingSourceEnum",
          "description": "The funding source of the card, if known."
        },
        "gateway_code": {
          "type": "string",
          "description": "An identifier for a specific payment gateway.",
          "maxLength": 13
        },
        "gateway_attributes": {
          "type": "object",
          "description": "Gateway specific attributes associated with this PaymentMethod",
          "x-class-name": "GatewayAttributes",
          "properties": {
            "account_reference": {
              "type": "string",
              "description": "Used by Adyen and Braintree gateways. For Adyen the Shopper Reference value used when the external token was created. For Braintree the PayPal PayerID is populated in the response.",
              "maxLength": 264
            }
          }
        },
        "card_network_preference": {
          "description": "Represents the card network preference associated with the billing info for dual badged cards. Must be a supported card network.",
          "$ref": "#/$defs/CardNetworkEnum"
        },
        "billing_agreement_id": {
          "type": "string",
          "description": "Billing Agreement identifier. Only present for Amazon or Paypal payment methods."
        },
        "name_on_account": {
          "type": "string",
          "description": "The name associated with the bank account."
        },
        "account_type": {
          "description": "The bank account type. Only present for ACH payment methods.",
          "$ref": "#/$defs/AccountTypeEnum"
        },
        "routing_number": {
          "type": "string",
          "description": "The bank account's routing number. Only present for ACH payment methods."
        },
        "routing_number_bank": {
          "type": "string",
          "description": "The bank name of this routing number."
        },
        "username": {
          "type": "string",
          "description": "Username of the associated payment method. Currently only associated with Venmo."
        }
      }
    },
    "PaymentMethodEnum": {
      "type": "string",
      "enum": [
        "bacs",
        "amazon",
        "amazon_billing_agreement",
        "apple_pay",
        "apple_pay_merchant_token",
        "bank_account_info",
        "braintree_apple_pay",
        "check",
        "credit_card",
        "eft",
        "gateway_token",
        "google_pay",
        "google_pay_device_pan",
        "iban_bank_account",
        "money_order",
        "other",
        "paypal",
        "paypal_billing_agreement",
        "roku",
        "sepadirectdebit",
        "venmo",
        "wire_transfer",
        "braintree_v_zero",
        "boleto",
        "cash_app",
        "upi_autopay",
        "pix_automatico",
        "mercadopago",
        "klarna",
        "braintree_google_pay",
        "stripe_link"
      ]
    },
    "PreferredLocaleEnum": {
      "type": "string",
      "enum": [
        "da-DK",
        "de-CH",
        "de-DE",
        "en-AU",
        "en-CA",
        "en-GB",
        "en-IE",
        "en-NZ",
        "en-US",
        "es-ES",
        "es-MX",
        "es-US",
        "fi-FI",
        "fr-BE",
        "fr-CA",
        "fr-CH",
        "fr-FR",
        "hi-IN",
        "it-IT",
        "ja-JP",
        "ko-KR",
        "nl-BE",
        "nl-NL",
        "pl-PL",
        "pt-BR",
        "pt-PT",
        "ro-RO",
        "ru-RU",
        "sk-SK",
        "sv-SE",
        "tr-TR",
        "zh-CN"
      ]
    },
    "ShippingAddress": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "title": "Shipping Address ID",
          "maxLength": 13,
          "readOnly": true
        },
        "object": {
          "type": "string",
          "title": "Object type",
          "readOnly": true
        },
        "account_id": {
          "type": "string",
          "title": "Account ID",
          "maxLength": 13,
          "readOnly": true
        },
        "nickname": {
          "type": "string",
          "maxLength": 255
        },
        "first_name": {
          "type": "string",
          "maxLength": 255
        },
        "last_name": {
          "type": "string",
          "maxLength": 255
        },
        "company": {
          "type": "string",
          "maxLength": 255
        },
        "email": {
          "type": "string",
          "maxLength": 255
        },
        "vat_number": {
          "type": "string",
          "maxLength": 20
        },
        "phone": {
          "type": "string",
          "maxLength": 30
        },
        "street1": {
          "type": "string",
          "maxLength": 255
        },
        "street2": {
          "type": "string",
          "maxLength": 255
        },
        "city": {
          "type": "string",
          "maxLength": 255
        },
        "region": {
          "type": "string",
          "maxLength": 255,
          "description": "State or province."
        },
        "postal_code": {
          "type": "string",
          "maxLength": 20,
          "description": "Zip or postal code."
        },
        "country": {
          "type": "string",
          "maxLength": 50,
          "description": "Country, 2-letter ISO 3166-1 alpha-2 code."
        },
        "geo_code": {
          "type": "string",
          "maxLength": 20,
          "description": "Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled."
        },
        "created_at": {
          "type": "string",
          "title": "Created at",
          "format": "date-time",
          "readOnly": true
        },
        "updated_at": {
          "type": "string",
          "title": "Updated at",
          "format": "date-time",
          "readOnly": true
        }
      }
    },
    "SourceRecordTypeEnum": {
      "type": "string",
      "description": "The type of record a custom field was automatically copied from.",
      "enum": [
        "account",
        "plan",
        "product",
        "subscription"
      ]
    }
  }
}