#maverickat_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ 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/1313600929756483775
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there ๐ no, I'm pretty sure the first Invoice doesn't trigger automatic retries that you can configure for your account in your Stripe dashboard:
https://dashboard.stripe.com/settings/billing/automatic
You can use our Test Clocks to confirm that though and test the full Subscription lifecycle in testmode quickly:
https://docs.stripe.com/billing/testing/test-clocks
It does look like it's retrying the failed invoice (first payment on checkout) and will try to do the following invoices. The interface says under Billing method Charge default payment method
When we have a successful checkout, it will list the last 4 of the credit card used. Is there a way to see what the actually default payment method is that it is going to charge? I'm wondering if it actually has no card to retry, which would be good for this case.
Where are you setting default payment methods, on the Customer objects or on the Subscription objects?
I don't think we are explicitly setting any default payment option in our API calls
Can you share an ID of an object you're working with in your testing like the Subscription?
sub_1QS34TFTcgcvv92wXHKswgIm
And this is how we are setting up the subscription:
::Stripe::Subscription.update(
subscription_schedule.subscription.id,
# subscription starts as incomplete and only becomes active upon successful payment
payment_behavior: 'default_incomplete',
# Save the default payment method on the customer for future payments
payment_settings: { save_default_payment_method: 'on_subscription' },
metadata:,
)
Oh, you're starting these via a Subscription Schedule, that's different. Yes I do believe retries happen then.
But yeah, I don't see default payment methods set up to be used.
Those would either be on the Subscription:
https://docs.stripe.com/api/subscriptions/object#subscription_object-default_payment_method
or on the Customer:
https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method
Is there a way to see what the default is that will be used? Just wondering if it's possible that there is no default payment method and the retries will fail?
Yes, you can retrieve the associated Customer and Subscription object to see a Payment Method is set up to be used by default, then you can retrieve the Payment Method object to get more information about it.
Yes, it's possible that a default isn't set and that retries will fail.
got it thank you very much Toby, you've been very helpful!