#jarrett-invoices
1 messages · Page 1 of 1 (latest)
@weary furnace sincere apologies for the delay! If the invoice is still in a draft status then deleting it might be the option that you're looking for.
https://stripe.com/docs/api/invoices/delete
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
But how do I use payment intents with a draft invoice.
additionally, there are less available options for using setup intents with an invoice. all the available payment methods aren’t available.
Can you describe what you are doing a bit more? Why are you doing Checkout on an Invoice's PaymentIntent?
@weary furnace why exactly are you using invoices for this? Why not just create the payment intents directly if you aren't actually using the invoices?
@weary furnace Opened your thread again!
ty @keen epoch. @white smelt I'll give you the flow. A user chooses an amount of credits to purchase in our system. We make a draft invoice that we then use on the next page and display the full breakdown of their purchase, use stripe coupons on their invoice etc. Right now, we currently make a setup intent and then pay that invoice. @jovial gazelle we use coupons and stuff so we are using features of invoices.
There isn't really a clear solution for you other than to switch to something like Checkout, which does support coupons. As you already know, Invoices won't generate a Payment Intent until they've been finalized. Once thye've been finalized you also can't delete them - you can only mark them as void.
that seems really lame. i don't get why there is no way to delete a finalized invoice. is it unreasonable to void tons of invoices?
like every "checkout" is a finalized invoice
The way you're using Invoices is not really their intended use cases - finalizing an Invoice usually that you fully expect the customer to complete/pay for it. This is why we usually recommend plain old payment intents for checkout flows where the user can abandon the cart
so how do invoices get used normally with coupons?
how does stripe checkout work? does it generate invoices?
hello! just catching back up
Stripe Checkout generates invoices for subscriptions, but not one-time payments
I asked earlier why you chose to use Invoices in the first place, instead of using Payment Intents directly
Is it primarily for the coupons/discounts?
If so, as Karbi mentioned Checkout supports those (user-enterable promo codes!) and presents a nice UI of the line items you send. For one time payments it will produce a receipt, not an invoice. Do you actually need the invoice for some reason?
we accept payment from other sources (ex PayPal) and mark the invoices paid out of band
this allows us to use Stripe as our source of truth for payments
and still utilize all the functionality without building out our own handling for coupons
Ok, well, that's fine but a consequence is having some void invoices. You can't delete these because they are legal documents in many jurisdictions. You void them to indicate they are no longer due.
Once you create a payment intent you'd have an analogous situation: you can delete them, you cancel them, to indicate they wont be completed.
Similar to checkout sessions
There isn't anything wrong with these incomplete payments, you just ignore them
If you want to avoid the void invoices, you'll need to defer creating invoices until later in your payment flow when youre more confident that customer will pay
You'll still have some, of course, but ideally fewer
i just don't get why there is no way to associate an invoice with a payment intent during creation
like you need a payment intent to use the payment element
what do you mean?
but there is no way to get one without finalizing an invoice
i don't know if a customer's credit card will fail at this point.
well yea, because a draft invoice is a draft, its not expected to be paid, so there is no payment
but why is there no way to create a payment intent FOR an invoice
Whether a customers payment method fails or not shouldn't determinw whether you issue an invoice for them, an invoice indicated someone owes you money for something, then you collect on it
That's created for you when you finalize. The way you're using Invoices is misaligned with their intended use, so it doesnt support your use case / flow
does Stripe checkout generate invoices?
It sounds like what you really want is payment intents, and you can manage the coupon/discount flow in your own application, and set the amount however you like
For subscriptions, yes, not for one-time payments
ok and how does it work if i don't start my subscription cause I don't pay
it just voids the invoice?
the reason we use invoices too is so we can provide customers with custom orders
Yes, if a subscription is created without payment (incomplete) and abandoned, it would eventually become incomplete_expired and the associated first invoice would be void
Whats stopping you from offering custom orders using payment intents directly?
well this checkout process is used in various ways where invoices do make a lot of sense. for example we have an enterprise customer that we need to send an invoice to. this flow handles that
so switching to payment intents would mean we'd have to have an entirely separate flow to handle other stuff like that which would not be nearly as clean.
what are the negatives to voiding invoices that never are paid
also, it just seems odd that you can't collect a payment via a payment intent and apply it to an invoice.
yeah that isn't supported right now
"right now"... is this something that will be?
i.e. we have heard that feedback from users but nothing has been built around that