#dawson_best-practices

1 messages ¡ Page 1 of 1 (latest)

shut charmBOT
#

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

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

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

blissful raptor
#

I want it to look like this pretty much

#

I was able to create a off-session + confirm payment intent and it successfully charge dthe account, but I was unable to add it to the invoice history.

I'm looking at stripe.invoices.create at the moment, but I can't figure out how to add any form of pricing to say how much the total cost was

unkempt gate
#

Yeah a payment intent isn't an invoice, so you do need to run stripe.invoices.create if you want it to show in the invoice history

#

So after creating the invoice, you need to create the invoice item

#

For the amount

blissful raptor
#

Awesome, thank you! I had to finalize the invoice

unkempt gate
#

Yeah and it says open there

#

Which means it still needs to be paid

blissful raptor
#

The card was on file before I made the invoice, this is in test mode

#

I tried with and without setting the default_payment_method

unkempt gate
#

Can you share the invoice id

blissful raptor
#

There are multiple invoices, that was the latest one

#

Okay so, I was a bit confused.

I added #pay(invoiceId) to the end, I figured this wasn't required due to having auto_advanced set to true and collection_method to charge_automatically

#

It's all working now, I appreciate the help

unkempt gate
#

Yeah so we wait an hour to pay the invoice actually

#

So if you need to pay immediately, you do need to call the /pay endpoint

blissful raptor
#

Makes sense, have a good one.