#john-l_best-practices

1 messages ยท Page 1 of 1 (latest)

hot martenBOT
#

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

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

drowsy scarab
#

๐Ÿ‘‹ When user is changing their Payment Method, are they using the cutomer billing portal to do so?

smoky halo
#

we are using payment elements and custom checkout so it's all within our dashboard

#

and when they update the payment method it basically swaps the old card for the new and makes it default for the current subscription

drowsy scarab
#

Do you know if you are updating the PM on the pre-existing invoice?

smoky halo
#

possibly not... we've typically just relied on using the default payment method because we only have one payment method active

#

(unless the user adds a bank account, but that's rare and not a concern here

#

I can check that though .... would that explain why users invoices aren't being paid?

drowsy scarab
#

Smart retries should attempt to use the new card information, but there is a hierarchy. To keep in mind, default_payment_method can be set in 1 of 3 places. customer.invoice_settings.default_payment_method , subscription.default_payment_method and invoice.default_payment_method

#

It checks the invoice level default first, then the if none is set at that level, it checks the subscription level, if none is set there if falls back to the customer defined default.

smoky halo
#

okay.. it's possible i'm not setting the first there

drowsy scarab
#

If a subscription or invoice level default was defined, and you only update the Default at the customer level it might be an issue.

smoky halo
#

i mean last

#

but I'll check that

#

aside from that, is it bad to attempt a charge ? For example, with Smart Retries, how do we know if there's still a charge pending? Is it guaranteed that a charge will occur on the last day ?

#

because say I find out that the issue above is the problem, if I fix that, what guarantees it will still have a retry attempt remaining? And even if I update it to use 8 retries, I'd still have the same question.

drowsy scarab
#

There is nothing wrong with attempting a charge if you know for example the new card added will work.

#

Once the PI is paid it won't retry any further.

#

So no risk of a double charge if you take manual action.

smoky halo
#

okay ... thanks... I'll check those defaults. Does making a charge attempt interfere with the smart retries? For ex, does it count as a retry?

drowsy scarab
#

No it doesn't count as a retry. They are independent.