#asittingduck_code

1 messages ยท Page 1 of 1 (latest)

polar fieldBOT
#

๐Ÿ‘‹ 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/1297964544164888719

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

crisp cypress
#

Hi ๐Ÿ‘‹

Do you have an example Invoice ID I could review?

atomic flint
#

I might, give me a moment, I am not certain it will have one because it won't create the invoice, but I mightr have a call id

#

the Request ID is
req_Kx4EH6xhlkRJfu

crisp cypress
#

Taking a look at the request.

atomic flint
#

thanks

crisp cypress
#

Ah, you are using the /pay API. That is only for invoices with a specified payment method. If you want to trigger sending the Invoice email, you need to use the Send API: https://docs.stripe.com/api/invoices/send

atomic flint
#

Didn't see that in the docs.... somehow

#

Thanks for that

#

I am voiding those invoics and letting the customers know what happened because they were expecting to auto charge... on a related note, if customer clicks "save payment for future transactions" on a payment link, why isn't that labeled as the default payment method?

crisp cypress
#

We automatically set the saved PM as the default for invoices if the payment method is saved as part of the initial payment for a subscription. Otherwise it is up to your code to set the new payment method as default for the customer.

atomic flint
#

That is the case for these customers but my system is saying they don't have a default payment method.

#

For example

cus_QpcqLAPuI6V5yO

#

Do you see an issue with how I am looking for the payment method here that would prevent that from happening?

crisp cypress
#

I see a payment_method.attached event for the customer that shows the payment method was attached but it does not appear to be set as the Invoice default

polar fieldBOT
atomic flint
#

exactly, why is that?

simple nacelle
#

๐Ÿ‘‹ stepping in here

atomic flint
#

Nice thanks. sorry for that delay on responding to the last message

simple nacelle
#

No worries.

#

However, that PaymentMethod is set as the default for the Subscription, not the Customer. If you want to use the /pay endpoint without passing the PaymentMethod ID then it would have to be set at the Customer level via invoice_settings.default_payment_method

atomic flint
#

Ok but how can we make payment links set a payment method the default payment method for a customer?

simple nacelle
atomic flint
#

ohhhh ok that does make sense

#

that's what I needed thank you!

simple nacelle
#

Glad to hear it!