{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rutter/json-schema/rutter-list-subscriptions-response-schema.json",
  "title": "ListSubscriptionsResponse",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rutter-payments-api-openapi.yml#/components/schemas/ListSubscriptionsResponse",
  "type": "object",
  "properties": {
    "subscriptions": {
      "$ref": "#/$defs/Subscriptions"
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    },
    "connection": {
      "$ref": "#/$defs/Connection"
    }
  },
  "required": [
    "subscriptions",
    "next_cursor"
  ],
  "$defs": {
    "Connection": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The UUID of the connection. Generated by Rutter."
        },
        "orgId": {
          "type": "string",
          "format": "uuid",
          "description": "Your organization id."
        },
        "platform": {
          "$ref": "#/$defs/Platform"
        }
      },
      "required": [
        "id",
        "orgId",
        "platform"
      ]
    },
    "Platform": {
      "type": "string",
      "enum": [
        "AMAZON",
        "EBAY",
        "ETSY",
        "FNAC",
        "WALMART",
        "SHOPEE",
        "LAZADA",
        "MERCADOLIBRE",
        "ALIBABA",
        "WAYFAIR",
        "SHEIN",
        "NOON",
        "SHOPLINE",
        "PRESTASHOP",
        "SHOPIFY",
        "MAGENTO",
        "WOO_COMMERCE",
        "SQUARESPACE",
        "WIX",
        "SHOPER",
        "SHOPLAZZA",
        "BIG_COMMERCE",
        "SALLA",
        "ZID",
        "TIKTOKSHOP",
        "COMMERCELAYER",
        "WEBFLOW",
        "GUMROAD",
        "ECWID",
        "PAYPAL",
        "SQUARE",
        "STRIPE",
        "CLOVER",
        "MOLLIE",
        "PAYNL",
        "AUTHORIZENET",
        "RECHARGE",
        "CHARGIFY",
        "CHARGEBEE",
        "RECURLY",
        "KASHFLOW",
        "SAGE_INTACCT",
        "SAGE_INTACCT_V2",
        "DYNAMICS365",
        "DYNAMICS365FO",
        "ZOHOBOOKS",
        "EXACTONLINE",
        "FREEAGENT",
        "QUICKBOOKS",
        "QUICKBOOKS_DESKTOP",
        "FRESHBOOKS",
        "XERO",
        "SAGE_BUSINESS_CLOUD",
        "SAGE_50",
        "VISTA",
        "NETSUITE",
        "WAVE",
        "DUALENTRY",
        "CAMPFIRE",
        "RILLET",
        "SOFTLEDGER",
        "VISMA",
        "SPIRIS",
        "LEXWARE",
        "MONEYBIRD",
        "SAGE200CLOUD",
        "MX",
        "PLAID",
        "TELLER",
        "RAMP",
        "ODOO",
        "ACUMATICA",
        "FULFIL",
        "TALLY",
        "SAPBUSINESSONE",
        "SAPS4HANA",
        "WORKDAY",
        "ANFIX",
        "ORACLEFUSION",
        "HOLDED",
        "MYOBBUSINESS",
        "FORTNOX",
        "GOOGLE",
        "FACEBOOK",
        "TIKTOK",
        "INTUIT_BANK_FEEDS",
        "PLAID_BANK_FEEDS",
        "SAGE",
        "SAGE_BANK_FEEDS",
        "YODLEE_BANK_FEEDS",
        "QUICKBOOKS_HRIS",
        "BAMBOO_HR",
        "GUSTO",
        "DEEL",
        "RIPPLING"
      ],
      "description": "The underlying platform."
    },
    "Subscription": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The Rutter generated unique ID of the subscription.",
          "x-rutter-platforms": {
            "STRIPE": {}
          }
        },
        "platform_id": {
          "type": "string",
          "description": "The platform specific ID of the subscription.",
          "x-rutter-platforms": {
            "STRIPE": {}
          }
        },
        "platform_customer_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The platform specific ID of the customer linked to the subscription.",
          "x-rutter-platforms": {
            "STRIPE": {}
          }
        },
        "iso_currency_code": {
          "type": "string",
          "description": "The [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) currency code of the subscription.",
          "x-rutter-platforms": {
            "STRIPE": {}
          }
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "in_trial",
            "canceled",
            "paused",
            "unknown"
          ],
          "description": "Status of subscription. Possible values are: `active`, `in_trial`, `canceled`, `paused`, `unknown`",
          "x-rutter-platforms": {
            "STRIPE": {}
          }
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SubscriptionItem"
          },
          "description": "An array of subscription items linked to the subscription.",
          "x-rutter-platforms": {
            "STRIPE": {}
          }
        },
        "created_at": {
          "type": "string",
          "description": "The [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp that the subscription was created.",
          "x-rutter-platforms": {
            "STRIPE": {}
          }
        },
        "updated_at": {
          "type": "string",
          "description": "The [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp that the subscription was last updated.",
          "x-rutter-platforms": {
            "STRIPE": {}
          }
        },
        "platform_data": {
          "type": "object",
          "additionalProperties": {},
          "description": "The raw platform data corresponding to the Rutter object."
        }
      },
      "required": [
        "id",
        "platform_id",
        "iso_currency_code",
        "status",
        "created_at",
        "updated_at"
      ]
    },
    "SubscriptionItem": {
      "type": "object",
      "properties": {
        "platform_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The platform specific ID of the subscription line item.",
          "x-rutter-platforms": {
            "STRIPE": {}
          }
        },
        "interval": {
          "type": "string",
          "description": "Frequency with which this subscription item is billed. Accepted values include `day`, `week`, `month`, and `year`.",
          "x-rutter-platforms": {
            "STRIPE": {}
          }
        },
        "interval_count": {
          "type": "number",
          "description": "Number of intervals between subscription billings. For instance, if this is set to 3 and interval is set to month, the user would be billed every 3 months.",
          "x-rutter-platforms": {
            "STRIPE": {}
          }
        },
        "quantity": {
          "type": "number",
          "description": "The number of products sold in the subscription.",
          "x-rutter-platforms": {
            "STRIPE": {}
          }
        },
        "amount": {
          "type": [
            "number",
            "null"
          ],
          "description": "The total amount charged for the subscription line item.",
          "x-rutter-platforms": {
            "STRIPE": {}
          }
        },
        "unit_amount": {
          "type": [
            "number",
            "null"
          ],
          "description": "The unit cost of the product sold in the subscription.",
          "x-rutter-platforms": {
            "STRIPE": {}
          }
        }
      },
      "required": [
        "platform_id",
        "interval",
        "interval_count",
        "quantity",
        "amount",
        "unit_amount"
      ]
    },
    "Subscriptions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Subscription"
      }
    }
  }
}