One-off Invoices

    Learn how to work with one-off invoices for non-recurring billing.

    One-off invoices are used to request payment for specific goods or services, including any discounts or taxes. For example, you might invoice for a delivery of physical goods.

    You can create, view, and manage one-off invoices via the Dashboard, or create them programmatically via the API. This page outlines both approaches. Stripe also provides a number of ways to create invoices within other tools your team might use, like our Salesforce integration.

    Because one-off invoices follow the same invoicing workflow as all other invoices, you can similarly mark them as void, uncollectible, or paid.

    Creating one-off invoices via the Dashboard

    In the Dashboard, you can:

    • Create new invoices for your customers
    • Customize the look and feel of these invoices
    • Add line items, descriptions, taxes, and coupons to invoices
    • Select the collection method for these invoices

    Here are the steps to create a one-off invoice through the Dashboard:

    1. Display your current invoices.
    2. From the resulting Invoices page, click the New button to create a new draft invoice.
    3. Choose a customer for the invoice, then add line items and a memo to the invoice.
    4. You can add additional line items to the invoice by clicking + Add another item in the line-items table.

    Creating one-off invoices via the API

    Using the Invoices API, your first step is to create line items for the customer. Then, create a new draft invoice for that customer; this draft invoice will automatically pull in those line items:

    curl https://api.stripe.com/v1/invoices \
       -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
       -X POST \
       -d customer=cus_4fdAW5ftNQow1a \
       -d auto_advance=true
    
    # Set your secret key: remember to change this to your live secret key in production
    # See your keys here: https://dashboard.stripe.com/account/apikeys
    Stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"
    
    Stripe::InvoiceItem.create(
      :customer => "cus_4fdAW5ftNQow1a",
      :invoice => invoice.id,
      :amount => 2500,
      :currency => "usd",
      :description => "One-time setup fee"
    )
    
    invoice = Stripe::Invoice.create(
      :customer => "cus_4fdAW5ftNQow1a",
      :auto_advance => true, # auto-finalize this draft after ~1 hour
    )
    
    # Set your secret key: remember to change this to your live secret key in production
    # See your keys here: https://dashboard.stripe.com/account/apikeys
    stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"
    
    stripe.InvoiceItem.create(
      customer="cus_4fdAW5ftNQow1a",
      amount=2500,
      currency="usd",
      description="One-time setup fee"
    )
    
    stripe.Invoice.create(
      customer="cus_4fdAW5ftNQow1a",
      auto_advance=true # auto-finalize this draft after ~1 hour
    )
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    \Stripe\Stripe::setApiKey("sk_test_4eC39HqLyjWDarjtT1zdp7dc");
    
    StripeInvoiceItem::create([
      "customer" => "cus_4fdAW5ftNQow1a",
      "amount" => 2500,
      "currency" => "usd",
      "description" => "One-time setup fee"
    ]);
    
    \Stripe\Invoice::create([
      "customer" => "cus_4fdAW5ftNQow1a",
      "auto_advance" => true /* auto-finalize this draft after ~1 hour */
    ]);
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc";
    
    Map<String, Object> invoiceItemParams = new HashMap<String, Object>();
    invoiceItemParams.put("customer", "cus_DPWrvbqsXH4Rmz");
    invoiceItemParams.put("amount", 2500);
    invoiceItemParams.put("currency", "usd");
    invoiceItemParams.put("description", "One-time setup fee");
    
    InvoiceItem.create(invoiceItemParams);
    
    Map<String, Object> invoiceParams = new HashMap<String, Object>();
    invoiceParams.put("customer", "cus_DPWrvbqsXH4Rmz");
    invoiceParams.put("auto_advance", true); // auto-finalize this draft after ~1 hour
    
    Invoice.create(invoiceParams);
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    var stripe = require("stripe")("sk_test_4eC39HqLyjWDarjtT1zdp7dc");
    
    stripe.invoiceItems.create({
      customer: "cus_DqZrTNCO4puf2p",
      amount: 2500,
      currency: "usd",
      description: "One-time setup fee"
    }, function(err, invoiceItem) {
      // asynchronously called
      stripe.invoices.create({
        customer: "cus_4fdAW5ftNQow1a",
        auto_advance: true // auto-finalize this draft after ~1 hour
      }, function(err, invoice) {
        // asynchronously called
      });
    });
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"
    
    invoiceitemParams := &stripe.InvoiceItemParams{
      Customer: stripe.String("cus_4fdAW5ftNQow1a"),
      Amount: stripe.Int64(2500),
      Currency: stripe.String(string(stripe.CurrencyUSD)),
      Description: stripe.String("One-time setup fee"),
    }
    ii, err := invoiceitem.New(invoiceitemParams)
    
    invoiceParams := &stripe.InvoiceParams{
      Customer: stripe.String("cus_4fdAW5ftNQow1a"),
      AutoAdvance: true, // auto-finalize this draft after ~1 hour
    }
    i, err := invoice.New(invoiceParams)
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    StripeConfiguration.SetApiKey("sk_test_4eC39HqLyjWDarjtT1zdp7dc");
    
    var invociceItemOptions = new InvoiceItemCreateOptions {
      Amount = 2500,
      Currency =  "usd",
      CustomerId = "cus_4fdAW5ftNQow1a",
      Description = "One-time setup fee",
    };
    
    var service = new InvoiceItemService();
    InvoiceItem invoiceItem = service.Create(invociceItemOptions);
    
    var invoiceOptions = new InvoiceCreateOptions {
      CustomerId = "cus_4fdAW5ftNQow1a",
      AutoAdvance = true, // auto-finalize this draft after ~1 hour
    };
    
    var service = new InvoiceService();
    Invoice invoice = service.Create(invoiceOptions);
    

    Because this example sets auto_advance to true, the invoice will be automatically finalized and then opened for payment within a short time period.

    If you set auto_advance to false, you must finalize the invoice explicitly, as shown here:

    curl https://api.stripe.com/v1/invoices/:id/finalize \
       -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
       -X POST
    
    # Set your secret key: remember to change this to your live secret key in production
    # See your keys here: https://dashboard.stripe.com/account/apikeys
    Stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"
    
    invoice = Stripe::Invoice.retrieve("in_18jwqyLlRB0eXbMtrUQ97YBw")
    invoice = invoice.finalize_invoice
    
    # Set your secret key: remember to change this to your live secret key in production
    # See your keys here: https://dashboard.stripe.com/account/apikeys
    stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"
    
    invoice = stripe.Invoice.retrieve("in_18jwqyLlRB0eXbMtrUQ97YBw")
    invoice.finalize_invoice()
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    \Stripe\Stripe::setApiKey("sk_test_4eC39HqLyjWDarjtT1zdp7dc");
    
    $invoice = \Stripe\Invoice::retrieve("in_18jwqyLlRB0eXbMtrUQ97YBw");
    $invoice->finalizeInvoice();
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc";
    
    Invoice invoice = Invoice.retrieve("in_18jwqyLlRB0eXbMtrUQ97YBw");
    invoice.finalizeInvoice();
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    var stripe = require("stripe")("sk_test_4eC39HqLyjWDarjtT1zdp7dc");
    
    stripe.invoices.finalizeInvoice("in_18jwqyLlRB0eXbMtrUQ97YBw", function(err, invoice) {
      // asynchronously called
    });
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"
    
    params := &stripe.InvoiceFinalizeParams{}
    i, err := invoice.FinalizeInvoice("in_18jwqyLlRB0eXbMtrUQ97YBw", params)
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    StripeConfiguration.SetApiKey("sk_test_4eC39HqLyjWDarjtT1zdp7dc");
    
    var finalizeOptions = new InvoiceFinalizeOptions{};
    var service = new InvoiceService();
    Invoice invoice = service.FinalizeInvoice("in_18jwqyLlRB0eXbMtrUQ97YBw", finalizeOptions);
    

    You can also finalize a draft invoice via the Dashboard, by either sending it or paying it. For details, see Finalizing draft invoices into open.

    Collecting payment for one-off invoices

    You can collect payment for an invoice either by automatically charging the payment method on file, or by emailing the invoice to the customer.

    Using the API, you make this choice by setting the billing property on the invoice to either charge_automatically or send_invoice:

    • With charge_automatically, Stripe automatically charges (and if necessary, retries) the customer’s payment source on file.
    • With send_invoice, the customer receives an email, and decides how and when to initiate payment. Stripe will include a link in the email (if you enable this feature) where customers can pay, download, and see the status of their invoice.

    In the Dashboard, you can choose between these two options for every invoice you send.

    Questions?

    We're always happy to help with code or other questions you might have! Search our documentation, contact support, or connect with our sales team. You can also chat live with other developers in #stripe on freenode.

    Was this page helpful? Yes No

    Send

    Thank you for helping improve Stripe's documentation. If you need help or have any questions, please consider contacting support.