A Quote is a way to model prices that you’d like to provide to a customer. Once accepted, it will automatically create an invoice, subscription or subscription schedule.
Attributes
- idstring
Unique identifier for the object.
- line_
itemsobjectExpandable A list of items the customer is being quoted for.
- metadataobject
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.
More attributes
- objectstring
- amount_
subtotalinteger - amount_
totalinteger - applicationnullable stringExpandableConnect only
- application_
fee_ amountnullable integerConnect only - application_
fee_ percentnullable floatConnect only - automatic_
taxobject - collection_
methodenum - computedobject
- createdtimestamp
- currencynullable string
- customernullable stringExpandable
- customer_
accountnullable string - default_
tax_ ratesarray of stringsExpandable - descriptionnullable string
- discountsarray of stringsExpandable
- expires_
attimestamp - footernullable string
- from_
quotenullable object - headernullable string
- invoicenullable stringExpandable
- invoice_
settingsobject - livemodeboolean
- numbernullable string
- on_
behalf_ ofnullable stringExpandableConnect only - statusenum
- status_
transitionsobject - subscriptionnullable stringExpandable
- subscription_
dataobject - subscription_
schedulenullable stringExpandable - test_
clocknullable stringExpandable - total_
detailsobject - transfer_
datanullable objectConnect only
{ "id": "qt_1Mr7wVLkdIwHu7ixJYSiPTGq", "object": "quote", "amount_subtotal": 2198, "amount_total": 2198, "application": null, "application_fee_amount": null, "application_fee_percent": null, "automatic_tax": { "enabled": false, "liability": null, "status": null }, "collection_method": "charge_automatically", "computed": { "recurring": null, "upfront": { "amount_subtotal": 2198, "amount_total": 2198, "total_details": { "amount_discount": 0, "amount_shipping": 0, "amount_tax": 0 } } }, "created": 1680130691, "currency": "usd", "customer": "cus_NcMfB0SSFHINCV", "default_tax_rates": [], "description": null, "discounts": [], "expires_at": 1682722691, "footer": null, "from_quote": null, "header": null, "invoice": null, "invoice_settings": { "days_until_due": null, "issuer": { "type": "self" } }, "livemode": false, "metadata": {}, "number": null, "on_behalf_of": null, "status": "draft", "status_transitions": { "accepted_at": null, "canceled_at": null, "finalized_at": null }, "subscription": null, "subscription_data": { "description": null, "effective_date": null, "trial_period_days": null }, "subscription_schedule": null, "test_clock": null, "total_details": { "amount_discount": 0, "amount_shipping": 0, "amount_tax": 0 }, "transfer_data": null}A quote models prices and services for a customer. Default options for header, description, footer, and expires_ can be set in the dashboard via the quote template.
Parameters
- line_
itemsarray of objects 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.
- metadataobject
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 to
metadata.
More parameters
- application_
fee_ amountintegerConnect only - application_
fee_ percentfloatConnect only - automatic_
taxobject - collection_
methodenum - customerstring
- customer_
accountstring - default_
tax_ ratesarray of strings - descriptionstring
- discountsarray of objects
- expires_
attimestamp - footerstring
- from_
quoteobject - headerstring
- invoice_
settingsobject - on_
behalf_ ofstringConnect only - subscription_
dataobject - test_
clockstring - transfer_
dataobjectConnect only
Returns
Returns the quote object.
{ "id": "qt_1Mr7wVLkdIwHu7ixJYSiPTGq", "object": "quote", "amount_subtotal": 2198, "amount_total": 2198, "application": null, "application_fee_amount": null, "application_fee_percent": null, "automatic_tax": { "enabled": false, "liability": null, "status": null }, "collection_method": "charge_automatically", "computed": { "recurring": null, "upfront": { "amount_subtotal": 2198, "amount_total": 2198, "total_details": { "amount_discount": 0, "amount_shipping": 0, "amount_tax": 0 } } }, "created": 1680130691, "currency": "usd", "customer": "cus_NcMfB0SSFHINCV", "default_tax_rates": [], "description": null, "discounts": [], "expires_at": 1682722691, "footer": null, "from_quote": null, "header": null, "invoice": null, "invoice_settings": { "days_until_due": null, "issuer": { "type": "self" } }, "livemode": false, "metadata": {}, "number": null, "on_behalf_of": null, "status": "draft", "status_transitions": { "accepted_at": null, "canceled_at": null, "finalized_at": null }, "subscription": null, "subscription_data": { "description": null, "effective_date": null, "trial_period_days": null }, "subscription_schedule": null, "test_clock": null, "total_details": { "amount_discount": 0, "amount_shipping": 0, "amount_tax": 0 }, "transfer_data": null}A quote models prices and services for a customer.
Parameters
- line_
itemsarray of objects 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.
- metadataobject
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 to
metadata.
More parameters
- application_
fee_ amountintegerConnect only - application_
fee_ percentfloatConnect only - automatic_
taxobject - collection_
methodenum - customerstring
- customer_
accountstring - default_
tax_ ratesarray of strings - descriptionstring
- discountsarray of objects
- expires_
attimestamp - footerstring
- headerstring
- invoice_
settingsobject - on_
behalf_ ofstringConnect only - subscription_
dataobject - transfer_
dataobjectConnect only
Returns
Returns the updated quote object.
{ "id": "qt_1Mr7wVLkdIwHu7ixJYSiPTGq", "object": "quote", "amount_subtotal": 2198, "amount_total": 2198, "application": null, "application_fee_amount": null, "application_fee_percent": null, "automatic_tax": { "enabled": false, "liability": null, "status": null }, "collection_method": "charge_automatically", "computed": { "recurring": null, "upfront": { "amount_subtotal": 2198, "amount_total": 2198, "total_details": { "amount_discount": 0, "amount_shipping": 0, "amount_tax": 0 } } }, "created": 1680130691, "currency": "usd", "customer": "cus_NcMfB0SSFHINCV", "default_tax_rates": [], "description": null, "discounts": [], "expires_at": 1682722691, "footer": null, "from_quote": null, "header": null, "invoice": null, "invoice_settings": { "days_until_due": null, "issuer": { "type": "self" } }, "livemode": false, "metadata": { "order_id": "6735" }, "number": null, "on_behalf_of": null, "status": "draft", "status_transitions": { "accepted_at": null, "canceled_at": null, "finalized_at": null }, "subscription": null, "subscription_data": { "description": null, "effective_date": null, "trial_period_days": null }, "subscription_schedule": null, "test_clock": null, "total_details": { "amount_discount": 0, "amount_shipping": 0, "amount_tax": 0 }, "transfer_data": null}Retrieves the quote with the given ID.
Parameters
No parameters.
Returns
Returns a quote if a valid quote ID was provided. Raises an error otherwise.
{ "id": "qt_1Mr7wVLkdIwHu7ixJYSiPTGq", "object": "quote", "amount_subtotal": 2198, "amount_total": 2198, "application": null, "application_fee_amount": null, "application_fee_percent": null, "automatic_tax": { "enabled": false, "liability": null, "status": null }, "collection_method": "charge_automatically", "computed": { "recurring": null, "upfront": { "amount_subtotal": 2198, "amount_total": 2198, "total_details": { "amount_discount": 0, "amount_shipping": 0, "amount_tax": 0 } } }, "created": 1680130691, "currency": "usd", "customer": "cus_NcMfB0SSFHINCV", "default_tax_rates": [], "description": null, "discounts": [], "expires_at": 1682722691, "footer": null, "from_quote": null, "header": null, "invoice": null, "invoice_settings": { "days_until_due": null, "issuer": { "type": "self" } }, "livemode": false, "metadata": {}, "number": null, "on_behalf_of": null, "status": "draft", "status_transitions": { "accepted_at": null, "canceled_at": null, "finalized_at": null }, "subscription": null, "subscription_data": { "description": null, "effective_date": null, "trial_period_days": null }, "subscription_schedule": null, "test_clock": null, "total_details": { "amount_discount": 0, "amount_shipping": 0, "amount_tax": 0 }, "transfer_data": null}