Does Stripe generate invoices for one-time payments (not subscriptions)?
It seems in the docs that invoices are only part of their "Subscriptions" feature.
Does Stripe generate invoices for one-time payments (not subscriptions)?
It seems in the docs that invoices are only part of their "Subscriptions" feature.
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)
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
You can create an invoice for a one-time item with the following steps considering the default payment method is chargeable.
Create an Invoice Item
Stripe::InvoiceItem.create({ customer: '<customer_id>', price: '<price_id>', quantity: 10 })
Create Invoice
This invoice will include the previously created invoice items.
Stripe::Invoice.create({
customer: '<customer_id',
})
It will return the invoice id
Finalize Invoice
Stripe::Invoice.finalize_invoice( <invoice_id>, )
Pay invoice
Stripe::Invoice.pay(<invoice_id>)
© 2022 - 2024 — McMap. All rights reserved.