Invoice for a one-time payment on Stripe
Asked Answered
C

3

7

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

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

Curmudgeon answered 22/1, 2018 at 23:53 Comment(0)
E
5

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)

Enterostomy answered 8/12, 2018 at 22:50 Comment(0)
P
4

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

Philipphilipa answered 23/1, 2018 at 0:15 Comment(2)
How to generate invoice PDF for these charges?Nakesha
That is not something Stripe supports.Philipphilipa
S
2

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>)

Spur answered 8/5, 2022 at 4:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.