#Louie-Ip
1 messages · Page 1 of 1 (latest)
To create an Invoice you will need to create an Invoice Item first, then create the Invoice. I am not familiar with Insomnia but here is how to do it with REST API: https://stripe.com/docs/invoicing/integration#create-invoice-code
Hi Orakaro, I have confused about the API log. In there it shows the Invoice object is created first.
This action is created from following this guide using the dashboard. https://stripe.com/docs/invoicing/dashboard
Okie, can you send me those request ids?
invoices/in_1LQ3zlESI16eL6vaM7tqlPY1/pay - req_sasesWvZhVTdrY
invoices/in_1LQ3zlESI16eL6vaM7tqlPY1 - req_nwadFviEjEPIoI
invoices/in_1LQ3zlESI16eL6vaM7tqlPY1 - req_KK6KE3psvyWMHD
invoicesItems - req_rRANiui9afdc0H
invoices - req_TnRb0usaeeai03
Hi Orakaro, is that possible that you can tell me or point me what API endpoints are used in here. Since some of them are missing from the log as i see.
Looking at the guide, it's really just Creating an Invoice Item, then Creating an Invoice
req_TnRb0usaeeai03 = creating an Invoice Item as I am seeing
req_rRANiui9afdc0H = creating an Invoice
So they are correct
but the logs show POST invoice is created first right?
If you click into it, how does it show?
Its empty. (
req_1Xha4wJhuUwuHX)
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
This? It's the Invoice Item creation
I think https://dashboard.stripe.com/test/logs/req_1Xha4wJhuUwuHX is the request on 4:15:25 you are seeing
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Oh I am so sorry I have provided incorrect request ID 😣
let me rearrange the list again
This is the Correct List invoices/in_1LQ3zlESI16eL6vaM7tqlPY1/pay - req_nwadFviEjEPIoI invoices/in_1LQ3zlESI16eL6vaM7tqlPY1 - req_KK6KE3psvyWMHD invoices/in_1LQ3zlESI16eL6vaM7tqlPY1 - req_rRANiui9afdc0H invoicesItems - req_TnRb0usaeeai03 invoices - req_1Xha4wJhuUwuHX
Okie from bottom up, I see all requests are from Dashboard
Basically you created an Invoice (in_1LQ3zlESI16eL6vaM7tqlPY1), created an InvoiceItem which is unrelated, then you modify the first Invoice and Pay
i see but back to my first query. I can't create a invoice without invoice insomnia
I have provided customer, collection_method, currency and default_payment_method
Yes that's expected because an Invoice need the customer to have an Invoice Item beforehand. In your history the first request succeed because, maybe, the customer already had a pending Invoice Item else where
While in a normal case, it is always to create an Invoice Item first, then an Invoice
I see but both use case have the same customer
If I am performing a "one-time payment" Does it make a difference?
Shouldn't matter. Yes same customer by maybe at the time of 4:15:25 it already had some Invoice Item
So there could be some internal API call that I can't see in the logs ?
This is from 4:15:25pm
It's a Dashboard generated API so it might be different than public API. The Doc I recommend is for public API, and that you would need to follow
The public API document fail to mention the Invoiceitems API endpoint that is required
Thank you, but I found some API endpoint very difficult to find.
https://stripe.com/docs/invoicing/integration#create-invoice-code isn't this good enough? It states to create Invoice Item first, then Invoice
Cause I am creating it without using the Stripe Library. And some API endpoints are not mentioned in Stripe API
You can choose the curl tab
https://stripe.com/docs/api/invoiceitems/create
https://stripe.com/docs/api/invoices/create
Or here as API reference
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Oh my bad, thank you Orakaro
Np!
looks like i need to take a break haha
Good luck!