{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/recurly/json-schema/recurly-subscriptions-list-response-schema.json",
  "title": "SubscriptionsListResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/recurly-subscriptions-api-openapi.yml#/components/schemas/SubscriptionsListResponse",
  "allOf": [
    {
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "array"
          ],
          "default": "array"
        }
      }
    },
    {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SubscriptionBasicResponse"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SubscriptionFullResponse"
          }
        }
      ]
    }
  ],
  "$defs": {
    "BankAccountAuthorizedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Merchants importing recurring subscriptions paid with ACH into Recurly can backdate the subscription's authorization with this attribute using an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. This timestamp is used for alerting customers to reauthorize in 3 years in accordance with NACHA rules. If a subscription becomes inactive or the billing info is no longer a bank account, liquidthis timestamp is cleared.",
      "default": ""
    },
    "CollectionMethodEnum": {
      "type": "string",
      "enum": [
        "manual",
        "automatic"
      ],
      "default": "automatic",
      "description": "Optional field to set the collection for an invoice as `automatic` or `manual`. The default is `automatic` if it's not set."
    },
    "CustomField": {
      "type": "object",
      "required": [
        "name",
        "value"
      ],
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 50,
          "pattern": "/^[a-z0-9_-]+$/i",
          "title": "Field name",
          "description": "Fields must be created in the UI before values can be assigned to them."
        },
        "value": {
          "type": "string",
          "maxLength": 255,
          "title": "Field value",
          "description": "Any values that resemble a credit card number or security code (CVV/CVC) will be rejected."
        }
      }
    },
    "CustomFields": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CustomField"
      },
      "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."
    },
    "ImportedTrial": {
      "type": "boolean",
      "description": "Indicates if the subscription is to be treated as an import for data analysis or a real trial. This value can only be changed on a trial subscription and is persisted for its lifetime.",
      "default": false
    },
    "NetTerms": {
      "type": "integer",
      "title": "Net terms",
      "description": "Integer paired with `Net Terms Type` and representing the number\nof days past the current date (for `net` Net Terms Type) or days after\nthe last day of the current month (for `eom` Net Terms Type) that the\ninvoice will become past due. For `manual` collection method, an additional 24 hours is\nadded to ensure the customer has the entire last day to make payment before\nbecoming past due. For example:\n\nIf an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created.\nIf an invoice is due `net 30`, it will become past due at 31 days exactly.\nIf an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month.\n\nFor `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection.\nWhen `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`.\n\nFor more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms)\nor visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection.",
      "minimum": 0,
      "default": 0
    },
    "NetTermsTypeEnum": {
      "type": "string",
      "title": "Net Terms Type",
      "description": "Optionally supplied string that may be either `net` or `eom` (end-of-month).\nWhen `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date.\nWhen `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.\n",
      "enum": [
        "net",
        "eom"
      ],
      "default": "net"
    },
    "PlanCode": {
      "type": "string",
      "default": "",
      "maxLength": 50,
      "description": "Unique code to identify the plan. This code may only contain the following characters: [a-z 0-9 @ - _ .]. Max of 50 characters."
    },
    "PlanMini": {
      "type": "object",
      "properties": {
        "plan_code": {
          "$ref": "#/$defs/PlanCode"
        },
        "name": {
          "type": "string",
          "default": "",
          "maxLength": 255,
          "description": "Plan name. Max of 255 characters."
        }
      }
    },
    "PutMethodAttribute": {
      "type": "string",
      "enum": [
        "put"
      ]
    },
    "RampIntervalStartingBillingCycle": {
      "type": "integer",
      "description": "Represents the billing cycle where a ramp interval starts.",
      "minimum": 1,
      "default": 1
    },
    "ReferenceAccount": {
      "type": "object",
      "properties": {
        "href": {
          "$ref": "#/$defs/ReferenceHref"
        }
      }
    },
    "ReferenceBillingInfo": {
      "type": "object",
      "properties": {
        "href": {
          "$ref": "#/$defs/ReferenceHref"
        }
      }
    },
    "ReferenceHref": {
      "type": "string",
      "format": "url"
    },
    "ReferenceInvoice": {
      "type": "object",
      "properties": {
        "href": {
          "$ref": "#/$defs/ReferenceHref"
        }
      }
    },
    "ReferencePlan": {
      "type": "object",
      "properties": {
        "href": {
          "$ref": "#/$defs/ReferenceHref"
        }
      }
    },
    "ReferenceRedemptions": {
      "type": "object",
      "properties": {
        "href": {
          "$ref": "#/$defs/ReferenceHref"
        }
      }
    },
    "ReferenceShippingAddress": {
      "type": "object",
      "properties": {
        "href": {
          "$ref": "#/$defs/ReferenceHref"
        }
      }
    },
    "RevenueScheduleTypeEnum": {
      "type": "string",
      "description": "Optional field for setting a revenue schedule type. This will determine how revenue for the associated Subscription should be recognized. When creating a Subscription, available schedule types are `never`, `evenly`, `at_range_start`, or `at_range_end`. If no `revenue_schedule_type` is set, the Subscription will inherit the `revenue_schedule_type` from its Plan.",
      "enum": [
        "never",
        "evenly",
        "at_range_start",
        "at_range_end"
      ]
    },
    "SubscriptionAddOns": {
      "type": "array",
      "description": "Nested add-on information for the subscription. When creating, the new subscription will have no add-ons unless specified.",
      "items": {
        "type": "object"
      },
      "default": []
    },
    "SubscriptionBase": {
      "type": "object",
      "title": "Subscription"
    },
    "SubscriptionBasicResponse": {
      "title": "Subscription (Basic Features)",
      "allOf": [
        {
          "$ref": "#/$defs/SubscriptionBase"
        },
        {
          "type": "object",
          "properties": {
            "href": {
              "$ref": "#/$defs/ReferenceHref"
            },
            "account": {
              "$ref": "#/$defs/ReferenceAccount"
            },
            "invoice": {
              "$ref": "#/$defs/ReferenceInvoice"
            }
          }
        },
        {
          "$ref": "#/$defs/SubscriptionSharedReferences"
        },
        {
          "$ref": "#/$defs/SubscriptionSharedResponseProperties"
        },
        {
          "$ref": "#/$defs/SubscriptionReferenceAnchors"
        }
      ]
    },
    "SubscriptionCommonFields": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string",
          "title": "UUID",
          "description": "The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI.",
          "maxLength": 32
        },
        "state": {
          "$ref": "#/$defs/SubscriptionStateEnum"
        },
        "unit_amount_in_cents": {
          "type": "integer",
          "maximum": 10000000,
          "minimum": 0,
          "description": "Override the unit amount of the subscription plan by setting this value in cents. If not provided, the subscription will inherit the price from the subscription plan for the provided currency. Max 10000000."
        },
        "currency": {
          "type": "string",
          "description": "3-Letter currency code for the subscription."
        },
        "quantity": {
          "type": "integer",
          "default": 1,
          "minimum": 1,
          "description": "Optionally override the default quantity of 1."
        },
        "activated_at": {
          "type": "string",
          "format": "date-time"
        },
        "canceled_at": {
          "type": "string",
          "format": "date-time"
        },
        "expires_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        },
        "total_billing_cycles": {
          "type": "integer",
          "description": "The total number of billing cycles for the current subscription term",
          "minimum": 1
        },
        "remaining_billing_cycles": {
          "type": "integer",
          "description": "The number of billing periods that are left in the subscription. `1` means the subscription renew one more time and then expire.  Decrements from the total number of billing periods in the current term. Will always be 0 if total billing cycles is 1.",
          "minimum": 0
        },
        "current_period_started_at": {
          "type": "string",
          "format": "date-time"
        },
        "current_period_ends_at": {
          "type": "string",
          "format": "date-time"
        },
        "trial_started_at": {
          "type": "string",
          "format": "date-time"
        },
        "trial_ends_at": {
          "type": "string",
          "format": "date-time",
          "description": "If set, overrides the default trial behavior for the subscription. This must be a date and time, preferably in UTC. If the date is in the past, the subscription will skip the trial."
        },
        "terms_and_conditions": {
          "type": "string",
          "description": "Optional notes field. This will default to the Terms and Conditions text specified on the Invoice Settings page in your Recurly admin. Specify custom notes with this tag to add or override Terms and Conditions. Custom notes will stay with a subscription on all renewals."
        },
        "customer_notes": {
          "type": "string",
          "description": "Optional notes field. This will default to the Customer Notes text specified on the Invoice Settings page in your Recurly admin. Specify custom notes with this tag to add or override Customer Notes. Custom notes will stay with a subscription on all renewals."
        },
        "action_result": {
          "type": "string",
          "description": "Action result params to be used in Recurly-JS to complete a payment when using asynchronous payment methods, e.g., Boleto, iDEAL and Sofort."
        }
      }
    },
    "SubscriptionFullResponse": {
      "title": "Subscription (Extended Features)",
      "allOf": [
        {
          "$ref": "#/$defs/SubscriptionBase"
        },
        {
          "type": "object",
          "properties": {
            "href": {
              "$ref": "#/$defs/ReferenceHref"
            },
            "account": {
              "$ref": "#/$defs/ReferenceAccount"
            },
            "invoice": {
              "$ref": "#/$defs/ReferenceInvoice"
            },
            "billing_info": {
              "$ref": "#/$defs/ReferenceBillingInfo"
            },
            "redemptions": {
              "$ref": "#/$defs/ReferenceRedemptions"
            },
            "shipping_address": {
              "$ref": "#/$defs/ReferenceShippingAddress"
            }
          }
        },
        {
          "$ref": "#/$defs/SubscriptionSharedReferences"
        },
        {
          "$ref": "#/$defs/SubscriptionSharedResponseProperties"
        },
        {
          "$ref": "#/$defs/SubscriptionSharedConditionalResponseProperties"
        },
        {
          "$ref": "#/$defs/SubscriptionReferenceAnchors"
        }
      ]
    },
    "SubscriptionImportedTrial": {
      "type": "object",
      "properties": {
        "imported_trial": {
          "$ref": "#/$defs/ImportedTrial"
        }
      }
    },
    "SubscriptionInvoicing": {
      "type": "object",
      "properties": {
        "po_number": {
          "type": "string",
          "default": "",
          "description": "Optional notes field. Attach a PO number to the invoice."
        },
        "net_terms": {
          "$ref": "#/$defs/NetTerms"
        },
        "net_terms_type": {
          "$ref": "#/$defs/NetTermsTypeEnum"
        },
        "collection_method": {
          "$ref": "#/$defs/CollectionMethodEnum"
        }
      }
    },
    "SubscriptionPausing": {
      "type": "object",
      "properties": {
        "remaining_pause_cycles": {
          "type": "integer",
          "description": "Number of billing cycles to pause the subscriptions. A value of 0 will cancel any pending pauses on the subscription.",
          "minimum": 0
        },
        "paused_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "SubscriptionRampInterval": {
      "type": "object",
      "title": "Subscription Ramp Interval",
      "properties": {
        "starting_billing_cycle": {
          "$ref": "#/$defs/RampIntervalStartingBillingCycle"
        },
        "unit_amount_in_cents": {
          "type": "integer",
          "description": "Represents the price for the ramp interval.",
          "minimum": 0
        }
      }
    },
    "SubscriptionRampIntervalResponse": {
      "allOf": [
        {
          "$ref": "#/$defs/SubscriptionRampInterval"
        },
        {
          "properties": {
            "remaining_billing_cycles": {
              "type": "integer",
              "minimum": 0,
              "description": "Represents how many billing cycles are left in a ramp interval."
            },
            "starting_on": {
              "type": "string",
              "format": "date-time",
              "description": "Date the ramp interval starts."
            },
            "ending_on": {
              "type": "string",
              "format": "date-time",
              "description": "Date the ramp interval ends."
            }
          }
        }
      ]
    },
    "SubscriptionRampIntervalsResponse": {
      "type": "object",
      "properties": {
        "ramp_intervals": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SubscriptionRampIntervalResponse"
          }
        }
      }
    },
    "SubscriptionReferenceAnchorCancel": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "enum": [
            "cancel"
          ]
        },
        "href": {
          "$ref": "#/$defs/ReferenceHref"
        },
        "method": {
          "$ref": "#/$defs/PutMethodAttribute"
        }
      }
    },
    "SubscriptionReferenceAnchorNotes": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "enum": [
            "notes"
          ]
        },
        "href": {
          "$ref": "#/$defs/ReferenceHref"
        },
        "method": {
          "$ref": "#/$defs/PutMethodAttribute"
        }
      }
    },
    "SubscriptionReferenceAnchorPostpone": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "enum": [
            "postpone"
          ]
        },
        "href": {
          "$ref": "#/$defs/ReferenceHref"
        },
        "method": {
          "$ref": "#/$defs/PutMethodAttribute"
        }
      }
    },
    "SubscriptionReferenceAnchorTerminate": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "enum": [
            "terminate"
          ]
        },
        "href": {
          "$ref": "#/$defs/ReferenceHref"
        },
        "method": {
          "$ref": "#/$defs/PutMethodAttribute"
        }
      }
    },
    "SubscriptionReferenceAnchors": {
      "type": "object",
      "properties": {
        "cancel": {
          "$ref": "#/$defs/SubscriptionReferenceAnchorCancel"
        },
        "terminate": {
          "$ref": "#/$defs/SubscriptionReferenceAnchorTerminate"
        },
        "postpone": {
          "$ref": "#/$defs/SubscriptionReferenceAnchorPostpone"
        },
        "notes": {
          "$ref": "#/$defs/SubscriptionReferenceAnchorNotes"
        }
      }
    },
    "SubscriptionSharedConditionalResponseProperties": {
      "allOf": [
        {
          "$ref": "#/$defs/TaxInfo"
        },
        {
          "$ref": "#/$defs/SubscriptionInvoicing"
        },
        {
          "$ref": "#/$defs/SubscriptionShipping"
        },
        {
          "$ref": "#/$defs/SubscriptionRampIntervalsResponse"
        },
        {
          "type": "object",
          "properties": {
            "vat_reverse_charge_notes": {
              "$ref": "#/$defs/VatReverseChargeNotes"
            },
            "tax_inclusive": {
              "$ref": "#/$defs/TaxInclusive"
            },
            "bank_account_authorized_at": {
              "$ref": "#/$defs/BankAccountAuthorizedAt"
            }
          }
        }
      ]
    },
    "SubscriptionSharedReferences": {
      "type": "object",
      "properties": {
        "plan": {
          "allOf": [
            {
              "$ref": "#/$defs/ReferencePlan"
            },
            {
              "$ref": "#/$defs/PlanMini"
            }
          ]
        }
      }
    },
    "SubscriptionSharedResponseProperties": {
      "allOf": [
        {
          "$ref": "#/$defs/SubscriptionTerms"
        },
        {
          "$ref": "#/$defs/SubscriptionCommonFields"
        },
        {
          "$ref": "#/$defs/SubscriptionStartedWithGift"
        },
        {
          "$ref": "#/$defs/SubscriptionImportedTrial"
        },
        {
          "$ref": "#/$defs/SubscriptionPausing"
        },
        {
          "type": "object",
          "properties": {
            "revenue_schedule_type": {
              "$ref": "#/$defs/RevenueScheduleTypeEnum"
            },
            "no_billing_info_reason": {
              "type": "string",
              "default": ""
            },
            "gateway_code": {
              "type": "string",
              "default": "",
              "description": "An alphanumeric code shown per gateway on your site's payment gateways page. Set this code to ensure that a given subscription targets a given gateway."
            },
            "subscription_add_ons": {
              "$ref": "#/$defs/SubscriptionAddOns"
            },
            "custom_fields": {
              "$ref": "#/$defs/CustomFields"
            },
            "action_result": {
              "type": "string",
              "description": "Action result params to be used in Recurly-JS to complete a payment when using asynchronous payment methods, e.g., Boleto, iDEAL and Sofort."
            }
          }
        }
      ]
    },
    "SubscriptionShipping": {
      "type": "object",
      "description": "Subscription shipping details",
      "properties": {
        "shipping_amount_in_cents": {
          "type": "integer",
          "minimum": 0
        },
        "shipping_method_code": {
          "type": "string",
          "description": "The reference code for the shipping method used, such as shipping_method.code `'fedex_ground'`. Required if `shipping_amount_in_cents` is specified."
        }
      }
    },
    "SubscriptionStartedWithGift": {
      "type": "object",
      "properties": {
        "started_with_gift": {
          "type": "boolean",
          "default": false
        },
        "converted_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "SubscriptionStateEnum": {
      "type": "string",
      "enum": [
        "active",
        "canceled",
        "expired",
        "failed",
        "future",
        "paused"
      ]
    },
    "SubscriptionTerms": {
      "type": "object",
      "properties": {
        "auto_renew": {
          "type": "boolean",
          "default": true,
          "description": "Determines if subscription configured to auto renew for another term or expire at the end of current term."
        },
        "renewal_billing_cycles": {
          "type": "integer",
          "description": "The number of billing periods in the subscription's next term. Will default to the plan's total_billing_cycles unless specified."
        },
        "current_period_started_at": {
          "type": "string",
          "format": "date-time"
        },
        "current_period_ends_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "TaxInclusive": {
      "type": "boolean",
      "description": "Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag.",
      "default": false
    },
    "TaxInfo": {
      "type": "object",
      "properties": {
        "tax_in_cents": {
          "type": "integer",
          "minimum": 0
        },
        "tax_type": {
          "type": "string",
          "description": "Provides the tax type as \"vat\" for EU VAT, \"usst\" for U.S. Sales Tax, or the 2 letter country code for country level tax types like Canada, Australia, New Zealand, Israel, and all non-EU European countries."
        },
        "tax_region": {
          "type": "string",
          "description": "Provides the tax region applied on an invoice. For U.S. Sales Tax, this will be the 2 letter state code. For EU VAT this will be the 2 letter country code. For all country level tax types, this will display the regional tax, like VAT, GST, or PST."
        },
        "tax_rate": {
          "type": "number",
          "format": "float",
          "title": "Rate"
        }
      }
    },
    "VatReverseChargeNotes": {
      "type": "string",
      "default": "",
      "description": "VAT Reverse Charge Notes only appear if you have EU VAT enabled or are using your own Avalara AvaTax account and the customer is in the EU, has a VAT number, and is in a different country than your own. This will default to the VAT Reverse Charge Notes text specified on the Tax Settings page in your Recurly admin, unless custom notes were created with the original subscription. Specify custom notes with this tag to add or override VAT Reverse Charge Notes. Custom notes will stay with a subscription on all renewals."
    }
  }
}