Stripe · Schema

Stripe Subscription

Subscriptions allow you to charge a customer on a recurring basis. A subscription ties a customer to a particular plan or set of prices.

CommerceFinancial ServicesFintechPaymentsT1

Properties

Name Type Description
id string Unique identifier for the object.
object string String representing the object's type.
application stringnull ID of the Connect Application that created the subscription.
application_fee_percent numbernull A non-negative decimal between 0 and 100, with at most two decimal places.
automatic_tax object Automatic tax settings for this subscription.
billing_cycle_anchor integer The reference point that aligns future billing cycle dates.
billing_thresholds objectnull Define thresholds at which an invoice will be sent.
cancel_at integernull A date in the future at which the subscription will automatically get canceled.
cancel_at_period_end boolean If the subscription has been canceled with the at_period_end flag set to true.
canceled_at integernull If the subscription has been canceled, the date of that cancellation.
cancellation_details objectnull Details about why this subscription was cancelled.
collection_method string How the subscription's invoices are collected.
created integer Time at which the object was created.
currency string Three-letter ISO currency code.
current_period_end integer End of the current period that the subscription has been invoiced for.
current_period_start integer Start of the current period that the subscription has been invoiced for.
customer string ID of the customer who owns the subscription.
days_until_due integernull Number of days a customer has to pay invoices generated by this subscription.
default_payment_method stringnull ID of the default payment method for the subscription.
default_source stringnull ID of the default payment source for the subscription.
default_tax_rates arraynull The tax rates that will apply to any subscription item that does not have tax_rates set.
description stringnull The subscription's description.
discount objectnull Describes the current discount applied to this subscription.
ended_at integernull If the subscription has ended, the date the subscription ended.
items object List of subscription items, each with an attached price.
latest_invoice stringnull The most recent invoice this subscription has generated.
livemode boolean Has the value true if the object exists in live mode.
metadata object Set of key-value pairs attached to the object.
next_pending_invoice_item_invoice integernull Specifies the approximate timestamp on which any pending invoice items will be billed.
on_behalf_of stringnull The account (if any) the charge was made on behalf of for charges associated with this subscription.
pause_collection objectnull If specified, payment collection for this subscription will be paused.
payment_settings objectnull Payment settings passed on to invoices created by the subscription.
pending_invoice_item_interval objectnull Specifies an interval for how often to bill for any pending invoice items.
pending_setup_intent stringnull You can use this SetupIntent to collect user authentication.
pending_update objectnull If specified, pending updates that will be applied to the subscription once the latest_invoice has been paid.
schedule stringnull The schedule attached to the subscription.
start_date integer Date when the subscription was first created.
status string The status of the subscription.
test_clock stringnull ID of the test clock this subscription belongs to.
transfer_data objectnull The data with which to automatically create a Transfer for each of the associated subscription's invoices.
trial_end integernull If the subscription has a trial, the end of that trial.
trial_settings objectnull Settings related to subscription trials.
trial_start integernull If the subscription has a trial, the beginning of that trial.
View JSON Schema on GitHub

JSON Schema

