#igmontero_unexpected

1 messages ยท Page 1 of 1 (latest)

lone lanternBOT
#

๐Ÿ‘‹ 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. Thank you for your patience!

โฑ๏ธ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime! If this thread is closed and you have another question you'll need to start a new thread.

๐Ÿ”— 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/1214946508647170069

๐Ÿ“ Have more to share? You can add more detail below, including code, screenshots, videos, etc.

fervent locustBOT
#

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.

gentle spindle
#

Hello,

I'm adding a few more notes here:

Customer id with attached PM that was invoiced: cus_PgNxydQrm74Vsl

#

This is how I'm creating the invoice. Even tried directly attaching a default_payment_method to it, but it clearly does not work

#

And this is what I see in the hosted invoice page when going to pay

grim jungle
#

Can you share the customer ID you're working with here?

gentle spindle
#

cus_PgNxydQrm74Vsl

grim jungle
#

I don't know if hosted invoice page supports populating the default payment method.
Have you ever had this work before?

gentle spindle
#

It's stated in the documentation

#

So in case there is no way to do that -- what is the best way for me to use that payment method to pay the invoice? Just creating an endpoint that does that?

grim jungle
#

Can you share the documentation you're looking at?

grim jungle
#

I don't see a callout for it being populated in the hosted invoice page though

gentle spindle
#

Maybe has to do with the fact tha the type is charge automatically instead of send invoice?

grim jungle
#

Yeah, charge_automatically would attempt to pay the invoice by using the default_payment_method

gentle spindle
#

I'm trying with send_invoice instead. Let's see..

#

Same thing for this invoice type.. looks like it simply does not work

#

I checked the webhooks and default_payment_method is not being set when creating the invoice

grim jungle
#

But if the customer already has an attached default payment method, with charge_automatically you can immediately charge it. You don't need to set it separately on the invoice.default_payment_method and send your customers to hosted invoice page

gentle spindle
#

Right -- but it charges it after an hour or so, right?

grim jungle
#

As far as I know, that's for subscriptions related invoices only (could be wrong)

However, you can explicitly attempt the payment outside the collection schedule using the Pay an invoice API
https://docs.stripe.com/api/invoices/pay

gentle spindle
#

Okay right. I'll do that instead of the hosted invoice page then

#

Thank you very much for your help hanzo, have a great day

grim jungle
#

NP! ๐Ÿ™‚ Happy to help