action stripe_post_customers { label: "PostCustomers" description: "
Creates a new customer object.
" provider: stripe method: POST path: "/v1/customers" encoding: form output: { type: "object" description: "This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer.\n\nRelated guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment)." required: ["created", "id", "livemode", "object"] properties: { address: { description: "The customer's address." type: "object" } balance: { type: "integer" description: "Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized." } cash_balance: { description: "The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source \"cash_balance\". The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically." type: "object" } created: { type: "integer" format: "unix-time" description: "Time at which the object was created. Measured in seconds since the Unix epoch." } currency: { type: "string" description: "Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes." } default_source: { description: "ID of the default payment source for the customer.\n\nIf you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead." type: "object" } delinquent: { type: "boolean" description: "When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date.\n\nIf an invoice is marked uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't get reset to `false`." } description: { type: "string" description: "An arbitrary string attached to the object. Often useful for displaying to users." } discount: { description: "Describes the current discount active on the customer, if there is one." type: "object" } email: { type: "string" description: "The customer's email address." } id: { type: "string" description: "Unique identifier for the object." } invoice_credit_balance: { type: "object" description: "The current multi-currency balances, if any, being 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 will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices. They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized." } invoice_prefix: { type: "string" description: "The prefix for the customer used to generate unique invoice numbers." } invoice_settings: { type: "object" properties: { custom_fields: { type: "array" description: "Default custom fields to be displayed on invoices for this customer." items: { type: "object" required: ["name", "value"] properties: { name: { type: "string" description: "The name of the custom field." } value: { type: "string" description: "The value of the custom field." } } } } default_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." type: "object" } footer: { type: "string" description: "Default footer to be displayed on invoices for this customer." } rendering_options: { description: "Default options for invoice PDF rendering for this customer." type: "object" } } } livemode: { type: "boolean" description: "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode." } metadata: { type: "object" description: "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format." } name: { type: "string" description: "The customer's full name or business name." } next_invoice_sequence: { type: "integer" description: "The suffix of the customer's next invoice number, e.g., 0001." } object: { type: "string" description: "String representing the object's type. Objects of the same type share the same value." enum: ["customer"] } phone: { type: "string" description: "The customer's phone number." } preferred_locales: { type: "array" description: "The customer's preferred locales (languages), ordered by preference." items: { type: "string" } } shipping: { description: "Mailing and shipping address for the customer. Appears on invoices emailed to this customer." type: "object" } sources: { type: "object" description: "The customer's payment sources, if any." required: ["data", "has_more", "object", "url"] properties: { data: { type: "array" description: "Details about each object." items: { type: "object" } } has_more: { type: "boolean" description: "True if this list has another page of items after this one that can be fetched." } object: { type: "string" description: "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." enum: ["list"] } url: { type: "string" description: "The URL where this list can be accessed." } } } subscriptions: { type: "object" description: "The customer's current subscriptions, if any." required: ["data", "has_more", "object", "url"] properties: { data: { type: "array" description: "Details about each object." items: { type: "object" description: "Subscriptions allow you to charge a customer on a recurring basis.\n\nRelated guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating)." required: ["automatic_tax", "billing_cycle_anchor", "cancel_at_period_end", "collection_method", "created", "currency", "current_period_end", "current_period_start", "customer", "id", "items", "livemode", "metadata", "object", "start_date", "status"] properties: { application: { description: "ID of the Connect Application that created the subscription." type: "object" } application_fee_percent: { type: "number" description: "A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account." } automatic_tax: { type: "object" required: ["enabled"] properties: { enabled: { type: "boolean" description: "Whether Stripe automatically computes tax on this subscription." } } } billing_cycle_anchor: { type: "integer" format: "unix-time" description: "Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format." } billing_thresholds: { description: "Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period" type: "object" } cancel_at: { type: "integer" format: "unix-time" description: "A date in the future at which the subscription will automatically get canceled" } cancel_at_period_end: { type: "boolean" description: "If the subscription has been canceled with the `at_period_end` flag set to `true`, `cancel_at_period_end` on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period." } canceled_at: { type: "integer" format: "unix-time" 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." } cancellation_details: { description: "Details about why this subscription was cancelled" type: "object" } collection_method: { 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`." enum: ["charge_automatically", "send_invoice"] } created: { type: "integer" format: "unix-time" description: "Time at which the object was created. Measured in seconds since the Unix epoch." } currency: { type: "string" 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)." } current_period_end: { type: "integer" format: "unix-time" description: "End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created." } current_period_start: { type: "integer" format: "unix-time" description: "Start of the current period that the subscription has been invoiced for." } customer: { description: "ID of the customer who owns the subscription." type: "object" } days_until_due: { type: "integer" 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_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://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source)." type: "object" } default_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://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source)." type: "object" } default_tax_rates: { type: "array" 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: { type: "object" description: "Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.\n\nRelated guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates)." required: ["active", "created", "display_name", "id", "inclusive", "livemode", "object", "percentage"] properties: { active: { type: "boolean" 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." } country: { type: "string" description: "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2))." } created: { type: "integer" format: "unix-time" description: "Time at which the object was created. Measured in seconds since the Unix epoch." } description: { type: "string" description: "An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers." } display_name: { type: "string" 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." } id: { type: "string" description: "Unique identifier for the object." } inclusive: { type: "boolean" description: "This specifies if the tax rate is inclusive or exclusive." } jurisdiction: { type: "string" 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." } livemode: { type: "boolean" description: "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode." } metadata: { type: "object" description: "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format." } object: { type: "string" description: "String representing the object's type. Objects of the same type share the same value." enum: ["tax_rate"] } percentage: { type: "number" description: "This represents the tax rate percent out of 100." } state: { type: "string" description: "[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, \"NY\" for New York, United States." } tax_type: { type: "string" description: "The high-level tax type, such as `vat` or `sales_tax`." enum: ["gst", "hst", "igst", "jct", "lease_tax", "pst", "qst", "rst", "sales_tax", "vat"] } } } } description: { type: "string" 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." } discount: { description: "Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis." type: "object" } ended_at: { type: "integer" format: "unix-time" description: "If the subscription has ended, the date the subscription ended." } id: { type: "string" description: "Unique identifier for the object." } items: { type: "object" description: "List of subscription items, each with an attached price." required: ["data", "has_more", "object", "url"] properties: { data: { type: "array" description: "Details about each object." items: { type: "object" description: "Subscription items allow you to create customer subscriptions with more than\none plan, making it easy to represent complex billing relationships." required: ["created", "id", "metadata", "object", "price", "subscription"] properties: { billing_thresholds: { description: "Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period" type: "object" } created: { type: "integer" description: "Time at which the object was created. Measured in seconds since the Unix epoch." } id: { type: "string" description: "Unique identifier for the object." } metadata: { type: "object" description: "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format." } object: { type: "string" description: "String representing the object's type. Objects of the same type share the same value." enum: ["subscription_item"] } price: { type: "object" description: "Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.\n[Products](https://stripe.com/docs/api#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://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview)." required: ["active", "billing_scheme", "created", "currency", "id", "livemode", "metadata", "object", "product", "type"] properties: { active: { type: "object" additionalProperties: true } billing_scheme: { type: "object" additionalProperties: true } created: { type: "object" additionalProperties: true } currency: { type: "object" additionalProperties: true } currency_options: { type: "object" additionalProperties: true } custom_unit_amount: { type: "object" additionalProperties: true } id: { type: "object" additionalProperties: true } livemode: { type: "object" additionalProperties: true } lookup_key: { type: "object" additionalProperties: true } metadata: { type: "object" additionalProperties: true } nickname: { type: "object" additionalProperties: true } object: { type: "object" additionalProperties: true } product: { type: "object" additionalProperties: true } recurring: { type: "object" additionalProperties: true } tax_behavior: { type: "object" additionalProperties: true } tiers: { type: "object" additionalProperties: true } tiers_mode: { type: "object" additionalProperties: true } transform_quantity: { type: "object" additionalProperties: true } type: { type: "object" additionalProperties: true } unit_amount: { type: "object" additionalProperties: true } unit_amount_decimal: { type: "object" additionalProperties: true } } } quantity: { type: "integer" description: "The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed." } subscription: { type: "string" description: "The `subscription` this `subscription_item` belongs to." } tax_rates: { type: "array" 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: { type: "object" additionalProperties: true } } } } } has_more: { type: "boolean" description: "True if this list has another page of items after this one that can be fetched." } object: { type: "string" description: "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." enum: ["list"] } url: { type: "string" description: "The URL where this list can be accessed." } } } latest_invoice: { description: "The most recent invoice this subscription has generated." type: "object" } livemode: { type: "boolean" description: "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode." } metadata: { type: "object" description: "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format." } next_pending_invoice_item_invoice: { type: "integer" format: "unix-time" description: "Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`." } object: { type: "string" description: "String representing the object's type. Objects of the same type share the same value." enum: ["subscription"] } on_behalf_of: { description: "The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details." type: "object" } pause_collection: { description: "If specified, payment collection for this subscription will be paused." type: "object" } payment_settings: { description: "Payment settings passed on to invoices created by the subscription." type: "object" } 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://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval." type: "object" } pending_setup_intent: { description: "You can use this [SetupIntent](https://stripe.com/docs/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://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2)." type: "object" } pending_update: { description: "If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid." type: "object" } schedule: { description: "The schedule attached to the subscription" type: "object" } 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." } status: { type: "string" description: "Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`. \n\nFor `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` state. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal state, 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\nIf subscription `collection_method=charge_automatically` it becomes `past_due` when payment to renew it fails and `canceled` or `unpaid` (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts. \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"] } test_clock: { description: "ID of the test clock this subscription belongs to." type: "object" } 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." type: "object" } trial_end: { type: "integer" format: "unix-time" description: "If the subscription has a trial, the end of that trial." } trial_settings: { description: "Settings related to subscription trials." type: "object" } trial_start: { type: "integer" format: "unix-time" description: "If the subscription has a trial, the beginning of that trial." } } } } has_more: { type: "boolean" description: "True if this list has another page of items after this one that can be fetched." } object: { type: "string" description: "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." enum: ["list"] } url: { type: "string" description: "The URL where this list can be accessed." } } } tax: { type: "object" required: ["automatic_tax"] properties: { automatic_tax: { type: "string" description: "Surfaces if automatic tax computation is possible given the current customer location information." enum: ["failed", "not_collecting", "supported", "unrecognized_location"] } ip_address: { type: "string" description: "A recent IP address of the customer used for tax reporting and tax location inference." } location: { description: "The customer's location as identified by Stripe Tax." type: "object" } } } tax_exempt: { type: "string" description: "Describes the customer's tax exemption status. One of `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the text **\"Reverse charge\"**." enum: ["exempt", "none", "reverse"] } tax_ids: { type: "object" description: "The customer's tax IDs." required: ["data", "has_more", "object", "url"] properties: { data: { type: "array" description: "Details about each object." items: { type: "object" description: "You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers).\nA customer's tax IDs are displayed on invoices and credit notes issued for the customer.\n\nRelated guide: [Customer Tax Identification Numbers](https://stripe.com/docs/billing/taxes/tax-ids)." required: ["created", "id", "livemode", "object", "type", "value"] properties: { country: { type: "string" description: "Two-letter ISO code representing the country of the tax ID." } created: { type: "integer" format: "unix-time" description: "Time at which the object was created. Measured in seconds since the Unix epoch." } customer: { description: "ID of the customer." type: "object" } id: { type: "string" description: "Unique identifier for the object." } livemode: { type: "boolean" description: "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode." } object: { type: "string" description: "String representing the object's type. Objects of the same type share the same value." enum: ["tax_id"] } type: { type: "string" description: "Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ph_tin`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown`" enum: ["ae_trn", "au_abn", "au_arn", "bg_uic", "br_cnpj", "br_cpf", "ca_bn", "ca_gst_hst", "ca_pst_bc", "ca_pst_mb", "ca_pst_sk", "ca_qst", "ch_vat", "cl_tin", "eg_tin", "es_cif", "eu_oss_vat", "eu_vat", "gb_vat", "ge_vat", "hk_br", "hu_tin", "id_npwp", "il_vat", "in_gst", "is_vat", "jp_cn", "jp_rn", "jp_trn", "ke_pin", "kr_brn", "li_uid", "mx_rfc", "my_frp", "my_itn", "my_sst", "no_vat", "nz_gst", "ph_tin", "ru_inn", "ru_kpp", "sa_vat", "sg_gst", "sg_uen", "si_tin", "th_vat", "tr_tin", "tw_vat", "ua_vat", "unknown", "us_ein", "za_vat"] } value: { type: "string" description: "Value of the tax ID." } verification: { description: "Tax ID verification information." type: "object" } } } } has_more: { type: "boolean" description: "True if this list has another page of items after this one that can be fetched." } object: { type: "string" description: "String representing the object's type. Objects of the same type share the same value. Always has the value `list`." enum: ["list"] } url: { type: "string" description: "The URL where this list can be accessed." } } } test_clock: { description: "ID of the test clock this customer belongs to." type: "object" } } } }