#Louie-Ip

1 messages · Page 1 of 1 (latest)

buoyant jolt
scarlet nacelle
#

Hi Orakaro, I have confused about the API log. In there it shows the Invoice object is created first.

scarlet nacelle
buoyant jolt
#

Okie, can you send me those request ids?

scarlet nacelle
#
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.

buoyant jolt
#

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

scarlet nacelle
#

but the logs show POST invoice is created first right?

buoyant jolt
#

If you click into it, how does it show?

scarlet nacelle
#

Its empty. (
req_1Xha4wJhuUwuHX)

buoyant jolt
#

This? It's the Invoice Item creation

scarlet nacelle
#

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

buoyant jolt
#

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

scarlet nacelle
#

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

buoyant jolt
#

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

scarlet nacelle
#

I see but both use case have the same customer

#

If I am performing a "one-time payment" Does it make a difference?

buoyant jolt
#

Shouldn't matter. Yes same customer by maybe at the time of 4:15:25 it already had some Invoice Item

scarlet nacelle
#

So there could be some internal API call that I can't see in the logs ?

#

This is from 4:15:25pm

buoyant jolt
#

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

scarlet nacelle
#

The public API document fail to mention the Invoiceitems API endpoint that is required

scarlet nacelle
buoyant jolt
scarlet nacelle
#

Cause I am creating it without using the Stripe Library. And some API endpoints are not mentioned in Stripe API

buoyant jolt
#

You can choose the curl tab

#
scarlet nacelle
#

Oh my bad, thank you Orakaro

buoyant jolt
#

Np!

scarlet nacelle
#

looks like i need to take a break haha

buoyant jolt
#

Good luck!