Arnaud
Arnaud

Reputation: 5112

Invoice for a one-time payment on Stripe

Does Stripe generate invoices for one-time payments (not subscriptions)?

It seems in the docs that invoices are only part of their "Subscriptions" feature.

Upvotes: 7

Views: 6143

Answers (3)

Vikas Kumar
Vikas Kumar

Reputation: 2998

You can create an invoice for a one-time item with the following steps considering the default payment method is chargeable.

  1. Create an Invoice Item

    Stripe::InvoiceItem.create({ customer: '<customer_id>', price: '<price_id>', quantity: 10 })

  2. Create Invoice

This invoice will include the previously created invoice items.

Stripe::Invoice.create({
  customer: '<customer_id',
})

It will return the invoice id

  1. Finalize Invoice

    Stripe::Invoice.finalize_invoice( <invoice_id>, )

  2. Pay invoice

    Stripe::Invoice.pay(<invoice_id>)

Upvotes: 2

dave4jr
dave4jr

Reputation: 1444

Stripe provides 2 types of invoices: "One-off Invoices" (https://stripe.com/docs/billing/invoices/one-off) and Subscription Invoices (https://stripe.com/docs/billing/invoices/subscription).

Stripe also automatically generates a hosted invoice url that you can send to customers and they can pay the invoice, as well as automatically generates a PDF of each invoice. Both of these items can be found in the response from "retrieve an invoice" in the API. (https://stripe.com/docs/api/invoices/retrieve?lang=python)

Upvotes: 5

koopajah
koopajah

Reputation: 25552

Invoices are mostly associated with Subscriptions. Those are not invoices that you send to your customers though. They are objects representing what is bundled into a charge for a recurring payment.

When you create one-time payments via the API you use Charges which are separate from Invoices.

Stripe does support email receipts though that would be sent to your customers. You can read more about this in their documentation here

Upvotes: 4

Related Questions