stripe-subscription.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://stripe.com/schemas/subscription",
  "title": "Stripe Subscription",
  "description": "Subscriptions allow you to charge a customer on a recurring basis. A subscription ties a customer to a particular plan or set of prices.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the object.",
      "pattern": "^sub_"
    },
    "object": {
      "type": "string",
      "const": "subscription",
      "description": "String representing the object's type."
    },
    "application": {
      "type": ["string", "null"],
      "description": "ID of the Connect Application that created the subscription."
    },
    "application_fee_percent": {
      "type": ["number", "null"],
      "description": "A non-negative decimal between 0 and 100, with at most two decimal places."
    },
    "automatic_tax": {
      "type": "object",
      "description": "Automatic tax settings for this subscription.",
      "properties": {
        "enabled": { "type": "boolean" },
        "liability": { "type": ["object", "null"] }
      },
      "required": ["enabled"]
    },
    "billing_cycle_anchor": {
      "type": "integer",
      "description": "The reference point that aligns future billing cycle dates."
    },
    "billing_thresholds": {
      "type": ["object", "null"],
      "description": "Define thresholds at which an invoice will be sent."
    },
    "cancel_at": {
      "type": ["integer", "null"],
      "description": "A date in the future at which the subscription will automatically get canceled."
    },
    "cancel_at_period_end": {
      "type": "boolean",
      "description": "If the subscription has been canceled with the at_period_end flag set to true."
    },
    "canceled_at": {
      "type": ["integer", "null"],
      "description": "If the subscription has been canceled, the date of that cancellation."
    },
    "cancellation_details": {
      "type": ["object", "null"],
      "description": "Details about why this subscription was cancelled."
    },
    "collection_method": {
      "type": "string",
      "description": "How the subscription's invoices are collected.",
      "enum": ["charge_automatically", "send_invoice"]
    },
    "created": {
      "type": "integer",
      "description": "Time at which the object was created."
    },
    "currency": {
      "type": "string",
      "description": "Three-letter ISO currency code."
    },
    "current_period_end": {
      "type": "integer",
      "description": "End of the current period that the subscription has been invoiced for."
    },
    "current_period_start": {
      "type": "integer",
      "description": "Start of the current period that the subscription has been invoiced for."
    },
    "customer": {
      "type": "string",
      "description": "ID of the customer who owns the subscription."
    },
    "days_until_due": {
      "type": ["integer", "null"],
      "description": "Number of days a customer has to pay invoices generated by this subscription."
    },
    "default_payment_method": {
      "type": ["string", "null"],
      "description": "ID of the default payment method for the subscription."
    },
    "default_source": {
      "type": ["string", "null"],
      "description": "ID of the default payment source for the subscription."
    },
    "default_tax_rates": {
      "type": ["array", "null"],
      "description": "The tax rates that will apply to any subscription item that does not have tax_rates set.",
      "items": { "type": "object" }
    },
    "description": {
      "type": ["string", "null"],
      "description": "The subscription's description."
    },
    "discount": {
      "type": ["object", "null"],
      "description": "Describes the current discount applied to this subscription."
    },
    "ended_at": {
      "type": ["integer", "null"],
      "description": "If the subscription has ended, the date the subscription ended."
    },
    "items": {
      "type": "object",
      "description": "List of subscription items, each with an attached price."
    },
    "latest_invoice": {
      "type": ["string", "null"],
      "description": "The most recent invoice this subscription has generated."
    },
    "livemode": {
      "type": "boolean",
      "description": "Has the value true if the object exists in live mode."
    },
    "metadata": {
      "type": "object",
      "description": "Set of key-value pairs attached to the object.",
      "additionalProperties": { "type": "string" }
    },
    "next_pending_invoice_item_invoice": {
      "type": ["integer", "null"],
      "description": "Specifies the approximate timestamp on which any pending invoice items will be billed."
    },
    "on_behalf_of": {
      "type": ["string", "null"],
      "description": "The account (if any) the charge was made on behalf of for charges associated with this subscription."
    },
    "pause_collection": {
      "type": ["object", "null"],
      "description": "If specified, payment collection for this subscription will be paused."
    },
    "payment_settings": {
      "type": ["object", "null"],
      "description": "Payment settings passed on to invoices created by the subscription."
    },
    "pending_invoice_item_interval": {
      "type": ["object", "null"],
      "description": "Specifies an interval for how often to bill for any pending invoice items."
    },
    "pending_setup_intent": {
      "type": ["string", "null"],
      "description": "You can use this SetupIntent to collect user authentication."
    },
    "pending_update": {
      "type": ["object", "null"],
      "description": "If specified, pending updates that will be applied to the subscription once the latest_invoice has been paid."
    },
    "schedule": {
      "type": ["string", "null"],
      "description": "The schedule attached to the subscription."
    },
    "start_date": {
      "type": "integer",
      "description": "Date when the subscription was first created."
    },
    "status": {
      "type": "string",
      "description": "The status of the subscription.",
      "enum": [
        "active",
        "canceled",
        "incomplete",
        "incomplete_expired",
        "past_due",
        "paused",
        "trialing",
        "unpaid"
      ]
    },
    "test_clock": {
      "type": ["string", "null"],
      "description": "ID of the test clock this subscription belongs to."
    },
    "transfer_data": {
      "type": ["object", "null"],
      "description": "The data with which to automatically create a Transfer for each of the associated subscription's invoices."
    },
    "trial_end": {
      "type": ["integer", "null"],
      "description": "If the subscription has a trial, the end of that trial."
    },
    "trial_settings": {
      "type": ["object", "null"],
      "description": "Settings related to subscription trials."
    },
    "trial_start": {
      "type": ["integer", "null"],
      "description": "If the subscription has a trial, the beginning of that trial."
    }
  },
  "required": [
    "id",
    "object",
    "automatic_tax",
    "billing_cycle_anchor",
    "cancel_at_period_end",
    "collection_method",
    "created",
    "currency",
    "current_period_end",
    "current_period_start",
    "customer",
    "items",
    "livemode",
    "metadata",
    "start_date",
    "status"
  ]
}