Stripe: Update a quote
Stripe quotes.postQuotesQuote: arguments, response, policy and SDK examples.
← Quotes operations · Get started
Operation stripe.postquotesquote
Provider route: POST /v1/quotes/{quote}. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/stripe with npm, or alter-sdk-stripe with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { StripeIntegration } from "@alter-ai/stripe";
async function execute(input: Parameters<StripeIntegration["quotes"]["postQuotesQuote"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new StripeIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.quotes.postQuotesQuote(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_stripe import StripeIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = StripeIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.quotes.post_quotes_quote(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.quote | string | Required within parent | Maximum length: 5000 |
headers | object | Optional | Additional keys: not allowed |
headers.Idempotency-Key | string | Optional | Minimum length: 1 Maximum length: 255 |
body | object | Optional | Additional keys: not allowed |
body.application_fee_amount | JSON | Optional | 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. |
body.application_fee_amount (anyOf 1) | integer | Alternative | |
body.application_fee_amount (anyOf 2) | string | Alternative | One of: |
body.application_fee_percent | JSON | Optional | 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. |
body.application_fee_percent (anyOf 1) | number | Alternative | |
body.application_fee_percent (anyOf 2) | string | Alternative | One of: |
body.automatic_tax | object | Optional | Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. |
body.automatic_tax.enabled | boolean | Required within parent | |
body.automatic_tax.liability | object | Optional | |
body.automatic_tax.liability.account | string | Optional | |
body.automatic_tax.liability.type | string | Required within parent | One of: account, self |
body.collection_method | string | Optional | Either `charge_automatically`, or `send_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 as `active`. Defaults to `charge_automatically`. One of: charge_automatically, send_invoice |
body.customer | string | Optional | The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. Maximum length: 5000 |
body.customer_account | string | Optional | The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed. Maximum length: 5000 |
body.default_tax_rates | JSON | Optional | The tax rates that will apply to any line item that does not have `tax_rates` set. |
body.default_tax_rates (anyOf 1) | array | Alternative | |
body.default_tax_rates (anyOf 1)[] | string | Each item | Maximum length: 5000 |
body.default_tax_rates (anyOf 2) | string | Alternative | One of: |
body.description | JSON | Optional | A description that will be displayed on the quote PDF. |
body.description (anyOf 1) | string | Alternative | Maximum length: 500 |
body.description (anyOf 2) | string | Alternative | One of: |
body.discounts | JSON | Optional | The discounts applied to the quote. |
body.discounts (anyOf 1) | array | Alternative | |
body.discounts (anyOf 1)[] | object | Each item | |
body.discounts (anyOf 1)[].coupon | string | Optional | Maximum length: 5000 |
body.discounts (anyOf 1)[].discount | string | Optional | Maximum length: 5000 |
body.discounts (anyOf 1)[].promotion_code | string | Optional | Maximum length: 5000 |
body.discounts (anyOf 2) | string | Alternative | One of: |
body.expand | array | Optional | Specifies which fields in the response should be expanded. |
body.expand[] | string | Each item | Maximum length: 5000 |
body.expires_at | integer | Optional | A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. Format: unix-time |
body.footer | JSON | Optional | A footer that will be displayed on the quote PDF. |
body.footer (anyOf 1) | string | Alternative | Maximum length: 500 |
body.footer (anyOf 2) | string | Alternative | One of: |
body.header | JSON | Optional | A header that will be displayed on the quote PDF. |
body.header (anyOf 1) | string | Alternative | Maximum length: 50 |
body.header (anyOf 2) | string | Alternative | One of: |
body.invoice_settings | Model | Optional | Expand Create a quote — request body — body invoice settings |
body.line_items | array | Optional | 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. |
body.line_items[] | object | Each item | |
body.line_items[].discounts | JSON | Optional | |
body.line_items[].discounts (anyOf 1) | array | Alternative | |
body.line_items[].discounts (anyOf 1)[] | object | Each item | |
body.line_items[].discounts (anyOf 1)[].coupon | string | Optional | Maximum length: 5000 |
body.line_items[].discounts (anyOf 1)[].discount | string | Optional | Maximum length: 5000 |
body.line_items[].discounts (anyOf 1)[].promotion_code | string | Optional | Maximum length: 5000 |
body.line_items[].discounts (anyOf 2) | string | Alternative | One of: |
body.line_items[].id | string | Optional | Maximum length: 5000 |
body.line_items[].price | string | Optional | Maximum length: 5000 |
body.line_items[].price_data | Model | Optional | Expand Create a quote — request body — body line items item price data |
body.line_items[].quantity | integer | Optional | |
body.line_items[].tax_rates | JSON | Optional | |
body.line_items[].tax_rates (anyOf 1) | array | Alternative | |
body.line_items[].tax_rates (anyOf 1)[] | string | Each item | Maximum length: 5000 |
body.line_items[].tax_rates (anyOf 2) | string | Alternative | One of: |
body.metadata | object | Optional | 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Additional keys: see wildcard field |
body.metadata.* | string | Additional keys | |
body.on_behalf_of | JSON | Optional | The account on behalf of which to charge. |
body.on_behalf_of (anyOf 1) | string | Alternative | |
body.on_behalf_of (anyOf 2) | string | Alternative | One of: |
body.subscription_data | object | Optional | 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 if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. |
body.subscription_data.description | JSON | Optional | |
body.subscription_data.description (anyOf 1) | string | Alternative | Maximum length: 500 |
body.subscription_data.description (anyOf 2) | string | Alternative | One of: |
body.subscription_data.effective_date | JSON | Optional | |
body.subscription_data.effective_date (anyOf 1) | string | Alternative | One of: current_period_end Maximum length: 5000 |
body.subscription_data.effective_date (anyOf 2) | integer | Alternative | Format: unix-time |
body.subscription_data.effective_date (anyOf 3) | string | Alternative | One of: |
body.subscription_data.metadata | object | Optional | Additional keys: see wildcard field |
body.subscription_data.metadata.* | string | Additional keys | |
body.subscription_data.trial_period_days | JSON | Optional | |
body.subscription_data.trial_period_days (anyOf 1) | integer | Alternative | |
body.subscription_data.trial_period_days (anyOf 2) | string | Alternative | One of: |
body.transfer_data | JSON | Optional | The data with which to automatically create a Transfer for each of the invoices. |
body.transfer_data (anyOf 1) | object | Alternative | |
body.transfer_data (anyOf 1).amount | integer | Optional | |
body.transfer_data (anyOf 1).amount_percent | number | Optional | |
body.transfer_data (anyOf 1).destination | string | Required within parent | |
body.transfer_data (anyOf 2) | string | Alternative | One of: |
Referenced models: Create a quote — request body — body invoice settings, Create a quote — request body — body line items item price data
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Accept a quote — response body |
Referenced models: Accept a quote — response body
Schemas
Section titled “Schemas”719 more schemas are linked from the tables above, on the schema pages.
Create a quote — request body — body invoice settings
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | All invoices will be billed using the specified settings. |
custom_fields | JSON | Optional | |
custom_fields (anyOf 1) | array | Alternative | |
custom_fields (anyOf 1)[] | object | Each item | |
custom_fields (anyOf 1)[].name | string | Required within parent | Maximum length: 40 |
custom_fields (anyOf 1)[].value | string | Required within parent | Maximum length: 140 |
custom_fields (anyOf 2) | string | Alternative | One of: |
days_until_due | integer | Optional | |
description | JSON | Optional | |
description (anyOf 1) | string | Alternative | Maximum length: 500 |
description (anyOf 2) | string | Alternative | One of: |
footer | JSON | Optional | |
footer (anyOf 1) | string | Alternative | Maximum length: 5000 |
footer (anyOf 2) | string | Alternative | One of: |
issuer | object | Optional | |
issuer.account | string | Optional | |
issuer.type | string | Required within parent | One of: account, self |
Create a quote — request body — body line items item price data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
currency | string | Required within parent | Format: currency |
product | string | Required within parent | Maximum length: 5000 |
recurring | object | Optional | |
recurring.interval | string | Required within parent | One of: day, month, week, year |
recurring.interval_count | integer | Optional | |
tax_behavior | string | Optional | One of: exclusive, inclusive, unspecified |
unit_amount | integer | Optional | |
unit_amount_decimal | string | Optional | Format: decimal |
PostApplicationFeesIdRefund — response body — application / object: application
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | The name of the application. Maximum length: 5000 |
name (anyOf 2) | null | Alternative | |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: application |
Accept a quote — response body — application / value / deleted: True, object: application
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
deleted | boolean | Required within parent | Always true for a deleted object Known values: True |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | The name of the application. Maximum length: 5000 |
name (anyOf 2) | null | Alternative | |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: application |
Delete a customer — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
deleted | boolean | Required within parent | Always true for a deleted object Known values: True |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: customer |
Delete a draft invoice — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
deleted | boolean | Required within parent | Always true for a deleted object Known values: True |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: invoice |
Get Customers Customer Discount — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A discount represents the actual application of a [coupon](https://docs.stripe.com/api#coupons) or [promotion code](https://docs.stripe.com/api#promotion_codes). It contains information about when the discount began, when it will end, and what it is applied to. Related guide: [Applying discounts to subscriptions](https://docs.stripe.com/billing/subscriptions/discounts) |
checkout_session | JSON | Optional | |
checkout_session (anyOf 1) | string | Alternative | The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Not present for subscription mode. Maximum length: 5000 |
checkout_session (anyOf 2) | null | Alternative | |
customer | JSON | Optional | |
customer (anyOf 1) | JSON | Alternative | The ID of the customer associated with this discount. |
customer (anyOf 1) (anyOf 1) | string | Alternative | Maximum length: 5000 |
customer (anyOf 1) (anyOf 2) | Model | Alternative | Expand Create a customer — response body |
customer (anyOf 1) (anyOf 3) | Model | Alternative | Expand Delete a customer — response body |
customer (anyOf 2) | null | Alternative | |
customer_account | JSON | Optional | |
customer_account (anyOf 1) | string | Alternative | The ID of the account representing the customer associated with this discount. Maximum length: 5000 |
customer_account (anyOf 2) | null | Alternative | |
end | JSON | Optional | |
end (anyOf 1) | JSON | Alternative | |
end (anyOf 1) (anyOf 1) | integer | Alternative | If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. Format: unix-time |
end (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
end (anyOf 2) | null | Alternative | |
id | string | Required within parent | The ID of the discount object. Discounts can't be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. Maximum length: 5000 |
invoice | JSON | Optional | |
invoice (anyOf 1) | string | Alternative | The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. Maximum length: 5000 |
invoice (anyOf 2) | null | Alternative | |
invoice_item | JSON | Optional | |
invoice_item (anyOf 1) | string | Alternative | The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. Maximum length: 5000 |
invoice_item (anyOf 2) | null | Alternative | |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: discount |
promotion_code | JSON | Optional | |
promotion_code (anyOf 1) | JSON | Alternative | The promotion code applied to create this discount. |
promotion_code (anyOf 1) (anyOf 1) | string | Alternative | Maximum length: 5000 |
promotion_code (anyOf 1) (anyOf 2) | Model | Alternative | Expand Create a promotion code — response body |
promotion_code (anyOf 2) | null | Alternative | |
source | Model | Required within parent | Expand Get Customers Customer Discount — response body — source |
start | JSON | Required within parent | |
start (anyOf 1) | integer | Alternative | Date that the coupon was applied. Format: unix-time |
start (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
subscription | JSON | Optional | |
subscription (anyOf 1) | string | Alternative | The subscription that this coupon is applied to, if it is applied to a particular subscription. Maximum length: 5000 |
subscription (anyOf 2) | null | Alternative | |
subscription_item | JSON | Optional | |
subscription_item (anyOf 1) | string | Alternative | The subscription item that this coupon is applied to, if it is applied to a particular subscription item. Maximum length: 5000 |
subscription_item (anyOf 2) | null | Alternative |
Referenced models: Create a customer — response body, Delete a customer — response body, Get Customers Customer Discount — response body — source, Create a promotion code — response body
Accept a quote — response body — from quote value is revision, quote
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
is_revision | boolean | Required within parent | Whether this quote is a revision of a different quote. |
quote | JSON | Required within parent | The quote that was cloned. |
quote (anyOf 1) | string | Alternative | Maximum length: 5000 |
quote (anyOf 2) | Model | Alternative | Expand Accept a quote — response body |
Referenced models: Accept a quote — response body
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: stripe.postquotesquote. Catalog operation: PostQuotesQuote. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Pinned headers: {"Stripe-Version": "2026-09-30.endive"}