Send Invoices to Customers

    Send invoices to your customers via email.

    There are two ways to collect payment for one-off invoices and subscriptions:

    You can send an invoice entirely through the Dashboard. This guide describes how to send invoices through the API.

    Sending one-off invoices

    Send one time invoices to the email address specified in customer.email. First, configure your invoices. Then, create invoice items for the customer you would like to invoice:

    curl https://api.stripe.com/v1/invoiceitems \
      -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
      -d amount=1000 \
      -d currency=usd \
      -d customer=cus_4fdAW5ftNQow1a \
      -d description="One-time setup fee"
    
    # 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({
        amount: 1000,
        currency: 'usd',
        customer: 'cus_4fdAW5ftNQow1a',
        description: 'One-time setup fee',
    })
    
    # 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(
      amount=1000,
      currency='usd',
      customer='cus_4fdAW5ftNQow1a',
      description='One-time setup fee',
    )
    
    // 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');
    
    \Stripe\InvoiceItem::create([
        'amount' => 1000,
        'currency' => 'usd',
        'customer' => 'cus_4fdAW5ftNQow1a',
        'description' => 'One-time setup fee',
    ]);
    
    // 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> params = new HashMap<>();
    params.put("amount", 1000);
    params.put("currency", "usd");
    params.put("customer", "cus_4fdAW5ftNQow1a");
    params.put("description", "One-time setup fee");
    InvoiceItem invoiceItem = InvoiceItem.create(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
    const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');
    
    stripe.invoiceItems.create({
      amount: 1000,
      currency: 'usd',
      customer: 'cus_4fdAW5ftNQow1a',
      description: 'One-time setup fee',
    });
    
    // 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.InvoiceItemParams{
      Amount: stripe.Int64(1000),
      Currency: stripe.String(string(stripe.CurrencyUSD)),
      Customer: stripe.String("cus_4fdAW5ftNQow1a"),
      Description: stripe.String("One-time setup fee"),
    }
    ii, _ := invoiceitem.New(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 options = new InvoiceItemCreateOptions {
        Amount = 1000,
        Currency = "usd",
        CustomerId = "cus_4fdAW5ftNQow1a",
        Description = "One-time setup fee",
    };
    var service = new InvoiceItemService();
    InvoiceLineItem invoiceItem = service.Create(options);
    

    Next, create an invoice for that customer:

    curl https://api.stripe.com/v1/invoices \
      -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
      -d customer=cus_4fdAW5ftNQow1a \
      -d billing=send_invoice \
      -d days_until_due=30
    
    # 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.create({
        customer: 'cus_4fdAW5ftNQow1a',
        billing: 'send_invoice',
        days_until_due: 30,
    })
    
    # 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.create(
      customer='cus_4fdAW5ftNQow1a',
      billing='send_invoice',
      days_until_due=30,
    )
    
    // 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::create([
        'customer' => 'cus_4fdAW5ftNQow1a',
        'billing' => 'send_invoice',
        'days_until_due' => 30,
    ]);
    
    // 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> params = new HashMap<>();
    params.put("customer", "cus_4fdAW5ftNQow1a");
    params.put("billing", "send_invoice");
    params.put("days_until_due", 30);
    Invoice invoice = Invoice.create(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
    const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');
    
    (async () => {
      const invoice = await stripe.invoices.create({
        customer: 'cus_4fdAW5ftNQow1a',
        billing: 'send_invoice',
        days_until_due: 30,
      });
    })();
    
    // 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"
    
    invoice = params := &stripe.InvoiceParams{
      Customer: stripe.String("cus_4fdAW5ftNQow1a"),
      Billing: stripe.String(string(stripe.InvoiceBillingSendInvoice)),
      DaysUntilDue: stripe.Int64(30),
    }
    inv, _ := invoice.New(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 options = new InvoiceCreateOptions {
        CustomerId = "cus_4fdAW5ftNQow1a",
        Billing = Billing.SendInvoice,
        DaysUntilDue = 30,
    };
    var service = new InvoiceService();
    Invoice invoice = service.Create(options);
    

    Calling the above command will create a draft invoice that you can continue to update. Once you are ready to bill, you can finalize the invoice and send it to the customer:

    curl https://api.stripe.com/v1/invoices/in_18jwqyLlRB0eXbMtrUQ97YBw/send \
      -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.send_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.send_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->sendInvoice();
    
    // 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.sendInvoice();
    
    // 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
    const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');
    
    stripe.invoices.sendInvoice(invoice.id, 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.SendInvoice("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 sendOptions = new InvoiceSendOptions{};
    var service = new InvoiceService();
    Invoice invoice = service.SendInvoice("in_18jwqyLlRB0eXbMtrUQ97YBw", sendOptions);
    

    As with subscription invoices, one-off invoices are sent to the email address associated with the customer.

    Sending invoices with a subscription

    If you sell to other businesses, automatically charging a card on file isn’t always the norm. Instead, customers might ask that you send them an invoice, which they’ll pay on their own schedule. Stripe can help you take care of status tracking and retry settings on these recurring invoices.

    If you would like to send out invoices that bill on a regular interval, start by creating a subscription with the Subscription object’s billing attribute set to send_invoice.

    curl https://api.stripe.com/v1/subscriptions \
      -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
      -d customer=cus_4fdAW5ftNQow1a \
      -d items[0][plan]=plan_CBb6IXqvTLXp3f \
      -d billing=send_invoice \
      -d days_until_due=30
    
    # 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'
    
    subscription = Stripe::Subscription.create({
        customer: 'cus_4fdAW5ftNQow1a',
        items: [{plan: 'plan_CBb6IXqvTLXp3f'}],
        billing: 'send_invoice',
        days_until_due: 30,
    })
    
    # 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'
    
    subscription = stripe.Subscription.create(
      customer='cus_4fdAW5ftNQow1a',
      items=[{'plan': 'plan_CBb6IXqvTLXp3f'}],
      billing='send_invoice',
      days_until_due=30,
    )
    
    // 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');
    
    $subscription = \Stripe\Subscription::create([
        'customer' => 'cus_4fdAW5ftNQow1a',
        'items' => [['plan' => 'plan_CBb6IXqvTLXp3f']],
        'billing' => 'send_invoice',
        'days_until_due' => 30,
    ]);
    
    // 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> item = new HashMap<>();
    item.put("plan", "plan_CBb6IXqvTLXp3f");
    Map<String, Object> items = new HashMap<>();
    items.put("0", item);
    Map<String, Object> params = new HashMap<>();
    params.put("customer", "cus_4fdAW5ftNQow1a");
    params.put("items", items);
    params.put("billing", "send_invoice");
    params.put("days_until_due", 30);
    Subscription subscription = Subscription.create(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
    const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');
    
    (async () => {
      const subscription = await stripe.subscriptions.create({
        customer: 'cus_4fdAW5ftNQow1a',
        items: [{plan: 'plan_CBb6IXqvTLXp3f'}],
        billing: 'send_invoice',
        days_until_due: 30,
      });
    })();
    
    // 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"
    
    items := []*stripe.SubscriptionItemsParams{
      {Plan: stripe.String("plan_CBb6IXqvTLXp3f"),},
    }
    params := &stripe.SubscriptionParams{
      Customer: stripe.String("cus_4fdAW5ftNQow1a"),
      Items: items,
      Billing: stripe.String(string(stripe.InvoiceBillingSendInvoice)),
      DaysUntilDue: stripe.Int64(30),
    }
    subscription, _ := sub.New(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 items = new List<SubscriptionItemOption> {
        new SubscriptionItemOption {PlanId = "plan_CBb6IXqvTLXp3f"}
    };
    var options = new SubscriptionCreateOptions {
        CustomerId = "cus_4fdAW5ftNQow1a",
        Items = items,
        Billing = Billing.SendInvoice,
        DaysUntilDue = 30,
    };
    var service = new SubscriptionService();
    Subscription subscription = service.Create(options);
    

    For each billing cycle, Stripe generates an invoice associated with that subscription. Stripe automatically sends an email to your customer’s email address approximately one hour after delivering the invoice.created webhook event. When the email is sent, Stripe emits the invoice.sent webhook.

    The webhook payload includes all the details about the invoice, such as merchant and customer address, line items, final payment amount, due date, and payment method.

    Line items and payment amount are determined by the properties of the subscription, as well as by any one-off items added to the invoice. The due date is the invoice creation date plus the value of the subscription’s days_until_due attribute.

    Sending email reminders

    When sending invoices to your customers, Stripe sends your customers payment reminders on a pre-defined schedule specified in your email reminders settings.

    Reminders contain a copy of the original invoice and can include payment instructions.

    You can also initiate an email yourself from the Stripe Dashboard. Visit the invoice and click its Send invoice button.

    If you’d like to trigger reminder emails yourself via the API, request email delivery of the invoice email by calling the /send endpoint:

    curl https://api.stripe.com/v1/invoices/:id/send \
      -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.send_invoice('in_18jwqyLlRB0eXbMtrUQ97YBw')
    
    # 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.send_invoice('in_18jwqyLlRB0eXbMtrUQ97YBw')
    
    // 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->sendInvoice();
    
    // 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.sendInvoice();
    
    // 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
    const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');
    
    stripe.invoices.sendInvoice('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.SendInvoice("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 options = new InvoiceSendOptions{};
    var service = new InvoiceService();
    var invoice = service.SendInvoice("in_18jwqyLlRB0eXbMtrUQ97YBw", options);
    

    Overdue payments

    An invoice is considered overdue when its due date has passed and the invoice hasn’t been paid. Stripe will normally continue to remind your customer to pay the invoice even after the due date. However, by modifying your Automatic collection settings, you can disable automatic collection on the invoice when it becomes past due.

    When the latest invoice for a subscription becomes past due, the subscription’s own status changes to past due. Depending on your Automatic collection settings, overdue invoices can cause the subscription to automatically be marked unpaid or canceled.

    Building your own email templates

    You can implement your own custom-designed email templates to replace Stripe’s built-in Billing emails. Doing so is straightforward with our comprehensive set of webhook events.

    Stripe can send webhooks to your application to notify you of changes within Stripe, such as invoices’ being finalized, paid, and marked uncollectible. For each event that you receive, you can construct and deliver your own emails.

    Stripe sends the following events during the invoice lifecycle: invoice.created, invoice.finalized, invoice.sent, invoice.payment_succeeded.

    In the Dashboard’s Automatic collection Settings, you can disable all of Stripe’s automatic invoice emails by making appropriate selections in the Manage invoices sent to customers section. When emails are disabled, the emails will not be sent, but you will continue to receive webhooks as normal. This way, you can use Stripe’s invoice reminders to power your own email solution.

    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.

    On this page