postCustomers
Create a customer
Details
- Method:
POST - Path:
/v1/customers - Operation ID:
PostCustomers
Parameters
{}Response Schema
{
"description": "This object represents a customer of your business. Use it to [create recurring charges](https://docs.stripe.com/invoicing/customer), [save payment](https://docs.stripe.com/payments/save-during-payment) and contact information,\nand track payments that belong to the same customer.",
"properties": {
"address": {
"anyOf": [
{
"$ref": "#/components/schemas/address"
}
],
"description": "The customer's address.",
"nullable": true
},
"balance": {
"description": "The current balance, if any, that's stored on the customer in their default currency. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. For multi-currency balances, see [invoice_credit_balance](https://docs.stripe.com/api/customers/object#customer_object-invoice_credit_balance).",
"type": "integer"
},
"business_name": {
"description": "The customer's business name.",
"maxLength": 150,
"type": "string"
},
"cash_balance": {
"anyOf": [
{
"$ref": "#/components/schemas/cash_balance"
}
],
"description": "The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is \"cash_balance\". The `settings[reconciliation_mode]` field describes if these funds apply to these payment intents manually or automatically.",
"nullable": true
},
"created": {
"description": "Time at which the object was created. Measured in seconds since the Unix epoch.",
"format": "unix-time",
"type": "integer"
},
"currency": {
"description": "Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"customer_account": {
"description": "The ID of an Account representing a customer. You can use this ID with any v1 API that accepts a customer_account parameter.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"default_source": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/bank_account"
},
{
"$ref": "#/components/schemas/card"
},
{
"$ref": "#/components/schemas/source"
}
],
"description": "ID of the default payment source for the customer.\n\nIf you use payment methods created through the PaymentMethods API, see the [invoice_settings.default_payment_method](https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead.",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/bank_account"
},
{
"$ref": "#/components/schemas/card"
},
{
"$ref": "#/components/schemas/source"
}
]
},
"x-stripeBypassValidation": true
},
"delinquent": {
"description": "Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the `invoice.due_date` will set this field to `true`.\n\nIf an invoice becomes uncollectible by [dunning](https://docs.stripe.com/billing/automatic-collection), `delinquent` doesn't reset to `false`.\n\nIf you care whether the customer has paid their most recent subscription invoice, use `subscription.status` instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to `false`.",
"nullable": true,
"type": "boolean"
},
"description": {
"description": "An arbitrary string attached to the object. Often useful for displaying to users.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"discount": {
"anyOf": [
{
"$ref": "#/components/schemas/discount"
}
],
"description": "Describes the current discount active on the customer, if there is one.",
"nullable": true
},
"email": {
"description": "The customer's email address.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"id": {
"description": "Unique identifier for the object.",
"maxLength": 5000,
"type": "string"
},
"individual_name": {
"description": "The customer's individual name.",
"maxLength": 150,
"type": "string"
},
"invoice_credit_balance": {
"additionalProperties": {
"type": "integer"
},
"description": "The current multi-currency balances, if any, that's stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes.",
"type": "object"
},
"invoice_prefix": {
"description": "The prefix for the customer used to generate unique invoice numbers.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"invoice_settings": {
"description": "",
"properties": {
"custom_fields": {
"description": "Default custom fields to be displayed on invoices for this customer.",
"items": {
"description": "",
"properties": {
"name": {
"description": "The name of the custom field.",
"maxLength": 5000,
"type": "string"
},
"value": {
"description": "The value of the custom field.",
"maxLength": 5000,
"type": "string"
}
},
"required": [
"name",
"value"
],
"title": "InvoiceSettingCustomField",
"type": "object",
"x-expandableFields": []
},
"nullable": true,
"type": "array"
},
"default_payment_method": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/payment_method"
}
],
"description": "ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices.",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/payment_method"
}
]
}
},
"footer": {
"description": "Default footer to be displayed on invoices for this customer.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"rendering_options": {
"anyOf": [
{
"$ref": "#/components/schemas/invoice_setting_customer_rendering_options"
}
],
"description": "Default options for invoice PDF rendering for this customer.",
"nullable": true
}
},
"title": "InvoiceSettingCustomerSetting",
"type": "object",
"x-expandableFields": [
"custom_fields",
"default_payment_method",
"rendering_options"
]
},
"livemode": {
"description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.",
"type": "boolean"
},
"metadata": {
"additionalProperties": {
"maxLength": 500,
"type": "string"
},
"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.",
"type": "object"
},
"name": {
"description": "The customer's full name or business name.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"next_invoice_sequence": {
"description": "The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses.",
"type": "integer"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value.",
"enum": [
"customer"
],
"type": "string"
},
"phone": {
"description": "The customer's phone number.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"preferred_locales": {
"description": "The customer's preferred locales (languages), ordered by preference.",
"items": {
"maxLength": 5000,
"type": "string"
},
"nullable": true,
"type": "array"
},
"shipping": {
"anyOf": [
{
"$ref": "#/components/schemas/shipping"
}
],
"description": "Mailing and shipping address for the customer. Appears on invoices emailed to this customer.",
"nullable": true
},
"sources": {
"description": "The customer's payment sources, if any.",
"properties": {
"data": {
"description": "Details about each object.",
"items": {
"anyOf": [
{
"$ref": "#/components/schemas/bank_account"
},
{
"$ref": "#/components/schemas/card"
},
{
"$ref": "#/components/schemas/source"
}
],
"title": "Polymorphic",
"x-stripeBypassValidation": true
},
"type": "array"
},
"has_more": {
"description": "True if this list has another page of items after this one that can be fetched.",
"type": "boolean"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.",
"enum": [
"list"
],
"type": "string"
},
"url": {
"description": "The URL where this list can be accessed.",
"maxLength": 5000,
"type": "string"
}
},
"required": [
"data",
"has_more",
"object",
"url"
],
"title": "ApmsSourcesSourceList",
"type": "object",
"x-expandableFields": [
"data"
]
},
"subscriptions": {
"description": "The customer's current subscriptions, if any.",
"properties": {
"data": {
"description": "Details about each object.",
"items": {
"description": "Subscriptions allow you to charge a customer on a recurring basis.\n\nRelated guide: [Creating subscriptions](https://docs.stripe.com/billing/subscriptions/creating)",
"properties": {
"application": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/application"
},
{
"$ref": "#/components/schemas/deleted_application"
}
],
"description": "ID of the Connect Application that created the subscription.",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/application"
},
{
"$ref": "#/components/schemas/deleted_application"
}
]
}
},
"application_fee_percent": {
"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.",
"nullable": true,
"type": "number"
},
"automatic_tax": {
"description": "",
"properties": {
"disabled_reason": {
"description": "If Stripe disabled automatic tax, this enum describes why.",
"enum": [
"requires_location_inputs"
],
"nullable": true,
"type": "string"
},
"enabled": {
"description": "Whether Stripe automatically computes tax on this subscription.",
"type": "boolean"
},
"liability": {
"anyOf": [
{
"$ref": "#/components/schemas/connect_account_reference"
}
],
"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.",
"nullable": true
}
},
"required": [
"enabled"
],
"title": "SubscriptionAutomaticTax",
"type": "object",
"x-expandableFields": [
"liability"
]
},
"billing_cycle_anchor": {
"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.",
"format": "unix-time",
"type": "integer"
},
"billing_cycle_anchor_config": {
"anyOf": [
{
"$ref": "#/components/schemas/subscriptions_resource_billing_cycle_anchor_config"
}
],
"description": "The fixed values used to calculate the `billing_cycle_anchor`.",
"nullable": true
},
"billing_mode": {
"description": "The billing mode of the subscription.",
"properties": {
"flexible": {
"anyOf": [
{
"$ref": "#/components/schemas/subscriptions_resource_billing_mode_flexible"
}
],
"description": "Configure behavior for flexible billing mode",
"nullable": true
},
"type": {
"description": "Controls how prorations and invoices for subscriptions are calculated and orchestrated.",
"enum": [
"classic",
"flexible"
],
"type": "string"
},
"updated_at": {
"description": "Details on when the current billing_mode was adopted.",
"format": "unix-time",
"type": "integer"
}
},
"required": [
"type"
],
"title": "SubscriptionsResourceBillingMode",
"type": "object",
"x-expandableFields": [
"flexible"
]
},
"billing_thresholds": {
"anyOf": [
{
"$ref": "#/components/schemas/subscription_billing_thresholds"
}
],
"description": "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period",
"nullable": true
},
"cancel_at": {
"description": "A date in the future at which the subscription will automatically get canceled",
"format": "unix-time",
"nullable": true,
"type": "integer"
},
"cancel_at_period_end": {
"description": "Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period.",
"type": "boolean"
},
"canceled_at": {
"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.",
"format": "unix-time",
"nullable": true,
"type": "integer"
},
"cancellation_details": {
"anyOf": [
{
"$ref": "#/components/schemas/cancellation_details"
}
],
"description": "Details about why this subscription was cancelled",
"nullable": true
},
"collection_method": {
"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`.",
"enum": [
"charge_automatically",
"send_invoice"
],
"type": "string"
},
"created": {
"description": "Time at which the object was created. Measured in seconds since the Unix epoch.",
"format": "unix-time",
"type": "integer"
},
"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).",
"format": "currency",
"type": "string"
},
"customer": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$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"
}
]
}
},
"customer_account": {
"description": "ID of the account representing the customer who owns the subscription.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"days_until_due": {
"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`.",
"nullable": true,
"type": "integer"
},
"default_payment_method": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/payment_method"
}
],
"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).",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/payment_method"
}
]
}
},
"default_source": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/bank_account"
},
{
"$ref": "#/components/schemas/card"
},
{
"$ref": "#/components/schemas/source"
}
],
"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).",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/bank_account"
},
{
"$ref": "#/components/schemas/card"
},
{
"$ref": "#/components/schemas/source"
}
]
},
"x-stripeBypassValidation": true
},
"default_tax_rates": {
"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.",
"items": {
"description": "Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.\n\nRelated guide: [Tax rates](/billing/taxes/tax-rates)",
"properties": {
"active": {
"description": "Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.",
"type": "boolean"
},
"country": {
"description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"created": {
"description": "Time at which the object was created. Measured in seconds since the Unix epoch.",
"format": "unix-time",
"type": "integer"
},
"description": {
"description": "An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"display_name": {
"description": "The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.",
"maxLength": 5000,
"type": "string"
},
"effective_percentage": {
"description": "Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true,\nthis percentage reflects the rate actually used to calculate tax based on the product's taxability\nand whether the user is registered to collect taxes in the corresponding jurisdiction.",
"nullable": true,
"type": "number"
},
"flat_amount": {
"anyOf": [
{
"$ref": "#/components/schemas/tax_rate_flat_amount"
}
],
"description": "The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate.",
"nullable": true
},
"id": {
"description": "Unique identifier for the object.",
"maxLength": 5000,
"type": "string"
},
"inclusive": {
"description": "This specifies if the tax rate is inclusive or exclusive.",
"type": "boolean"
},
"jurisdiction": {
"description": "The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"jurisdiction_level": {
"description": "The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates.",
"enum": [
"city",
"country",
"county",
"district",
"multiple",
"state"
],
"nullable": true,
"type": "string"
},
"livemode": {
"description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.",
"type": "boolean"
},
"metadata": {
"additionalProperties": {
"maxLength": 500,
"type": "string"
},
"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.",
"nullable": true,
"type": "object"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value.",
"enum": [
"tax_rate"
],
"type": "string"
},
"percentage": {
"description": "Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions.",
"type": "number"
},
"rate_type": {
"description": "Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax.",
"enum": [
"flat_amount",
"percentage"
],
"nullable": true,
"type": "string"
},
"state": {
"description": "[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, \"NY\" for New York, United States.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"tax_type": {
"description": "The high-level tax type, such as `vat` or `sales_tax`.",
"enum": [
"amusement_tax",
"communications_tax",
"gst",
"hst",
"igst",
"jct",
"lease_tax",
"pst",
"qst",
"retail_delivery_fee",
"rst",
"sales_tax",
"service_tax",
"vat"
],
"nullable": true,
"type": "string",
"x-stripeBypassValidation": true
}
},
"required": [
"active",
"created",
"display_name",
"id",
"inclusive",
"livemode",
"object",
"percentage"
],
"title": "TaxRate",
"type": "object",
"x-expandableFields": [
"flat_amount"
],
"x-resourceId": "tax_rate"
},
"nullable": true,
"type": "array"
},
"description": {
"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.",
"maxLength": 500,
"nullable": true,
"type": "string"
},
"discounts": {
"description": "The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.",
"items": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/discount"
}
],
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/discount"
}
]
}
},
"type": "array"
},
"ended_at": {
"description": "If the subscription has ended, the date the subscription ended.",
"format": "unix-time",
"nullable": true,
"type": "integer"
},
"id": {
"description": "Unique identifier for the object.",
"maxLength": 5000,
"type": "string"
},
"invoice_settings": {
"description": "",
"properties": {
"account_tax_ids": {
"description": "The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.",
"items": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/tax_id"
},
{
"$ref": "#/components/schemas/deleted_tax_id"
}
],
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/tax_id"
},
{
"$ref": "#/components/schemas/deleted_tax_id"
}
]
}
},
"nullable": true,
"type": "array"
},
"issuer": {
"description": "",
"properties": {
"account": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/account"
}
],
"description": "The connected account being referenced when `type` is `account`.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/account"
}
]
}
},
"type": {
"description": "Type of the account referenced.",
"enum": [
"account",
"self"
],
"type": "string",
"x-stripeBypassValidation": true
}
},
"required": [
"type"
],
"title": "ConnectAccountReference",
"type": "object",
"x-expandableFields": [
"account"
]
}
},
"required": [
"issuer"
],
"title": "SubscriptionsResourceSubscriptionInvoiceSettings",
"type": "object",
"x-expandableFields": [
"account_tax_ids",
"issuer"
]
},
"items": {
"description": "List of subscription items, each with an attached price.",
"properties": {
"data": {
"description": "Details about each object.",
"items": {
"description": "Subscription items allow you to create customer subscriptions with more than\none plan, making it easy to represent complex billing relationships.",
"properties": {
"billing_thresholds": {
"anyOf": [
{
"$ref": "#/components/schemas/subscription_item_billing_thresholds"
}
],
"description": "Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period",
"nullable": true
},
"created": {
"description": "Time at which the object was created. Measured in seconds since the Unix epoch.",
"type": "integer"
},
"current_period_end": {
"description": "The end time of this subscription item's current billing period.",
"format": "unix-time",
"type": "integer"
},
"current_period_start": {
"description": "The start time of this subscription item's current billing period.",
"format": "unix-time",
"type": "integer"
},
"discounts": {
"description": "The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.",
"items": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/discount"
}
],
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/discount"
}
]
}
},
"type": "array"
},
"id": {
"description": "Unique identifier for the object.",
"maxLength": 5000,
"type": "string"
},
"metadata": {
"additionalProperties": {
"maxLength": 500,
"type": "string"
},
"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.",
"type": "object"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value.",
"enum": [
"subscription_item"
],
"type": "string"
},
"price": {
"description": "Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.\n[Products](https://api.stripe.com#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.\n\nFor example, you might have a single \"gold\" product that has prices for $10/month, $100/year, and €9 once.\n\nRelated guides: [Set up a subscription](https://docs.stripe.com/billing/subscriptions/set-up-subscription), [create an invoice](https://docs.stripe.com/billing/invoices/create), and more about [products and prices](https://docs.stripe.com/products-prices/overview).",
"properties": {
"active": {
"description": "Whether the price can be used for new purchases.",
"type": "boolean"
},
"billing_scheme": {
"description": "Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.",
"enum": [
"per_unit",
"tiered"
],
"type": "string"
},
"created": {
"description": "Time at which the object was created. Measured in seconds since the Unix epoch.",
"format": "unix-time",
"type": "integer"
},
"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).",
"format": "currency",
"type": "string"
},
"currency_options": {
"additionalProperties": {
"description": "",
"properties": {
"custom_unit_amount": {
"anyOf": [
{
"$ref": "#/components/schemas/custom_unit_amount"
}
],
"description": "When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.",
"nullable": true
},
"tax_behavior": {
"description": "Only required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.",
"enum": [
"exclusive",
"inclusive",
"unspecified"
],
"nullable": true,
"type": "string"
},
"tiers": {
"description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.",
"items": {
"description": "",
"properties": {
"flat_amount": {
"description": "Price for the entire tier.",
"nullable": true,
"type": "integer"
},
"flat_amount_decimal": {
"description": "Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.",
"format": "decimal",
"nullable": true,
"type": "string"
},
"unit_amount": {
"description": "Per unit price for units relevant to the tier.",
"nullable": true,
"type": "integer"
},
"unit_amount_decimal": {
"description": "Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.",
"format": "decimal",
"nullable": true,
"type": "string"
},
"up_to": {
"description": "Up to and including to this quantity will be contained in the tier.",
"nullable": true,
"type": "integer"
}
},
"title": "PriceTier",
"type": "object",
"x-expandableFields": []
},
"type": "array"
},
"unit_amount": {
"description": "The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.",
"nullable": true,
"type": "integer"
},
"unit_amount_decimal": {
"description": "The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.",
"format": "decimal",
"nullable": true,
"type": "string"
}
},
"title": "CurrencyOption",
"type": "object",
"x-expandableFields": [
"custom_unit_amount",
"tiers"
]
},
"description": "Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).",
"type": "object"
},
"custom_unit_amount": {
"anyOf": [
{
"$ref": "#/components/schemas/custom_unit_amount"
}
],
"description": "When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.",
"nullable": true
},
"id": {
"description": "Unique identifier for the object.",
"maxLength": 5000,
"type": "string"
},
"livemode": {
"description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.",
"type": "boolean"
},
"lookup_key": {
"description": "A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"metadata": {
"additionalProperties": {
"maxLength": 500,
"type": "string"
},
"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.",
"type": "object"
},
"nickname": {
"description": "A brief description of the price, hidden from customers.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value.",
"enum": [
"price"
],
"type": "string"
},
"product": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/product"
},
{
"$ref": "#/components/schemas/deleted_product"
}
],
"description": "The ID of the product this price is associated with.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/product"
},
{
"$ref": "#/components/schemas/deleted_product"
}
]
}
},
"recurring": {
"anyOf": [
{
"$ref": "#/components/schemas/recurring"
}
],
"description": "The recurring components of a price such as `interval` and `usage_type`.",
"nullable": true
},
"tax_behavior": {
"description": "Only required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.",
"enum": [
"exclusive",
"inclusive",
"unspecified"
],
"nullable": true,
"type": "string"
},
"tiers": {
"description": "Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.",
"items": {
"description": "",
"properties": {
"flat_amount": {
"description": "Price for the entire tier.",
"nullable": true,
"type": "integer"
},
"flat_amount_decimal": {
"description": "Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.",
"format": "decimal",
"nullable": true,
"type": "string"
},
"unit_amount": {
"description": "Per unit price for units relevant to the tier.",
"nullable": true,
"type": "integer"
},
"unit_amount_decimal": {
"description": "Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.",
"format": "decimal",
"nullable": true,
"type": "string"
},
"up_to": {
"description": "Up to and including to this quantity will be contained in the tier.",
"nullable": true,
"type": "integer"
}
},
"title": "PriceTier",
"type": "object",
"x-expandableFields": []
},
"type": "array"
},
"tiers_mode": {
"description": "Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows.",
"enum": [
"graduated",
"volume"
],
"nullable": true,
"type": "string"
},
"transform_quantity": {
"anyOf": [
{
"$ref": "#/components/schemas/transform_quantity"
}
],
"description": "Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.",
"nullable": true
},
"type": {
"description": "One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.",
"enum": [
"one_time",
"recurring"
],
"type": "string"
},
"unit_amount": {
"description": "The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.",
"nullable": true,
"type": "integer"
},
"unit_amount_decimal": {
"description": "The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.",
"format": "decimal",
"nullable": true,
"type": "string"
}
},
"required": [
"active",
"billing_scheme",
"created",
"currency",
"id",
"livemode",
"metadata",
"object",
"product",
"type"
],
"title": "Price",
"type": "object",
"x-expandableFields": [
"currency_options",
"custom_unit_amount",
"product",
"recurring",
"tiers",
"transform_quantity"
],
"x-resourceId": "price"
},
"quantity": {
"description": "The [quantity](https://docs.stripe.com/subscriptions/quantities) of the plan to which the customer should be subscribed.",
"type": "integer"
},
"subscription": {
"description": "The `subscription` this `subscription_item` belongs to.",
"maxLength": 5000,
"type": "string"
},
"tax_rates": {
"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`.",
"items": {
"description": "Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.\n\nRelated guide: [Tax rates](/billing/taxes/tax-rates)",
"properties": {
"active": {
"description": "Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.",
"type": "boolean"
},
"country": {
"description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"created": {
"description": "Time at which the object was created. Measured in seconds since the Unix epoch.",
"format": "unix-time",
"type": "integer"
},
"description": {
"description": "An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"display_name": {
"description": "The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.",
"maxLength": 5000,
"type": "string"
},
"effective_percentage": {
"description": "Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true,\nthis percentage reflects the rate actually used to calculate tax based on the product's taxability\nand whether the user is registered to collect taxes in the corresponding jurisdiction.",
"nullable": true,
"type": "number"
},
"flat_amount": {
"anyOf": [
{
"$ref": "#/components/schemas/tax_rate_flat_amount"
}
],
"description": "The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate.",
"nullable": true
},
"id": {
"description": "Unique identifier for the object.",
"maxLength": 5000,
"type": "string"
},
"inclusive": {
"description": "This specifies if the tax rate is inclusive or exclusive.",
"type": "boolean"
},
"jurisdiction": {
"description": "The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"jurisdiction_level": {
"description": "The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates.",
"enum": [
"city",
"country",
"county",
"district",
"multiple",
"state"
],
"nullable": true,
"type": "string"
},
"livemode": {
"description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.",
"type": "boolean"
},
"metadata": {
"additionalProperties": {
"maxLength": 500,
"type": "string"
},
"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.",
"nullable": true,
"type": "object"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value.",
"enum": [
"tax_rate"
],
"type": "string"
},
"percentage": {
"description": "Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions.",
"type": "number"
},
"rate_type": {
"description": "Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax.",
"enum": [
"flat_amount",
"percentage"
],
"nullable": true,
"type": "string"
},
"state": {
"description": "[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, \"NY\" for New York, United States.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"tax_type": {
"description": "The high-level tax type, such as `vat` or `sales_tax`.",
"enum": [
"amusement_tax",
"communications_tax",
"gst",
"hst",
"igst",
"jct",
"lease_tax",
"pst",
"qst",
"retail_delivery_fee",
"rst",
"sales_tax",
"service_tax",
"vat"
],
"nullable": true,
"type": "string",
"x-stripeBypassValidation": true
}
},
"required": [
"active",
"created",
"display_name",
"id",
"inclusive",
"livemode",
"object",
"percentage"
],
"title": "TaxRate",
"type": "object",
"x-expandableFields": [
"flat_amount"
],
"x-resourceId": "tax_rate"
},
"nullable": true,
"type": "array"
}
},
"required": [
"created",
"current_period_end",
"current_period_start",
"discounts",
"id",
"metadata",
"object",
"price",
"subscription"
],
"title": "SubscriptionItem",
"type": "object",
"x-expandableFields": [
"billing_thresholds",
"discounts",
"price",
"tax_rates"
],
"x-resourceId": "subscription_item"
},
"type": "array"
},
"has_more": {
"description": "True if this list has another page of items after this one that can be fetched.",
"type": "boolean"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.",
"enum": [
"list"
],
"type": "string"
},
"url": {
"description": "The URL where this list can be accessed.",
"maxLength": 5000,
"type": "string"
}
},
"required": [
"data",
"has_more",
"object",
"url"
],
"title": "SubscriptionItemList",
"type": "object",
"x-expandableFields": [
"data"
]
},
"latest_invoice": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/invoice"
}
],
"description": "The most recent invoice this subscription has generated.",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/invoice"
}
]
}
},
"livemode": {
"description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.",
"type": "boolean"
},
"metadata": {
"additionalProperties": {
"maxLength": 500,
"type": "string"
},
"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.",
"type": "object"
},
"next_pending_invoice_item_invoice": {
"description": "Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`.",
"format": "unix-time",
"nullable": true,
"type": "integer"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value.",
"enum": [
"subscription"
],
"type": "string"
},
"on_behalf_of": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/account"
}
],
"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.",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/account"
}
]
}
},
"pause_collection": {
"anyOf": [
{
"$ref": "#/components/schemas/subscriptions_resource_pause_collection"
}
],
"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).",
"nullable": true
},
"payment_settings": {
"anyOf": [
{
"$ref": "#/components/schemas/subscriptions_resource_payment_settings"
}
],
"description": "Payment settings passed on to invoices created by the subscription.",
"nullable": true
},
"pending_invoice_item_interval": {
"anyOf": [
{
"$ref": "#/components/schemas/subscription_pending_invoice_item_interval"
}
],
"description": "Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://docs.stripe.com/api#create_invoice) for the given subscription at the specified interval.",
"nullable": true
},
"pending_setup_intent": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/setup_intent"
}
],
"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).",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/setup_intent"
}
]
}
},
"pending_update": {
"anyOf": [
{
"$ref": "#/components/schemas/subscriptions_resource_pending_update"
}
],
"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.",
"nullable": true
},
"schedule": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/subscription_schedule"
}
],
"description": "The schedule attached to the subscription",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/subscription_schedule"
}
]
}
},
"start_date": {
"description": "Date when the subscription was first created. The date might differ from the `created` date due to backdating.",
"format": "unix-time",
"type": "integer"
},
"status": {
"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.",
"enum": [
"active",
"canceled",
"incomplete",
"incomplete_expired",
"past_due",
"paused",
"trialing",
"unpaid"
],
"type": "string"
},
"test_clock": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/test_helpers.test_clock"
}
],
"description": "ID of the test clock this subscription belongs to.",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/test_helpers.test_clock"
}
]
}
},
"transfer_data": {
"anyOf": [
{
"$ref": "#/components/schemas/subscription_transfer_data"
}
],
"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.",
"nullable": true
},
"trial_end": {
"description": "If the subscription has a trial, the end of that trial.",
"format": "unix-time",
"nullable": true,
"type": "integer"
},
"trial_settings": {
"anyOf": [
{
"$ref": "#/components/schemas/subscriptions_trials_resource_trial_settings"
}
],
"description": "Settings related to subscription trials.",
"nullable": true
},
"trial_start": {
"description": "If the subscription has a trial, the beginning of that trial.",
"format": "unix-time",
"nullable": true,
"type": "integer"
}
},
"required": [
"automatic_tax",
"billing_cycle_anchor",
"billing_mode",
"cancel_at_period_end",
"collection_method",
"created",
"currency",
"customer",
"discounts",
"id",
"invoice_settings",
"items",
"livemode",
"metadata",
"object",
"start_date",
"status"
],
"title": "Subscription",
"type": "object",
"x-expandableFields": [
"application",
"automatic_tax",
"billing_cycle_anchor_config",
"billing_mode",
"billing_thresholds",
"cancellation_details",
"customer",
"default_payment_method",
"default_source",
"default_tax_rates",
"discounts",
"invoice_settings",
"items",
"latest_invoice",
"on_behalf_of",
"pause_collection",
"payment_settings",
"pending_invoice_item_interval",
"pending_setup_intent",
"pending_update",
"schedule",
"test_clock",
"transfer_data",
"trial_settings"
],
"x-resourceId": "subscription"
},
"type": "array"
},
"has_more": {
"description": "True if this list has another page of items after this one that can be fetched.",
"type": "boolean"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.",
"enum": [
"list"
],
"type": "string"
},
"url": {
"description": "The URL where this list can be accessed.",
"maxLength": 5000,
"type": "string"
}
},
"required": [
"data",
"has_more",
"object",
"url"
],
"title": "SubscriptionList",
"type": "object",
"x-expandableFields": [
"data"
]
},
"tax": {
"description": "",
"properties": {
"automatic_tax": {
"description": "Surfaces if automatic tax computation is possible given the current customer location information.",
"enum": [
"failed",
"not_collecting",
"supported",
"unrecognized_location"
],
"type": "string"
},
"ip_address": {
"description": "A recent IP address of the customer used for tax reporting and tax location inference.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"location": {
"anyOf": [
{
"$ref": "#/components/schemas/customer_tax_location"
}
],
"description": "The identified tax location of the customer.",
"nullable": true
},
"provider": {
"description": "The tax calculation provider used for location resolution. Defaults to `stripe` when not using a [third-party provider](/tax/third-party-apps).",
"enum": [
"anrok",
"avalara",
"sphere",
"stripe"
],
"type": "string"
}
},
"required": [
"automatic_tax",
"provider"
],
"title": "CustomerTax",
"type": "object",
"x-expandableFields": [
"location"
]
},
"tax_exempt": {
"description": "Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the following text: **\"Reverse charge\"**.",
"enum": [
"exempt",
"none",
"reverse"
],
"nullable": true,
"type": "string"
},
"tax_ids": {
"description": "The customer's tax IDs.",
"properties": {
"data": {
"description": "Details about each object.",
"items": {
"description": "You can add one or multiple tax IDs to a [customer](https://docs.stripe.com/api/customers) or account.\nCustomer and account tax IDs get displayed on related invoices and credit notes.\n\nRelated guides: [Customer tax identification numbers](https://docs.stripe.com/billing/taxes/tax-ids), [Account tax IDs](https://docs.stripe.com/invoicing/connect#account-tax-ids)",
"properties": {
"country": {
"description": "Two-letter ISO code representing the country of the tax ID.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"created": {
"description": "Time at which the object was created. Measured in seconds since the Unix epoch.",
"format": "unix-time",
"type": "integer"
},
"customer": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/customer"
}
],
"description": "ID of the customer.",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/customer"
}
]
}
},
"customer_account": {
"description": "ID of the Account representing the customer.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"id": {
"description": "Unique identifier for the object.",
"maxLength": 5000,
"type": "string"
},
"livemode": {
"description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.",
"type": "boolean"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value.",
"enum": [
"tax_id"
],
"type": "string"
},
"owner": {
"anyOf": [
{
"$ref": "#/components/schemas/tax_i_ds_owner"
}
],
"description": "The account or customer the tax ID belongs to.",
"nullable": true
},
"type": {
"description": "Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`. Note that some legacy tax IDs have type `unknown`",
"enum": [
"ad_nrt",
"ae_trn",
"al_tin",
"am_tin",
"ao_tin",
"ar_cuit",
"au_abn",
"au_arn",
"aw_tin",
"az_tin",
"ba_tin",
"bb_tin",
"bd_bin",
"bf_ifu",
"bg_uic",
"bh_vat",
"bj_ifu",
"bo_tin",
"br_cnpj",
"br_cpf",
"bs_tin",
"by_tin",
"ca_bn",
"ca_gst_hst",
"ca_pst_bc",
"ca_pst_mb",
"ca_pst_sk",
"ca_qst",
"cd_nif",
"ch_uid",
"ch_vat",
"cl_tin",
"cm_niu",
"cn_tin",
"co_nit",
"cr_tin",
"cv_nif",
"de_stn",
"do_rcn",
"ec_ruc",
"eg_tin",
"es_cif",
"et_tin",
"eu_oss_vat",
"eu_vat",
"gb_vat",
"ge_vat",
"gn_nif",
"hk_br",
"hr_oib",
"hu_tin",
"id_npwp",
"il_vat",
"in_gst",
"is_vat",
"jp_cn",
"jp_rn",
"jp_trn",
"ke_pin",
"kg_tin",
"kh_tin",
"kr_brn",
"kz_bin",
"la_tin",
"li_uid",
"li_vat",
"ma_vat",
"md_vat",
"me_pib",
"mk_vat",
"mr_nif",
"mx_rfc",
"my_frp",
"my_itn",
"my_sst",
"ng_tin",
"no_vat",
"no_voec",
"np_pan",
"nz_gst",
"om_vat",
"pe_ruc",
"ph_tin",
"ro_tin",
"rs_pib",
"ru_inn",
"ru_kpp",
"sa_vat",
"sg_gst",
"sg_uen",
"si_tin",
"sn_ninea",
"sr_fin",
"sv_nit",
"th_vat",
"tj_tin",
"tr_tin",
"tw_vat",
"tz_vat",
"ua_vat",
"ug_tin",
"unknown",
"us_ein",
"uy_ruc",
"uz_tin",
"uz_vat",
"ve_rif",
"vn_tin",
"za_vat",
"zm_tin",
"zw_tin"
],
"type": "string"
},
"value": {
"description": "Value of the tax ID.",
"maxLength": 5000,
"type": "string"
},
"verification": {
"anyOf": [
{
"$ref": "#/components/schemas/tax_id_verification"
}
],
"description": "Tax ID verification information.",
"nullable": true
}
},
"required": [
"created",
"id",
"livemode",
"object",
"type",
"value"
],
"title": "tax_id",
"type": "object",
"x-expandableFields": [
"customer",
"owner",
"verification"
],
"x-resourceId": "tax_id"
},
"type": "array"
},
"has_more": {
"description": "True if this list has another page of items after this one that can be fetched.",
"type": "boolean"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.",
"enum": [
"list"
],
"type": "string"
},
"url": {
"description": "The URL where this list can be accessed.",
"maxLength": 5000,
"type": "string"
}
},
"required": [
"data",
"has_more",
"object",
"url"
],
"title": "TaxIDsList",
"type": "object",
"x-expandableFields": [
"data"
]
},
"test_clock": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/test_helpers.test_clock"
}
],
"description": "ID of the test clock that this customer belongs to.",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/test_helpers.test_clock"
}
]
}
}
},
"required": [
"created",
"id",
"livemode",
"object"
],
"title": "Customer",
"type": "object",
"x-expandableFields": [
"address",
"cash_balance",
"default_source",
"discount",
"invoice_settings",
"shipping",
"sources",
"subscriptions",
"tax",
"tax_ids",
"test_clock"
],
"x-resourceId": "customer"
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('stripe')
# Call this tool
result = await agent.call_tool('postCustomers', {
# Add required parameters here
})