#Seni-invoices
1 messages · Page 1 of 1 (latest)
Hello! I'm not familiar with Apex - can you share what documentation you're looking at?'
Sure! The documentation isn't Apex-specific, so I'm just using this
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Apex is very java-like. Here's some of the code I've been trying to use. I tried setting the 'status' to 'open' but it the Stripe API doesn't recognize 'status' as a parameter.
I assume there's a parameter or something, or a different endpoint I can call, in order to Finalize an Invoice. Just not sure what it would be, since all of the API documentation just references the "finalize" method in the classes for other languages.
Ahhh I think I see what you're getting at
Also -- not sure where I can get access to the classes for the Java library, for example -- as I could probably figure it out by looking at that.
Is this what you're looking for? https://github.com/stripe/stripe-java/blob/449a858a/src/main/java/com/stripe/model/Invoice.java#L1323
Yes -- that is! Looks like there's an endpoint for finalizing -- "https://api.stripe.com/v1/invoices/<id>/finalize"
Thank you - that is immensely helpful.
I assume that there is not a way to create an Invoice in Finalized status via the API? Looks like I'll need to create it, then make another API call to finalize it.
Correct - there's no way to completely bypass the "draft" state of an Invoice