#brel_api
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/1349383637094760511
đ 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.
- brel_unexpected, 6 days ago, 35 messages
Hi, are you using out test cards? If so, this is working as expected and we do have one card where you can attach the payment method, 4000000000000341 but it later declines.
Thank you. I have another question
In case the subscription is in past due or is unpaid because the customer does not have funds
How can I re-triger a payment for that subscription after customer changes card?
Assuming the new card replaced the old card as the customer's default payment method, then the subscription's automatic retries should retry with the new card
But you can also trigger this manually via the pay invoice endpoint: https://docs.stripe.com/api/invoices/pay
To pay the subscription's latest invoice
With subscriptions it's done automatically
Is done automatically when the default card is updated?
Not unless you explicitly call the above endpoint right after
Otherwise, the next automatic retry will pay it
Sorry, I am not unsterstanding. What I need to do is that when the customer updates the default card, I want to retrigher the payment from that subscription
Do I need to call the api of the latest invoice?
You need to call the endpoint I shared
On the subscription's latest invoice
And pass the new payment method id
But isnt there a way I can specify directly the subscription?
No
is it correct to take the latest invoice? Can there by edge cases when the customer shoudl pay another invoice and not the latest one?
That depends on your subscription settings
But yeah it's possible that there's more than 1 unpaid invoice
What if a customer upgrades the subscription but does not have funds. Then the customer comes after 3 weeks and pays the invoice. Will subscription start from the moment he paid that?
Because otherwise would be a problem
Depends what you mean by Will subscription start from the moment he paid that?
The start cycle
if we have a monthly subscription
And user pays today but card does not have funds
billing cycle anchor doesn't change unless you explicitly change it
And then comes after 3 weeks and pays the invoice
he will have just 1 week remaining?
Billing cycle anchor would not reset in that case
and instead pay full?
Correct
But how should i manage these in my platform. In case user upgrades but card has no funds should I upgrade customer to new plan or not?
If he pays after 3 weeks it means that he will pay for just 1 month
1 week, sorry
and is not correct
how should we manage these failed payments?
Likely pending updates is what you want