# Create and send a quote Learn how to create, send, and accept a quote. > You can use quotes in a *sandbox* (A sandbox is an isolated test environment that allows you to test Stripe functionality in your account without affecting your live integration. Use sandboxes to safely experiment with new features and changes). To finalize, download, or accept quotes in live mode for one-time invoices through the API or Dashboard, you must upgrade to [Invoicing Plus](https://stripe.com/invoicing/pricing). See which plan [is right for you](https://support.stripe.com/questions/how-to-access-quotes). # Dashboard > This is a Dashboard for when testing-method is without-code. View the full page at https://docs.stripe.com/quotes/create?testing-method=without-code. A quote is a way to show prospective or existing customers the costs for a set of products and services. Quotes show the cost of either a one-off *invoice* (Invoices are statements of amounts owed by a customer. They track the status of payments from draft through paid or otherwise finalized. Subscriptions automatically generate invoices, or you can manually create a one-off invoice) or *subscription* (A Subscription represents the product details associated with the plan that your customer subscribes to. Allows you to charge the customer on a recurring basis). When a customer accepts the quote, ​​Stripe automatically creates all relevant invoices and subscriptions. ​​Many sales workflows use this common tool. ## Create a quote To create a quote in the Stripe Dashboard: 1. Go to the [Billing tab](https://dashboard.stripe.com/billing). 1. Click **Quick actions** > **Create quote** (or go directly to the [quote editor](https://dashboard.stripe.com/test/quotes/create)). 1. Select **+ Add new customer**. At a minimum, enter your customer’s **Name** and **Account email**. Click **Add customer**. 1. Under **Items**, add or select a product. (You can also add a coupon.) 1. Choose an expiration date. 1. (Optional) Write a memo, and add a custom header and footer. You can set the future default text for the header and footer in the [quote template](https://dashboard.stripe.com/settings/billing/quote). 1. To preview the quote PDF (which shows the generated quote number) click **Download preview**. 1. Click **Finalize quote**. After you finalize the quote, send it to your customer: 1. To download the quote, go to **Quotes details page** > **Quote PDF**. 1. Use an external email address to send the PDF to your customer for review. ## Mark a quote as accepted After your customer accepts the quote, bill them by converting the quote into an invoice or subscription. You can only create one-off invoices if a quote *only* has one-time prices. If a quote has at least one recurring price, you can only convert it to a subscription. ### Convert a quote to an invoice 1. To mark a quote as accepted and create a draft invoice, go to **Convert to invoice** > **Quotes details**. 1. Use the [invoice editor](https://dashboard.stripe.com/test/invoices/create) to modify the draft invoice as needed. 1. Email the invoice or automatically charge the customer. ### Convert a quote to a subscription 1. In the quote editor, choose a customer and create or select a product with a recurring price. 1. Enter the quote details and choose to either **Start the subscription immediately** or **Schedule a subscription start date**. 1. Finalize the quote. This marks the quote as **Accepted**. 1. Go to **Convert to subscription** > **Quotes details**. 1. Enter or modify the subscription details, then click **Create subscription**. If you schedule the subscription to start immediately, Stripe creates an active subscription along with a draft invoice for the initial payment. Stripe finalizes the draft invoice automatically in 1 hour. Otherwise, the subscription begins on the scheduled start date. Depending on the subscription’s payment terms, Stripe collects payment by either charging the customer’s payment method on file or sending them an invoice. # API > This is a API for when testing-method is with-code. View the full page at https://docs.stripe.com/quotes/create?testing-method=with-code. A quote is a way to show prospective or existing customers the costs for a set of products and services. Quotes show the cost of either a one-off *invoice* (Invoices are statements of amounts owed by a customer. They track the status of payments from draft through paid or otherwise finalized. Subscriptions automatically generate invoices, or you can manually create a one-off invoice) or *subscription* (A Subscription represents the product details associated with the plan that your customer subscribes to. Allows you to charge the customer on a recurring basis). When a customer accepts the quote, ​​Stripe automatically creates all relevant invoices and subscriptions. ​​Many sales workflows use this common tool. ## Create a customer [Server-side] ​​To create a quote, pass in a line item for each product or service. Attach a [Customer object](https://docs.stripe.com/api/customers/object.md) to the quote to represent the customer. After you [create the customer](https://docs.stripe.com/billing/customer.md), store the `id` in your database so you can use it later. In the next step, you’ll use the customer to create a quote. ## Create a quote [Server-side] To create a quote, pass in the [Customer](https://docs.stripe.com/api/quotes/create.md#create_quote-customer) and [Line items](https://docs.stripe.com/api/quotes/create.md#create_quote-line_items). You can use prices to model the offerings that your business provides. Learn how to [set up your product catalog](https://docs.stripe.com/products-prices/overview.md) to use prices with quotes. You can add each offering from your business to the quote as a line item by specifying the [price](https://docs.stripe.com/api/quotes/create.md#create_quote-line_items-price) and [quantity](https://docs.stripe.com/api/quotes/create.md#create_quote-line_items-quantity). For example, if you were to create a quote for a monthly software license that comes with a one-time consultation fee to install the software, the quote would contain two line items: - The first line item represents five licenses of the 100 USD per month per license cost of the software. - The second line item represents the one-time 1000 USD consultation fee. A newly created quote has a `draft` status. You can modify draft quotes by adding or removing [line items](https://docs.stripe.com/api/quotes/update.md#update_quote-line_items). ```curl curl https://api.stripe.com/v1/quotes \ -u "<>:" \ -d customer=cus_GBV60HKsE0mb5v \ -d "line_items[0][price]=price_CBb6IXqvTLXp3f" \ -d "line_items[0][quantity]=5" \ -d "line_items[1][price]=price_HGd7M3DV3IMXkC" ``` ## Send a quote [Server-side] When you’re ready to send the quote to your customer, you can move it to an `open` state by [finalizing the quote](https://docs.stripe.com/api/quotes/finalize.md). Because the quote is for a specific customer, you must attach a `Customer object` to it before it can transition to the new state. ```curl curl -X POST https://api.stripe.com/v1/quotes/qt_1HDGlYClCIKljWvsIGaAA06B/finalize \ -u "<>:" ``` After you finalize a quote, you can download the PDF, which contains an overview of the quote. Attach it to an email and send it to your customer. #### curl ```bash curl https://files.stripe.com/v1/quotes/qt_1HDGlYClCIKljWvsIGaAA06B/pdf \ -u <>: \ -G ``` You can also set a [header](https://docs.stripe.com/api/quotes/create.md#create_quote-header), [footer](https://docs.stripe.com/api/quotes/create.md#create_quote-footer) and [description](https://docs.stripe.com/api/quotes/create.md#create_quote-memo) on your quote, which the PDF displays. You can specify the default settings for the `header`, `footer` and `description` in the [Quote template](https://dashboard.stripe.com/settings/billing/quote). Remember to keep the quote in an `open` state while your customer reviews it. ## Mark a quote as accepted [Server-side] ​​After the customer agrees to the quote, move it to the `accepted` state, which automatically creates an invoice or subscription (depending on whether or not you’ve added line items with a recurring price). When you use a quote for one-time payments, Stripe creates an invoice in the `draft` state. You can make modifications to your invoice before [sending it to your customer](https://docs.stripe.com/invoicing/integration.md). ```curl curl -X POST https://api.stripe.com/v1/quotes/qt_1HDGlYClCIKljWvsIGaAA06B/accept \ -u "<>:" ``` ## Optional: Convert a quote to a subscription [Server-side] To create a subscription using a quote, you need to add at least one line item with a recurring price. ​​This ensures that the quote creates a subscription when it enters an `accept` state. If the [recurring](https://docs.stripe.com/api/quotes/object.md#quote_object-recurring) parameter on a quote isn’t `null`, then Stripe creates a subscription or subscription schedule after your customer accepts it. To customize the subscription, you can specify its configuration using [subscription_data](https://docs.stripe.com/api/quotes/create.md#create_quote-subscription_data). For example, you might want the subscription to have a trial period. Set[trial_period_days](https://docs.stripe.com/api/quotes/create.md#create_quote-subscription_data-trial_period_days) to specify how many days the trial should last. ```curl curl https://api.stripe.com/v1/quotes/qt_1HDGlYClCIKljWvsIGaAA06B \ -u "<>:" \ -d "subscription_data[trial_period_days]=7" ``` You can collect your customer’s [payment details](https://docs.stripe.com/payments/save-and-reuse.md?platform=checkout) ahead of time. If your customer doesn’t have a [payment_method](https://docs.stripe.com/api/customers/object.md#customer_object-invoice_settings-default_payment_method) on file and you plan to automatically charge them, set the quote’s [collection_method](https://docs.stripe.com/api/quotes/create.md#create_quote-collection_method) to `charge_automatically`. Stripe creates an `active` subscription with the first invoice in a `draft` state set to `auto_advance=true`. We automatically finalize the invoice after 1 hour and the subscription status updates accordingly. ### Create a subscription schedule from a quote If you want your subscription to start in the future, create a [subscription schedule](https://docs.stripe.com/billing/subscriptions/subscription-schedules.md). For example, you might want the subscription to start on the first day of the following month. Set the [effective_date](https://docs.stripe.com/api/quotes/create.md#create_quote-subscription_data-effective_date) to specify when the subscription schedule starts: ```curl curl https://api.stripe.com/v1/quotes/qt_1HDGlYClCIKljWvsIGaAA06B \ -u "<>:" \ -d "subscription_data[effective_date]=1641013200" ```