#maxim-k_api

1 messages ¡ Page 1 of 1 (latest)

unborn knotBOT
#

👋 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/1333537360947707924

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

tight herald
hollow stream
#

Hi!

#

So, we have a payment form where we render products from shppping cart

#

with coupons etc etc

#

create preview failed, it says "code"
:
"invoice_upcoming_none"
,

#

so we need to render on the form item lines, total price exaclty as it will be on the future invoice

tight herald
#

Is it for a one-time payment or subscriptions?

hollow stream
#

maybe it is an option to create regular invoice and keep it draft?

#

One time payment

#

No subscription

tight herald
hollow stream
#

no, just an example stripe invoices create_preview --customer=cus_RfIgYlUobiwzKZ

#

stripe invoices create_preview --customer=cus_RfIgYlUobiwzKZ

tight herald
#

That code is only trying to get a preview of customer's upcoming invoice (assuming they're subscribed to a subscription or if they have a pending invoice item)

Since the customer you're working with doesn't have either, you'd need to pass the invoice_items separately

hollow stream
#

ahh, ok!

#

Let me try

#

I will try, thank you for an advice!