source_transaction
{
"type": "object",
"title": "SourceTransaction",
"required": [
"amount",
"created",
"currency",
"id",
"livemode",
"object",
"source",
"status",
"type"
],
"properties": {
"id": {
"type": "string",
"maxLength": 5000,
"description": "Unique identifier for the object."
},
"type": {
"enum": [
"ach_credit_transfer",
"ach_debit",
"alipay",
"bancontact",
"card",
"card_present",
"eps",
"giropay",
"ideal",
"klarna",
"multibanco",
"p24",
"sepa_debit",
"sofort",
"three_d_secure",
"wechat"
],
"type": "string",
"description": "The type of source this transaction is attached to."
},
"amount": {
"type": "integer",
"description": "A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver."
},
"object": {
"enum": [
"source_transaction"
],
"type": "string",
"description": "String representing the object's type. Objects of the same type share the same value."
},
"source": {
"type": "string",
"maxLength": 5000,
"description": "The ID of the source this transaction is attached to."
},
"status": {
"type": "string",
"maxLength": 5000,
"description": "The status of the transaction, one of `succeeded`, `pending`, or `failed`."
},
"created": {
"type": "integer",
"format": "unix-time",
"description": "Time at which the object was created. Measured in seconds since the Unix epoch."
},
"currency": {
"type": "string",
"format": "currency",
"description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies)."
},
"livemode": {
"type": "boolean",
"description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`."
},
"paper_check": {
"$ref": "#/components/schemas/source_transaction_paper_check_data"
},
"ach_credit_transfer": {
"$ref": "#/components/schemas/source_transaction_ach_credit_transfer_data"
},
"chf_credit_transfer": {
"$ref": "#/components/schemas/source_transaction_chf_credit_transfer_data"
},
"gbp_credit_transfer": {
"$ref": "#/components/schemas/source_transaction_gbp_credit_transfer_data"
},
"sepa_credit_transfer": {
"$ref": "#/components/schemas/source_transaction_sepa_credit_transfer_data"
}
},
"description": "Some payment methods have no required amount that a customer must send.\nCustomers can be instructed to send any amount, and it can be made up of\nmultiple transactions. As such, sources can have multiple associated\ntransactions.",
"x-resourceId": "source_transaction",
"x-expandableFields": [
"ach_credit_transfer",
"chf_credit_transfer",
"gbp_credit_transfer",
"paper_check",
"sepa_credit_transfer"
]
}
source_transaction_ach_credit_transfer_data
{
"type": "object",
"title": "SourceTransactionAchCreditTransferData",
"properties": {
"last4": {
"type": "string",
"maxLength": 5000,
"description": "Last 4 digits of the account number associated with the transfer."
},
"fingerprint": {
"type": "string",
"maxLength": 5000,
"description": "Bank account fingerprint associated with the transfer."
},
"customer_data": {
"type": "string",
"maxLength": 5000,
"description": "Customer data associated with the transfer."
},
"routing_number": {
"type": "string",
"maxLength": 5000,
"description": "Routing number associated with the transfer."
}
},
"description": "",
"x-expandableFields": []
}
source_transaction_chf_credit_transfer_data
{
"type": "object",
"title": "SourceTransactionChfCreditTransferData",
"properties": {
"reference": {
"type": "string",
"maxLength": 5000,
"description": "Reference associated with the transfer."
},
"sender_iban": {
"type": "string",
"maxLength": 5000,
"description": "Sender's bank account IBAN."
},
"sender_name": {
"type": "string",
"maxLength": 5000,
"description": "Sender's name."
},
"sender_address_line1": {
"type": "string",
"maxLength": 5000,
"description": "Sender's line 1 address."
},
"sender_address_country": {
"type": "string",
"maxLength": 5000,
"description": "Sender's country address."
}
},
"description": "",
"x-expandableFields": []
}
source_transaction_gbp_credit_transfer_data
{
"type": "object",
"title": "SourceTransactionGbpCreditTransferData",
"properties": {
"last4": {
"type": "string",
"maxLength": 5000,
"description": "Last 4 digits of sender account number associated with the transfer."
},
"reference": {
"type": "string",
"maxLength": 5000,
"description": "Sender entered arbitrary information about the transfer."
},
"fingerprint": {
"type": "string",
"maxLength": 5000,
"description": "Bank account fingerprint associated with the Stripe owned bank account receiving the transfer."
},
"sender_name": {
"type": "string",
"maxLength": 5000,
"description": "Sender name associated with the transfer."
},
"funding_method": {
"type": "string",
"maxLength": 5000,
"description": "The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported."
},
"sender_sort_code": {
"type": "string",
"maxLength": 5000,
"description": "Sender sort code associated with the transfer."
},
"sender_account_number": {
"type": "string",
"maxLength": 5000,
"description": "Sender account number associated with the transfer."
}
},
"description": "",
"x-expandableFields": []
}
source_transaction_paper_check_data
{
"type": "object",
"title": "SourceTransactionPaperCheckData",
"properties": {
"invoices": {
"type": "string",
"maxLength": 5000,
"description": "Comma-separated list of invoice IDs associated with the paper check."
},
"available_at": {
"type": "string",
"maxLength": 5000,
"description": "Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch."
}
},
"description": "",
"x-expandableFields": []
}
source_transaction_sepa_credit_transfer_data
{
"type": "object",
"title": "SourceTransactionSepaCreditTransferData",
"properties": {
"reference": {
"type": "string",
"maxLength": 5000,
"description": "Reference associated with the transfer."
},
"sender_iban": {
"type": "string",
"maxLength": 5000,
"description": "Sender's bank account IBAN."
},
"sender_name": {
"type": "string",
"maxLength": 5000,
"description": "Sender's name."
}
},
"description": "",
"x-expandableFields": []
}
source_type_ach_credit_transfer
{
"type": "object",
"properties": {
"bank_name": {
"type": "string",
"nullable": true
},
"swift_code": {
"type": "string",
"nullable": true
},
"fingerprint": {
"type": "string",
"nullable": true
},
"account_number": {
"type": "string",
"nullable": true
},
"routing_number": {
"type": "string",
"nullable": true
},
"refund_routing_number": {
"type": "string",
"nullable": true
},
"refund_account_holder_name": {
"type": "string",
"nullable": true
},
"refund_account_holder_type": {
"type": "string",
"nullable": true
}
}
}
source_type_ach_debit
{
"type": "object",
"properties": {
"type": {
"type": "string",
"nullable": true
},
"last4": {
"type": "string",
"nullable": true
},
"country": {
"type": "string",
"nullable": true
},
"bank_name": {
"type": "string",
"nullable": true
},
"fingerprint": {
"type": "string",
"nullable": true
},
"routing_number": {
"type": "string",
"nullable": true
}
}
}
source_type_acss_debit
{
"type": "object",
"properties": {
"last4": {
"type": "string",
"nullable": true
},
"country": {
"type": "string",
"nullable": true
},
"category": {
"type": "string",
"nullable": true
},
"bank_name": {
"type": "string",
"nullable": true
},
"fingerprint": {
"type": "string",
"nullable": true
},
"routing_number": {
"type": "string",
"nullable": true
},
"bank_address_city": {
"type": "string",
"nullable": true
},
"bank_address_line_1": {
"type": "string",
"nullable": true
},
"bank_address_line_2": {
"type": "string",
"nullable": true
},
"bank_address_postal_code": {
"type": "string",
"nullable": true
}
}
}
source_type_alipay
{
"type": "object",
"properties": {
"native_url": {
"type": "string",
"nullable": true
},
"data_string": {
"type": "string",
"nullable": true
},
"statement_descriptor": {
"type": "string",
"nullable": true
}
}
}
source_type_au_becs_debit
{
"type": "object",
"properties": {
"last4": {
"type": "string",
"nullable": true
},
"bsb_number": {
"type": "string",
"nullable": true
},
"fingerprint": {
"type": "string",
"nullable": true
}
}
}
source_type_bancontact
{
"type": "object",
"properties": {
"bic": {
"type": "string",
"nullable": true
},
"bank_code": {
"type": "string",
"nullable": true
},
"bank_name": {
"type": "string",
"nullable": true
},
"iban_last4": {
"type": "string",
"nullable": true
},
"preferred_language": {
"type": "string",
"nullable": true
},
"statement_descriptor": {
"type": "string",
"nullable": true
}
}
}
source_type_card
{
"type": "object",
"properties": {
"name": {
"type": "string",
"nullable": true
},
"brand": {
"type": "string",
"nullable": true
},
"last4": {
"type": "string",
"nullable": true
},
"country": {
"type": "string",
"nullable": true
},
"funding": {
"type": "string",
"nullable": true
},
"exp_year": {
"type": "integer",
"nullable": true
},
"cvc_check": {
"type": "string",
"nullable": true
},
"exp_month": {
"type": "integer",
"nullable": true
},
"fingerprint": {
"type": "string"
},
"dynamic_last4": {
"type": "string",
"nullable": true
},
"three_d_secure": {
"type": "string"
},
"address_zip_check": {
"type": "string",
"nullable": true
},
"address_line1_check": {
"type": "string",
"nullable": true
},
"tokenization_method": {
"type": "string",
"nullable": true
}
}
}
source_type_card_present
{
"type": "object",
"properties": {
"brand": {
"type": "string",
"nullable": true
},
"last4": {
"type": "string",
"nullable": true
},
"reader": {
"type": "string",
"nullable": true
},
"country": {
"type": "string",
"nullable": true
},
"funding": {
"type": "string",
"nullable": true
},
"cvm_type": {
"type": "string"
},
"exp_year": {
"type": "integer",
"nullable": true
},
"data_type": {
"type": "string",
"nullable": true
},
"exp_month": {
"type": "integer",
"nullable": true
},
"fingerprint": {
"type": "string"
},
"read_method": {
"type": "string",
"nullable": true
},
"emv_auth_data": {
"type": "string"
},
"pos_device_id": {
"type": "string",
"nullable": true
},
"pos_entry_mode": {
"type": "string"
},
"authorization_code": {
"type": "string",
"nullable": true
},
"dedicated_file_name": {
"type": "string"
},
"application_cryptogram": {
"type": "string"
},
"application_preferred_name": {
"type": "string"
},
"authorization_response_code": {
"type": "string"
},
"evidence_customer_signature": {
"type": "string",
"nullable": true
},
"terminal_verification_results": {
"type": "string"
},
"transaction_status_information": {
"type": "string"
},
"evidence_transaction_certificate": {
"type": "string",
"nullable": true
}
}
}
source_type_eps
{
"type": "object",
"properties": {
"reference": {
"type": "string",
"nullable": true
},
"statement_descriptor": {
"type": "string",
"nullable": true
}
}
}
source_type_giropay
{
"type": "object",
"properties": {
"bic": {
"type": "string",
"nullable": true
},
"bank_code": {
"type": "string",
"nullable": true
},
"bank_name": {
"type": "string",
"nullable": true
},
"statement_descriptor": {
"type": "string",
"nullable": true
}
}
}
source_type_ideal
{
"type": "object",
"properties": {
"bic": {
"type": "string",
"nullable": true
},
"bank": {
"type": "string",
"nullable": true
},
"iban_last4": {
"type": "string",
"nullable": true
},
"statement_descriptor": {
"type": "string",
"nullable": true
}
}
}
source_type_klarna
{
"type": "object",
"properties": {
"locale": {
"type": "string"
},
"logo_url": {
"type": "string"
},
"last_name": {
"type": "string"
},
"first_name": {
"type": "string"
},
"page_title": {
"type": "string"
},
"client_token": {
"type": "string",
"nullable": true
},
"pay_now_name": {
"type": "string"
},
"redirect_url": {
"type": "string"
},
"purchase_type": {
"type": "string"
},
"pay_later_name": {
"type": "string"
},
"shipping_delay": {
"type": "integer"
},
"purchase_country": {
"type": "string"
},
"pay_over_time_name": {
"type": "string"
},
"shipping_last_name": {
"type": "string"
},
"shipping_first_name": {
"type": "string"
},
"background_image_url": {
"type": "string"
},
"pay_now_redirect_url": {
"type": "string"
},
"pay_later_redirect_url": {
"type": "string"
},
"payment_method_categories": {
"type": "string"
},
"pay_over_time_redirect_url": {
"type": "string"
},
"pay_now_asset_urls_standard": {
"type": "string"
},
"pay_later_asset_urls_standard": {
"type": "string"
},
"pay_now_asset_urls_descriptive": {
"type": "string"
},
"pay_later_asset_urls_descriptive": {
"type": "string"
},
"pay_over_time_asset_urls_standard": {
"type": "string"
},
"pay_over_time_asset_urls_descriptive": {
"type": "string"
}
}
}
source_type_multibanco
{
"type": "object",
"properties": {
"entity": {
"type": "string",
"nullable": true
},
"reference": {
"type": "string",
"nullable": true
},
"refund_iban": {
"type": "string",
"nullable": true
},
"refund_account_holder_name": {
"type": "string",
"nullable": true
},
"refund_account_holder_address_city": {
"type": "string",
"nullable": true
},
"refund_account_holder_address_line1": {
"type": "string",
"nullable": true
},
"refund_account_holder_address_line2": {
"type": "string",
"nullable": true
},
"refund_account_holder_address_state": {
"type": "string",
"nullable": true
},
"refund_account_holder_address_country": {
"type": "string",
"nullable": true
},
"refund_account_holder_address_postal_code": {
"type": "string",
"nullable": true
}
}
}
source_type_p24
{
"type": "object",
"properties": {
"reference": {
"type": "string",
"nullable": true
}
}
}
source_type_sepa_debit
{
"type": "object",
"properties": {
"last4": {
"type": "string",
"nullable": true
},
"country": {
"type": "string",
"nullable": true
},
"bank_code": {
"type": "string",
"nullable": true
},
"branch_code": {
"type": "string",
"nullable": true
},
"fingerprint": {
"type": "string",
"nullable": true
},
"mandate_url": {
"type": "string",
"nullable": true
},
"mandate_reference": {
"type": "string",
"nullable": true
}
}
}
source_type_sofort
{
"type": "object",
"properties": {
"bic": {
"type": "string",
"nullable": true
},
"country": {
"type": "string",
"nullable": true
},
"bank_code": {
"type": "string",
"nullable": true
},
"bank_name": {
"type": "string",
"nullable": true
},
"iban_last4": {
"type": "string",
"nullable": true
},
"preferred_language": {
"type": "string",
"nullable": true
},
"statement_descriptor": {
"type": "string",
"nullable": true
}
}
}
source_type_three_d_secure
{
"type": "object",
"properties": {
"card": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"brand": {
"type": "string",
"nullable": true
},
"last4": {
"type": "string",
"nullable": true
},
"country": {
"type": "string",
"nullable": true
},
"funding": {
"type": "string",
"nullable": true
},
"customer": {
"type": "string",
"nullable": true
},
"exp_year": {
"type": "integer",
"nullable": true
},
"cvc_check": {
"type": "string",
"nullable": true
},
"exp_month": {
"type": "integer",
"nullable": true
},
"fingerprint": {
"type": "string"
},
"authenticated": {
"type": "boolean",
"nullable": true
},
"dynamic_last4": {
"type": "string",
"nullable": true
},
"three_d_secure": {
"type": "string"
},
"address_zip_check": {
"type": "string",
"nullable": true
},
"address_line1_check": {
"type": "string",
"nullable": true
},
"tokenization_method": {
"type": "string",
"nullable": true
}
}
}
source_type_wechat
{
"type": "object",
"properties": {
"prepay_id": {
"type": "string"
},
"qr_code_url": {
"type": "string",
"nullable": true
},
"statement_descriptor": {
"type": "string"
}
}
}
stackable_discount_with_discount_settings
{
"type": "object",
"title": "StackableDiscountWithDiscountSettings",
"properties": {
"coupon": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/coupon"
}
],
"nullable": true,
"description": "ID of the coupon to create a new discount for.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/coupon"
}
]
}
},
"discount": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/discount"
}
],
"nullable": true,
"description": "ID of an existing discount on the object (or one of its ancestors) to reuse.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/discount"
}
]
}
},
"promotion_code": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/promotion_code"
}
],
"nullable": true,
"description": "ID of the promotion code to create a new discount for.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/promotion_code"
}
]
}
}
},
"description": "",
"x-expandableFields": [
"coupon",
"discount",
"promotion_code"
]
}
stackable_discount_with_discount_settings_and_discount_end
{
"type": "object",
"title": "StackableDiscountWithDiscountSettingsAndDiscountEnd",
"properties": {
"coupon": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/coupon"
}
],
"nullable": true,
"description": "ID of the coupon to create a new discount for.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/coupon"
}
]
}
},
"discount": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/discount"
}
],
"nullable": true,
"description": "ID of an existing discount on the object (or one of its ancestors) to reuse.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/discount"
}
]
}
},
"promotion_code": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/promotion_code"
}
],
"nullable": true,
"description": "ID of the promotion code to create a new discount for.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/promotion_code"
}
]
}
}
},
"description": "",
"x-expandableFields": [
"coupon",
"discount",
"promotion_code"
]
}
subscription
{
"type": "object",
"title": "Subscription",
"required": [
"automatic_tax",
"billing_cycle_anchor",
"billing_mode",
"billing_schedules",
"cancel_at_period_end",
"collection_method",
"created",
"currency",
"customer",
"discounts",
"id",
"invoice_settings",
"items",
"livemode",
"metadata",
"object",
"start_date",
"status"
],
"properties": {
"id": {
"type": "string",
"maxLength": 5000,
"description": "Unique identifier for the object."
},
"items": {
"type": "object",
"title": "SubscriptionItemList",
"required": [
"data",
"has_more",
"object",
"url"
],
"properties": {
"url": {
"type": "string",
"maxLength": 5000,
"description": "The URL where this list can be accessed."
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/subscription_item"
},
"description": "Details about each object."
},
"object": {
"enum": [
"list"
],
"type": "string",
"description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`."
},
"has_more": {
"type": "boolean",
"description": "True if this list has another page of items after this one that can be fetched."
}
},
"description": "List of subscription items, each with an attached price.",
"x-expandableFields": [
"data"
]
},
"object": {
"enum": [
"subscription"
],
"type": "string",
"description": "String representing the object's type. Objects of the same type share the same value."
},
"status": {
"enum": [
"active",
"canceled",
"incomplete",
"incomplete_expired",
"past_due",
"paused",
"trialing",
"unpaid"
],
"type": "string",
"description": "Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`. \n\nFor `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` status. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal status, the open invoice will be voided and no further invoices will be generated. \n\nA subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. \n\nA subscription can only enter a `paused` status [when a trial ends without a payment method](https://docs.stripe.com/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged. \n\nIf subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). \n\nIf subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices."
},
"created": {
"type": "integer",
"format": "unix-time",
"description": "Time at which the object was created. Measured in seconds since the Unix epoch."
},
"currency": {
"type": "string",
"format": "currency",
"description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies)."
},
"customer": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/customer"
},
{
"$ref": "#/components/schemas/deleted_customer"
}
],
"description": "ID of the customer who owns the subscription.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/customer"
},
{
"$ref": "#/components/schemas/deleted_customer"
}
]
}
},
"ended_at": {
"type": "integer",
"format": "unix-time",
"nullable": true,
"description": "If the subscription has ended, the date the subscription ended."
},
"livemode": {
"type": "boolean",
"description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`."
},
"metadata": {
"type": "object",
"description": "Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.",
"additionalProperties": {
"type": "string",
"maxLength": 500
}
},
"schedule": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/subscription_schedule"
}
],
"nullable": true,
"description": "The schedule attached to the subscription",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/subscription_schedule"
}
]
}
},
"cancel_at": {
"type": "integer",
"format": "unix-time",
"nullable": true,
"description": "A date in the future at which the subscription will automatically get canceled"
},
"discounts": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/discount"
}
],
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/discount"
}
]
}
},
"description": "The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount."
},
"trial_end": {
"type": "integer",
"format": "unix-time",
"nullable": true,
"description": "If the subscription has a trial, the end of that trial."
},
"start_date": {
"type": "integer",
"format": "unix-time",
"description": "Date when the subscription was first created. The date might differ from the `created` date due to backdating."
},
"test_clock": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/test_helpers.test_clock"
}
],
"nullable": true,
"description": "ID of the test clock this subscription belongs to.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/test_helpers.test_clock"
}
]
}
},
"application": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/application"
},
{
"$ref": "#/components/schemas/deleted_application"
}
],
"nullable": true,
"description": "ID of the Connect Application that created the subscription.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/application"
},
{
"$ref": "#/components/schemas/deleted_application"
}
]
}
},
"canceled_at": {
"type": "integer",
"format": "unix-time",
"nullable": true,
"description": "If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state."
},
"description": {
"type": "string",
"nullable": true,
"maxLength": 500,
"description": "The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs."
},
"trial_start": {
"type": "integer",
"format": "unix-time",
"nullable": true,
"description": "If the subscription has a trial, the beginning of that trial."
},
"billing_mode": {
"$ref": "#/components/schemas/subscriptions_resource_billing_mode"
},
"on_behalf_of": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/account"
}
],
"nullable": true,
"description": "The account (if any) the charge was made on behalf of for charges associated with this subscription. See the [Connect documentation](https://docs.stripe.com/connect/subscriptions#on-behalf-of) for details.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/account"
}
]
}
},
"automatic_tax": {
"$ref": "#/components/schemas/subscription_automatic_tax"
},
"transfer_data": {
"anyOf": [
{
"$ref": "#/components/schemas/subscription_transfer_data"
}
],
"nullable": true,
"description": "The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices."
},
"days_until_due": {
"type": "integer",
"nullable": true,
"description": "Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`."
},
"default_source": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/bank_account"
},
{
"$ref": "#/components/schemas/card"
},
{
"$ref": "#/components/schemas/source"
}
],
"nullable": true,
"description": "ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://docs.stripe.com/api/customers/object#customer_object-default_source).",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/bank_account"
},
{
"$ref": "#/components/schemas/card"
},
{
"$ref": "#/components/schemas/source"
}
]
},
"x-stripeBypassValidation": true
},
"latest_invoice": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/invoice"
}
],
"nullable": true,
"description": "The most recent invoice this subscription has generated over its lifecycle (for example, when it cycles or is updated).",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/invoice"
}
]
}
},
"pending_update": {
"anyOf": [
{
"$ref": "#/components/schemas/subscriptions_resource_pending_update"
}
],
"nullable": true,
"description": "If specified, [pending updates](https://docs.stripe.com/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid."
},
"trial_settings": {
"anyOf": [
{
"$ref": "#/components/schemas/subscriptions_resource_trial_settings_trial_settings"
}
],
"nullable": true,
"description": "Settings related to subscription trials."
},
"customer_account": {
"type": "string",
"nullable": true,
"maxLength": 5000,
"description": "ID of the account representing the customer who owns the subscription."
},
"invoice_settings": {
"$ref": "#/components/schemas/subscriptions_resource_subscription_invoice_settings"
},
"managed_payments": {
"anyOf": [
{
"$ref": "#/components/schemas/smor_resource_managed_payments"
}
],
"nullable": true,
"description": "Settings for Managed Payments for this Subscription and resulting [Invoices](/api/invoices/object) and [PaymentIntents](/api/payment_intents/object)."
},
"pause_collection": {
"anyOf": [
{
"$ref": "#/components/schemas/subscriptions_resource_pause_collection"
}
],
"nullable": true,
"description": "If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment)."
},
"payment_settings": {
"anyOf": [
{
"$ref": "#/components/schemas/subscriptions_resource_payment_settings"
}
],
"nullable": true,
"description": "Payment settings passed on to invoices created by the subscription."
},
"billing_schedules": {
"type": "array",
"items": {
"$ref": "#/components/schemas/subscriptions_resource_billing_schedules"
},
"description": "Billing schedules for this subscription."
},
"collection_method": {
"enum": [
"charge_automatically",
"send_invoice"
],
"type": "string",
"description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`."
},
"default_tax_rates": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tax_rate"
},
"nullable": true,
"description": "The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription."
},
"billing_thresholds": {
"anyOf": [
{
"$ref": "#/components/schemas/subscription_billing_thresholds"
}
],
"nullable": true,
"description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period"
},
"presentment_details": {
"$ref": "#/components/schemas/subscriptions_resource_subscription_presentment_details"
},
"billing_cycle_anchor": {
"type": "integer",
"format": "unix-time",
"description": "The reference point that aligns future [billing cycle](https://docs.stripe.com/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format."
},
"cancel_at_period_end": {
"type": "boolean",
"description": "Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period."
},
"cancellation_details": {
"anyOf": [
{
"$ref": "#/components/schemas/cancellation_details"
}
],
"nullable": true,
"description": "Details about why this subscription was cancelled"
},
"pending_setup_intent": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/setup_intent"
}
],
"nullable": true,
"description": "You can use this [SetupIntent](https://docs.stripe.com/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://docs.stripe.com/billing/migration/strong-customer-authentication#scenario-2).",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/setup_intent"
}
]
}
},
"default_payment_method": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/payment_method"
}
],
"nullable": true,
"description": "ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://docs.stripe.com/api/customers/object#customer_object-default_source).",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/payment_method"
}
]
}
},
"application_fee_percent": {
"type": "number",
"nullable": true,
"description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account."
},
"billing_cycle_anchor_config": {
"anyOf": [
{
"$ref": "#/components/schemas/subscriptions_resource_billing_cycle_anchor_config"
}
],
"nullable": true,
"description": "The fixed values used to calculate the `billing_cycle_anchor`."
},
"pending_invoice_item_interval": {
"anyOf": [
{
"$ref": "#/components/schemas/subscription_pending_invoice_item_interval"
}
],
"nullable": true,
"description": "Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](/api/invoices/create) for the given subscription at the specified interval."
},
"next_pending_invoice_item_invoice": {
"type": "integer",
"format": "unix-time",
"nullable": true,
"description": "Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`."
}
},
"description": "Subscriptions allow you to charge a customer on a recurring basis.\n\nRelated guide: [Creating subscriptions](https://docs.stripe.com/billing/subscriptions/creating)",
"x-resourceId": "subscription",
"x-expandableFields": [
"application",
"automatic_tax",
"billing_cycle_anchor_config",
"billing_mode",
"billing_schedules",
"billing_thresholds",
"cancellation_details",
"customer",
"default_payment_method",
"default_source",
"default_tax_rates",
"discounts",
"invoice_settings",
"items",
"latest_invoice",
"managed_payments",
"on_behalf_of",
"pause_collection",
"payment_settings",
"pending_invoice_item_interval",
"pending_setup_intent",
"pending_update",
"presentment_details",
"schedule",
"test_clock",
"transfer_data",
"trial_settings"
]
}
subscription_automatic_tax
{
"type": "object",
"title": "SubscriptionAutomaticTax",
"required": [
"enabled"
],
"properties": {
"enabled": {
"type": "boolean",
"description": "Whether Stripe automatically computes tax on this subscription."
},
"liability": {
"anyOf": [
{
"$ref": "#/components/schemas/connect_account_reference"
}
],
"nullable": true,
"description": "The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account."
},
"disabled_reason": {
"enum": [
"requires_location_inputs"
],
"type": "string",
"nullable": true,
"description": "If Stripe disabled automatic tax, this enum describes why."
}
},
"description": "",
"x-expandableFields": [
"liability"
]
}
subscription_billing_thresholds
{
"type": "object",
"title": "SubscriptionBillingThresholds",
"properties": {
"amount_gte": {
"type": "integer",
"nullable": true,
"description": "Monetary threshold that triggers the subscription to create an invoice"
},
"reset_billing_cycle_anchor": {
"type": "boolean",
"nullable": true,
"description": "Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`."
}
},
"description": "",
"x-expandableFields": []
}
subscription_item
{
"type": "object",
"title": "SubscriptionItem",
"required": [
"created",
"current_period_end",
"current_period_start",
"discounts",
"id",
"metadata",
"object",
"price",
"subscription"
],
"properties": {
"id": {
"type": "string",
"maxLength": 5000,
"description": "Unique identifier for the object."
},
"price": {
"$ref": "#/components/schemas/price"
},
"object": {
"enum": [
"subscription_item"
],
"type": "string",
"description": "String representing the object's type. Objects of the same type share the same value."
},
"created": {
"type": "integer",
"description": "Time at which the object was created. Measured in seconds since the Unix epoch."
},
"metadata": {
"type": "object",
"description": "Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.",
"additionalProperties": {
"type": "string",
"maxLength": 500
}
},
"quantity": {
"type": "integer",
"description": "The [quantity](https://docs.stripe.com/subscriptions/quantities) of the plan to which the customer should be subscribed."
},
"discounts": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/discount"
}
],
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/discount"
}
]
}
},
"description": "The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount."
},
"tax_rates": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tax_rate"
},
"nullable": true,
"description": "The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`."
},
"billed_until": {
"type": "integer",
"format": "unix-time",
"description": "The time period the subscription item has been billed for."
},
"subscription": {
"type": "string",
"maxLength": 5000,
"description": "The `subscription` this `subscription_item` belongs to."
},
"billing_thresholds": {
"anyOf": [
{
"$ref": "#/components/schemas/subscription_item_billing_thresholds"
}
],
"nullable": true,
"description": "Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period"
},
"current_period_end": {
"type": "integer",
"format": "unix-time",
"description": "The end time of this subscription item's current billing period."
},
"current_period_start": {
"type": "integer",
"format": "unix-time",
"description": "The start time of this subscription item's current billing period."
}
},
"description": "Subscription items allow you to create customer subscriptions with more than\none plan, making it easy to represent complex billing relationships.",
"x-resourceId": "subscription_item",
"x-expandableFields": [
"billing_thresholds",
"discounts",
"price",
"tax_rates"
]
}
subscription_item_billing_thresholds
{
"type": "object",
"title": "SubscriptionItemBillingThresholds",
"properties": {
"usage_gte": {
"type": "integer",
"nullable": true,
"description": "Usage threshold that triggers the subscription to create an invoice"
}
},
"description": "",
"x-expandableFields": []
}
subscription_payment_method_options_card
{
"type": "object",
"title": "subscription_payment_method_options_card",
"properties": {
"network": {
"enum": [
"amex",
"cartes_bancaires",
"diners",
"discover",
"eftpos_au",
"girocard",
"interac",
"jcb",
"link",
"mastercard",
"unionpay",
"unknown",
"visa"
],
"type": "string",
"nullable": true,
"description": "Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time."
},
"mandate_options": {
"$ref": "#/components/schemas/invoice_mandate_options_card"
},
"request_three_d_secure": {
"enum": [
"any",
"automatic",
"challenge"
],
"type": "string",
"nullable": true,
"description": "We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine."
}
},
"description": "",
"x-expandableFields": [
"mandate_options"
]
}
subscription_payment_method_options_mandate_options_pix
{
"type": "object",
"title": "subscription_payment_method_options_mandate_options_pix",
"properties": {
"amount": {
"type": "integer",
"nullable": true,
"description": "Amount to be charged for future payments."
},
"end_date": {
"type": "string",
"nullable": true,
"maxLength": 5000,
"description": "Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`."
},
"payment_schedule": {
"enum": [
"halfyearly",
"monthly",
"quarterly",
"weekly",
"yearly"
],
"type": "string",
"nullable": true,
"description": "Schedule at which the future payments will be charged."
},
"amount_includes_iof": {
"enum": [
"always",
"never"
],
"type": "string",
"nullable": true,
"description": "Determines if the amount includes the IOF tax."
}
},
"description": "",
"x-expandableFields": []
}
subscription_payment_method_options_pix
{
"type": "object",
"title": "subscription_payment_method_options_pix",
"properties": {
"mandate_options": {
"$ref": "#/components/schemas/subscription_payment_method_options_mandate_options_pix"
},
"expires_after_seconds": {
"type": "integer",
"description": "The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds."
}
},
"description": "",
"x-expandableFields": [
"mandate_options"
]
}
subscription_pending_invoice_item_interval
{
"type": "object",
"title": "SubscriptionPendingInvoiceItemInterval",
"required": [
"interval",
"interval_count"
],
"properties": {
"interval": {
"enum": [
"day",
"month",
"week",
"year"
],
"type": "string",
"description": "Specifies invoicing frequency. Either `day`, `week`, `month` or `year`."
},
"interval_count": {
"type": "integer",
"description": "The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks)."
}
},
"description": "",
"x-expandableFields": []
}
subscription_schedule
{
"type": "object",
"title": "SubscriptionSchedule",
"required": [
"billing_mode",
"created",
"customer",
"default_settings",
"end_behavior",
"id",
"livemode",
"object",
"phases",
"status"
],
"properties": {
"id": {
"type": "string",
"maxLength": 5000,
"description": "Unique identifier for the object."
},
"object": {
"enum": [
"subscription_schedule"
],
"type": "string",
"description": "String representing the object's type. Objects of the same type share the same value."
},
"phases": {
"type": "array",
"items": {
"$ref": "#/components/schemas/subscription_schedule_phase_configuration"
},
"description": "Configuration for the subscription schedule's phases."
},
"status": {
"enum": [
"active",
"canceled",
"completed",
"not_started",
"released"
],
"type": "string",
"description": "The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://docs.stripe.com/billing/subscriptions/subscription-schedules)."
},
"created": {
"type": "integer",
"format": "unix-time",
"description": "Time at which the object was created. Measured in seconds since the Unix epoch."
},
"customer": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/customer"
},
{
"$ref": "#/components/schemas/deleted_customer"
}
],
"description": "ID of the customer who owns the subscription schedule.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/customer"
},
{
"$ref": "#/components/schemas/deleted_customer"
}
]
}
},
"livemode": {
"type": "boolean",
"description": "If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`."
},
"metadata": {
"type": "object",
"nullable": true,
"description": "Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.",
"additionalProperties": {
"type": "string",
"maxLength": 500
}
},
"test_clock": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/test_helpers.test_clock"
}
],
"nullable": true,
"description": "ID of the test clock this subscription schedule belongs to.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/test_helpers.test_clock"
}
]
}
},
"application": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/application"
},
{
"$ref": "#/components/schemas/deleted_application"
}
],
"nullable": true,
"description": "ID of the Connect Application that created the schedule.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/application"
},
{
"$ref": "#/components/schemas/deleted_application"
}
]
}
},
"canceled_at": {
"type": "integer",
"format": "unix-time",
"nullable": true,
"description": "Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch."
},
"released_at": {
"type": "integer",
"format": "unix-time",
"nullable": true,
"description": "Time at which the subscription schedule was released. Measured in seconds since the Unix epoch."
},
"billing_mode": {
"$ref": "#/components/schemas/subscriptions_resource_billing_mode"
},
"completed_at": {
"type": "integer",
"format": "unix-time",
"nullable": true,
"description": "Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch."
},
"end_behavior": {
"enum": [
"cancel",
"none",
"release",
"renew"
],
"type": "string",
"description": "Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription."
},
"subscription": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/subscription"
}
],
"nullable": true,
"description": "ID of the subscription managed by the subscription schedule.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/subscription"
}
]
}
},
"current_phase": {
"anyOf": [
{
"$ref": "#/components/schemas/subscription_schedule_current_phase"
}
],
"nullable": true,
"description": "Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`."
},
"customer_account": {
"type": "string",
"nullable": true,
"maxLength": 5000,
"description": "ID of the account who owns the subscription schedule."
},
"default_settings": {
"$ref": "#/components/schemas/subscription_schedules_resource_default_settings"
},
"released_subscription": {
"type": "string",
"nullable": true,
"maxLength": 5000,
"description": "ID of the subscription once managed by the subscription schedule (if it is released)."
}
},
"description": "A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.\n\nRelated guide: [Subscription schedules](https://docs.stripe.com/billing/subscriptions/subscription-schedules)",
"x-resourceId": "subscription_schedule",
"x-expandableFields": [
"application",
"billing_mode",
"current_phase",
"customer",
"default_settings",
"phases",
"subscription",
"test_clock"
]
}
subscription_schedule_add_invoice_item
{
"type": "object",
"title": "SubscriptionScheduleAddInvoiceItem",
"required": [
"discounts",
"period",
"price"
],
"properties": {
"price": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/price"
},
{
"$ref": "#/components/schemas/deleted_price"
}
],
"description": "ID of the price used to generate the invoice item.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/price"
},
{
"$ref": "#/components/schemas/deleted_price"
}
]
}
},
"period": {
"$ref": "#/components/schemas/subscription_schedule_add_invoice_item_period"
},
"metadata": {
"type": "object",
"nullable": true,
"description": "Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.",
"additionalProperties": {
"type": "string",
"maxLength": 500
}
},
"quantity": {
"type": "integer",
"nullable": true,
"description": "The quantity of the invoice item."
},
"discounts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/discounts_resource_stackable_discount_with_discount_end"
},
"description": "The stackable discounts that will be applied to the item."
},
"tax_rates": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tax_rate"
},
"nullable": true,
"description": "The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item."
},
"discountable": {
"type": "boolean",
"nullable": true,
"description": "Controls whether discounts apply to this invoice item. Defaults to true if no value is provided."
}
},
"description": "An Add Invoice Item describes the prices and quantities that will be added as pending invoice items when entering a phase.",
"x-expandableFields": [
"discounts",
"period",
"price",
"tax_rates"
]
}
subscription_schedule_add_invoice_item_period
{
"type": "object",
"title": "SubscriptionScheduleAddInvoiceItemPeriod",
"required": [
"end",
"start"
],
"properties": {
"end": {
"$ref": "#/components/schemas/subscription_schedules_resource_invoice_item_period_resource_period_end"
},
"start": {
"$ref": "#/components/schemas/subscription_schedules_resource_invoice_item_period_resource_period_start"
}
},
"description": "",
"x-expandableFields": [
"end",
"start"
]
}
subscription_schedule_configuration_item
{
"type": "object",
"title": "SubscriptionScheduleConfigurationItem",
"required": [
"discounts",
"price"
],
"properties": {
"price": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/price"
},
{
"$ref": "#/components/schemas/deleted_price"
}
],
"description": "ID of the price to which the customer should be subscribed.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/price"
},
{
"$ref": "#/components/schemas/deleted_price"
}
]
}
},
"metadata": {
"type": "object",
"nullable": true,
"description": "Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered.",
"additionalProperties": {
"type": "string",
"maxLength": 500
}
},
"quantity": {
"type": "integer",
"description": "Quantity of the plan to which the customer should be subscribed."
},
"discounts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/stackable_discount_with_discount_settings"
},
"description": "The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount."
},
"tax_rates": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tax_rate"
},
"nullable": true,
"description": "The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`."
},
"billing_thresholds": {
"anyOf": [
{
"$ref": "#/components/schemas/subscription_item_billing_thresholds"
}
],
"nullable": true,
"description": "Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period"
}
},
"description": "A phase item describes the price and quantity of a phase.",
"x-expandableFields": [
"billing_thresholds",
"discounts",
"price",
"tax_rates"
]
}
subscription_schedule_current_phase
{
"type": "object",
"title": "SubscriptionScheduleCurrentPhase",
"required": [
"end_date",
"start_date"
],
"properties": {
"end_date": {
"type": "integer",
"format": "unix-time",
"description": "The end of this phase of the subscription schedule."
},
"start_date": {
"type": "integer",
"format": "unix-time",
"description": "The start of this phase of the subscription schedule."
}
},
"description": "",
"x-expandableFields": []
}
subscription_schedule_phase_configuration
{
"type": "object",
"title": "SubscriptionSchedulePhaseConfiguration",
"required": [
"add_invoice_items",
"currency",
"discounts",
"end_date",
"items",
"proration_behavior",
"start_date"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/subscription_schedule_configuration_item"
},
"description": "Subscription items to configure the subscription to during this phase of the subscription schedule."
},
"currency": {
"type": "string",
"format": "currency",
"description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies)."
},
"end_date": {
"type": "integer",
"format": "unix-time",
"description": "The end of this phase of the subscription schedule."
},
"metadata": {
"type": "object",
"nullable": true,
"description": "Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`.",
"additionalProperties": {
"type": "string",
"maxLength": 500
}
},
"discounts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/stackable_discount_with_discount_settings_and_discount_end"
},
"description": "The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts."
},
"trial_end": {
"type": "integer",
"format": "unix-time",
"nullable": true,
"description": "When the trial ends within the phase."
},
"start_date": {
"type": "integer",
"format": "unix-time",
"description": "The start of this phase of the subscription schedule."
},
"description": {
"type": "string",
"nullable": true,
"maxLength": 5000,
"description": "Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs."
},
"on_behalf_of": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/account"
}
],
"nullable": true,
"description": "The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/account"
}
]
}
},
"automatic_tax": {
"$ref": "#/components/schemas/schedules_phase_automatic_tax"
},
"transfer_data": {
"anyOf": [
{
"$ref": "#/components/schemas/subscription_transfer_data"
}
],
"nullable": true,
"description": "The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices."
},
"invoice_settings": {
"anyOf": [
{
"$ref": "#/components/schemas/invoice_setting_subscription_schedule_phase_setting"
}
],
"nullable": true,
"description": "The invoice settings applicable during this phase."
},
"add_invoice_items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/subscription_schedule_add_invoice_item"
},
"description": "A list of prices and quantities that will generate invoice items appended to the next invoice for this phase."
},
"collection_method": {
"enum": [
"charge_automatically",
"send_invoice"
],
"type": "string",
"nullable": true,
"description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`."
},
"default_tax_rates": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tax_rate"
},
"nullable": true,
"description": "The default tax rates to apply to the subscription during this phase of the subscription schedule."
},
"billing_thresholds": {
"anyOf": [
{
"$ref": "#/components/schemas/subscription_billing_thresholds"
}
],
"nullable": true,
"description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period"
},
"proration_behavior": {
"enum": [
"always_invoice",
"create_prorations",
"none"
],
"type": "string",
"description": "When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`."
},
"billing_cycle_anchor": {
"enum": [
"automatic",
"phase_start"
],
"type": "string",
"nullable": true,
"description": "Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle)."
},
"default_payment_method": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/payment_method"
}
],
"nullable": true,
"description": "ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/payment_method"
}
]
}
},
"application_fee_percent": {
"type": "number",
"nullable": true,
"description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule."
}
},
"description": "A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period.",
"x-expandableFields": [
"add_invoice_items",
"automatic_tax",
"billing_thresholds",
"default_payment_method",
"default_tax_rates",
"discounts",
"invoice_settings",
"items",
"on_behalf_of",
"transfer_data"
]
}
subscription_schedules_resource_default_settings
{
"type": "object",
"title": "SubscriptionSchedulesResourceDefaultSettings",
"required": [
"billing_cycle_anchor",
"invoice_settings"
],
"properties": {
"description": {
"type": "string",
"nullable": true,
"maxLength": 5000,
"description": "Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs."
},
"on_behalf_of": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/account"
}
],
"nullable": true,
"description": "The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/account"
}
]
}
},
"automatic_tax": {
"$ref": "#/components/schemas/subscription_schedules_resource_default_settings_automatic_tax"
},
"transfer_data": {
"anyOf": [
{
"$ref": "#/components/schemas/subscription_transfer_data"
}
],
"nullable": true,
"description": "The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices."
},
"invoice_settings": {
"$ref": "#/components/schemas/invoice_setting_subscription_schedule_setting"
},
"collection_method": {
"enum": [
"charge_automatically",
"send_invoice"
],
"type": "string",
"nullable": true,
"description": "Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`."
},
"billing_thresholds": {
"anyOf": [
{
"$ref": "#/components/schemas/subscription_billing_thresholds"
}
],
"nullable": true,
"description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period"
},
"billing_cycle_anchor": {
"enum": [
"automatic",
"phase_start"
],
"type": "string",
"description": "Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle)."
},
"default_payment_method": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/payment_method"
}
],
"nullable": true,
"description": "ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/payment_method"
}
]
}
},
"application_fee_percent": {
"type": "number",
"nullable": true,
"description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule."
}
},
"description": "",
"x-expandableFields": [
"automatic_tax",
"billing_thresholds",
"default_payment_method",
"invoice_settings",
"on_behalf_of",
"transfer_data"
]
}
subscription_schedules_resource_default_settings_automatic_tax
{
"type": "object",
"title": "SubscriptionSchedulesResourceDefaultSettingsAutomaticTax",
"required": [
"enabled"
],
"properties": {
"enabled": {
"type": "boolean",
"description": "Whether Stripe automatically computes tax on invoices created during this phase."
},
"liability": {
"anyOf": [
{
"$ref": "#/components/schemas/connect_account_reference"
}
],
"nullable": true,
"description": "The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account."
},
"disabled_reason": {
"enum": [
"requires_location_inputs"
],
"type": "string",
"nullable": true,
"description": "If Stripe disabled automatic tax, this enum describes why."
}
},
"description": "",
"x-expandableFields": [
"liability"
]
}
subscription_schedules_resource_invoice_item_period_resource_period_end
{
"type": "object",
"title": "SubscriptionSchedulesResourceInvoiceItemPeriodResourcePeriodEnd",
"required": [
"type"
],
"properties": {
"type": {
"enum": [
"min_item_period_end",
"phase_end",
"timestamp"
],
"type": "string",
"description": "Select how to calculate the end of the invoice item period.",
"x-stripeBypassValidation": true
},
"timestamp": {
"type": "integer",
"format": "unix-time",
"description": "A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`."
}
},
"description": "",
"x-expandableFields": []
}
subscription_schedules_resource_invoice_item_period_resource_period_start
{
"type": "object",
"title": "SubscriptionSchedulesResourceInvoiceItemPeriodResourcePeriodStart",
"required": [
"type"
],
"properties": {
"type": {
"enum": [
"max_item_period_start",
"phase_start",
"timestamp"
],
"type": "string",
"description": "Select how to calculate the start of the invoice item period.",
"x-stripeBypassValidation": true
},
"timestamp": {
"type": "integer",
"format": "unix-time",
"description": "A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`."
}
},
"description": "",
"x-expandableFields": []
}
subscription_transfer_data
{
"type": "object",
"title": "SubscriptionTransferData",
"required": [
"destination"
],
"properties": {
"destination": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"$ref": "#/components/schemas/account"
}
],
"description": "The account where funds from the payment will be transferred to upon payment success.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/account"
}
]
}
},
"amount_percent": {
"type": "number",
"nullable": true,
"description": "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination."
}
},
"description": "",
"x-expandableFields": [
"destination"
]
}
subscriptions_resource_billing_cycle_anchor_config
{
"type": "object",
"title": "SubscriptionsResourceBillingCycleAnchorConfig",
"required": [
"day_of_month"
],
"properties": {
"hour": {
"type": "integer",
"nullable": true,
"description": "The hour of the day of the billing_cycle_anchor."
},
"month": {
"type": "integer",
"nullable": true,
"description": "The month to start full cycle billing periods."
},
"minute": {
"type": "integer",
"nullable": true,
"description": "The minute of the hour of the billing_cycle_anchor."
},
"second": {
"type": "integer",
"nullable": true,
"description": "The second of the minute of the billing_cycle_anchor."
},
"day_of_month": {
"type": "integer",
"description": "The day of the month of the billing_cycle_anchor."
}
},
"description": "",
"x-expandableFields": []
}
subscriptions_resource_billing_mode
{
"type": "object",
"title": "SubscriptionsResourceBillingMode",
"required": [
"type"
],
"properties": {
"type": {
"enum": [
"classic",
"flexible"
],
"type": "string",
"description": "Controls how prorations and invoices for subscriptions are calculated and orchestrated."
},
"flexible": {
"anyOf": [
{
"$ref": "#/components/schemas/subscriptions_resource_billing_mode_flexible"
}
],
"nullable": true,
"description": "Configure behavior for flexible billing mode"
},
"updated_at": {
"type": "integer",
"format": "unix-time",
"description": "Details on when the current billing_mode was adopted."
}
},
"description": "The billing mode of the subscription.",
"x-expandableFields": [
"flexible"
]
}
subscriptions_resource_billing_mode_flexible
{
"type": "object",
"title": "SubscriptionsResourceBillingModeFlexible",
"properties": {
"proration_discounts": {
"enum": [
"included",
"itemized"
],
"type": "string",
"description": "Controls how invoices and invoice items display proration amounts and discount amounts."
}
},
"description": "",
"x-expandableFields": []
}
subscriptions_resource_billing_schedules
{
"type": "object",
"title": "SubscriptionsResourceBillingSchedules",
"required": [
"bill_until",
"key"
],
"properties": {
"key": {
"type": "string",
"maxLength": 5000,
"description": "Unique identifier for the billing schedule."
},
"applies_to": {
"type": "array",
"items": {
"$ref": "#/components/schemas/subscriptions_resource_billing_schedules_applies_to"
},
"nullable": true,
"description": "Specifies which subscription items the billing schedule applies to."
},
"bill_until": {
"$ref": "#/components/schemas/subscriptions_resource_billing_schedules_bill_until"
}
},
"description": "Sets the billing schedule for the subscription.",
"x-expandableFields": [
"applies_to",
"bill_until"
]
}