Parameters for quote create.
Summary
Types
@type automatic_tax() :: %{ optional(:enabled) => boolean() | nil, optional(:liability) => automatic_tax_liability() | nil, optional(String.t()) => term() }
enabled- Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.liability- 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.
@type automatic_tax_liability() :: %{ optional(:account) => String.t() | nil, optional(:type) => String.t() | nil, optional(String.t()) => term() }
account- The connected account being referenced whentypeisaccount.type- Type of the account referenced in the request. Possible values:account,self.
@type from_quote() :: %{ optional(:is_revision) => boolean() | nil, optional(:quote) => String.t() | nil, optional(String.t()) => term() }
is_revision- Whether this quote is a revision of the previous quote.quote- Theidof the quote that will be cloned. Max length: 5000.
@type invoice_settings() :: %{ optional(:days_until_due) => integer() | nil, optional(:issuer) => invoice_settings_issuer() | nil, optional(String.t()) => term() }
days_until_due- Number of days within which a customer must pay the invoice generated by this quote. This value will benullfor quotes wherecollection_method=charge_automatically.issuer- The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
@type invoice_settings_issuer() :: %{ optional(:account) => String.t() | nil, optional(:type) => String.t() | nil, optional(String.t()) => term() }
account- The connected account being referenced whentypeisaccount.type- Type of the account referenced in the request. Possible values:account,self.
@type line_items() :: %{ optional(:discounts) => map() | nil, optional(:price) => String.t() | nil, optional(:price_data) => line_items_price_data() | nil, optional(:quantity) => integer() | nil, optional(:tax_rates) => map() | nil, optional(String.t()) => term() }
discounts- The discounts applied to this line item.price- The ID of the price object. One ofpriceorprice_datais required. Max length: 5000.price_data- Data used to generate a new Price object inline. One ofpriceorprice_datais required.quantity- The quantity of the line item.tax_rates- The tax rates which apply to the line item. When set, thedefault_tax_rateson the quote do not apply to this line item.
@type line_items_price_data() :: %{ optional(:currency) => String.t() | nil, optional(:product) => String.t() | nil, optional(:recurring) => line_items_price_data_recurring() | nil, optional(:tax_behavior) => String.t() | nil, optional(:unit_amount) => integer() | nil, optional(:unit_amount_decimal) => String.t() | nil, optional(String.t()) => term() }
currency- Three-letter ISO currency code, in lowercase. Must be a supported currency. Format: ISO 4217 currency code.product- The ID of the Product that this Price will belong to. Max length: 5000.recurring- The recurring components of a price such asintervalandinterval_count.tax_behavior- Only required if a default tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One ofinclusive,exclusive, orunspecified. Once specified as eitherinclusiveorexclusive, it cannot be changed. Possible values:exclusive,inclusive,unspecified.unit_amount- A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.unit_amount_decimal- Same asunit_amount, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one ofunit_amountandunit_amount_decimalcan be set. Format: decimal string.
@type line_items_price_data_recurring() :: %{ optional(:interval) => String.t() | nil, optional(:interval_count) => integer() | nil, optional(String.t()) => term() }
interval- Specifies billing frequency. Eitherday,week,monthoryear. Possible values:day,month,week,year.interval_count- The number of intervals between subscription billings. For example,interval=monthandinterval_count=3bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
@type subscription_data() :: %{ optional(:billing_mode) => subscription_data_billing_mode() | nil, optional(:description) => String.t() | nil, optional(:effective_date) => map() | nil, optional(:metadata) => %{required(String.t()) => String.t()} | nil, optional(:trial_period_days) => map() | nil, optional(String.t()) => term() }
billing_mode- Controls how prorations and invoices for subscriptions are calculated and orchestrated.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. Max length: 500.effective_date- When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. Theeffective_dateis ignored if it is in the past when the quote is accepted.metadata- Set of key-value pairs that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included inline_items, this field will be passed to the resulting subscription'smetadatafield. Ifsubscription_data.effective_dateis used, this field will be passed to the resulting subscription schedule'sphases.metadatafield. Unlike object-level metadata, this field is declarative. Updates will clear prior values.trial_period_days- Integer representing the number of trial period days before the customer is charged for the first time.
@type subscription_data_billing_mode() :: %{ optional(:flexible) => subscription_data_billing_mode_flexible() | nil, optional(:type) => String.t() | nil, optional(String.t()) => term() }
flexible- Configure behavior for flexible billing mode.type- Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default isflexible. Possible values:classic,flexible.
@type subscription_data_billing_mode_flexible() :: %{ optional(:proration_discounts) => String.t() | nil, optional(String.t()) => term() }
proration_discounts- Controls how invoices and invoice items display proration amounts and discount amounts. Possible values:included,itemized.
@type t() :: %Stripe.Params.QuoteCreateParams{ application_fee_amount: map() | nil, application_fee_percent: map() | nil, automatic_tax: automatic_tax() | nil, collection_method: String.t() | nil, customer: String.t() | nil, customer_account: String.t() | nil, default_tax_rates: map() | nil, description: map() | nil, discounts: map() | nil, expand: [String.t()] | nil, expires_at: integer() | nil, footer: map() | nil, from_quote: from_quote() | nil, header: map() | nil, invoice_settings: invoice_settings() | nil, line_items: [line_items()] | nil, metadata: %{required(String.t()) => String.t()} | nil, on_behalf_of: map() | nil, subscription_data: subscription_data() | nil, test_clock: String.t() | nil, transfer_data: map() | nil }
application_fee_amount- The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.application_fee_percent- 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. There must be at least 1 line item with a recurring price to use this field.automatic_tax- Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.collection_method- Eithercharge_automatically, orsend_invoice. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription asactive. Defaults tocharge_automatically. Possible values:charge_automatically,send_invoice.customer- The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. Max length: 5000.customer_account- The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed. Max length: 5000.default_tax_rates- The tax rates that will apply to any line item that does not havetax_ratesset.description- A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your quote template settings will be used.discounts- The discounts applied to the quote.expand- Specifies which fields in the response should be expanded.expires_at- A future timestamp on which the quote will be canceled if inopenordraftstatus. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your quote template settings will be used. Format: Unix timestamp.footer- A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your quote template settings will be used.from_quote- Clone an existing quote. The new quote will be created instatus=draft. When using this parameter, you cannot specify any other parameters except forexpires_at.header- A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your quote template settings will be used.invoice_settings- All invoices will be billed using the specified settings.line_items- A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.metadata- Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value tometadata.on_behalf_of- The account on behalf of which to charge.subscription_data- When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created ifsubscription_data[effective_date]is present and in the future, otherwise a subscription is created.test_clock- ID of the test clock to attach to the quote. Max length: 5000.transfer_data- The data with which to automatically create a Transfer for each of the invoices.