#NicoNyberg-invoice
1 messages ยท Page 1 of 1 (latest)
Hi ๐ if you're looking to finalize an invoice immediately, then auto_advance is not what you're looking for. That still follows the 1-hr delay process.
But you can manually finalize an invoice:
https://stripe.com/docs/api/invoices/finalize
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thanks toby! So do I understand correctly that I would need to use a POST to Stripe, and that finalizes the invoice? Is that a "manual" finalization, even though it's done programatically with automations?
I'm using bubble.io, and they have a "workflow", which essentially does this exact thing. However, when I used that, Stripe attempted to pay the invoice, but failed with a "invoice unrelated to subscription" message. Is that just another problem I need to solve, and what I did to get that error message was otherwise correct?
Yes, if you're using our API directly then you would make a POST request to that endpoint. I can't speak to bubble's flows as bubble would have built those though. If the Invoices collection_method is set to charge_automatically then it is expected for it to attempt a payment as soon as it is finalized.
They have in their documentation "This action finalizes a draft invoice and immediately charges a pending invoice. It uses the card the user has on file." for that action, so it sounds correct to me
I guess the invoice unrelated to subscription is a different error I need to solve, thanks for helping clarify this!
Any time!