#vgwcjcnm044viy_api

1 messages ¡ Page 1 of 1 (latest)

unborn compassBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1392369547696275477

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

violet marsh
#

Hi sir, I have used this endpoint to create an invoice and I need change the invoice status 'draft' into 'open'

sick pendant
#

Hi! Do you have the invoice ID?

violet marsh
#

yes

#

in_1RipioGy96McQatZjHFofVqd

#

For test mode

sick pendant
#

Do you have an Invoice ID that you created and it went from draft to open?

violet marsh
#

No

#

I want to do this

#

But I cant do this use api, I have try to use 'Finalize an invoice' endpoint, but the result is 'paid'

#

Not like the docs say

sick pendant
#

But I cant do this use api, I have try to use 'Finalize an invoice' endpoint, but the result is 'paid'

Do you have an example of above? This is so we can see what steps you are taking.

violet marsh
#

You can see this link

sick pendant
#

I required the object ID of the invoice.

violet marsh
#

in_1RipioGy96McQatZjHFofVqd

sick pendant
#

This is the same Invoice ID as before. You mentioned that when you tested earlier your invoices went to paid status immediately. I need an example invoice id from your tests to see the steps you took.

violet marsh
#

in_1RiqMDGy96McQatZHa3FQa83

#

This one

sick pendant
#

You are not passing a collection_method so it defaults to charge_automatically [0] which means Stripe will attempt to pay this invoice using the default source attached to the customer [0]. For this invoice your customer has a saved payment method, so once the Invoice was finalised [2], it attempted payment and it was immediately successful.

You can try creating an invoice with send_invoice [1] instead.

[0] https://dashboard.stripe.com/test/logs/req_uG3m5DNBgZsBDt
[1] https://docs.stripe.com/api/invoices/create#create_invoice-collection_method
[2] https://dashboard.stripe.com/test/logs/req_HFZEXwyz7pRKru

violet marsh
#

Hi sir, I have already use collection_method with 'send_invoice', but when I use 'finalizeInvoice' endpoint, the result still is 'paid'

#

in_1RiqU9Gy96McQatZlaUaSgVF

#

This one is invoice id