#brel_api

1 messages ¡ Page 1 of 1 (latest)

queen tuskBOT
#

👋 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.

pulsar fern
#

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.

queen tuskBOT
young plume
#

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?

lilac sphinx
#

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

#

To pay the subscription's latest invoice

young plume
#

Is that correct to pay the latst invoice always?

#

Just thinking

lilac sphinx
#

With subscriptions it's done automatically

young plume
#

Is done automatically when the default card is updated?

lilac sphinx
#

Not unless you explicitly call the above endpoint right after

#

Otherwise, the next automatic retry will pay it

young plume
#

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?

lilac sphinx
#

You need to call the endpoint I shared

#

On the subscription's latest invoice

#

And pass the new payment method id

young plume
#

But isnt there a way I can specify directly the subscription?

lilac sphinx
#

No

young plume
#

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?

lilac sphinx
#

That depends on your subscription settings

#

But yeah it's possible that there's more than 1 unpaid invoice

young plume
#

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

lilac sphinx
#

Depends what you mean by Will subscription start from the moment he paid that?

young plume
#

The start cycle

#

if we have a monthly subscription

#

And user pays today but card does not have funds

lilac sphinx
#

billing cycle anchor doesn't change unless you explicitly change it

young plume
#

And then comes after 3 weeks and pays the invoice

#

he will have just 1 week remaining?

lilac sphinx
#

Billing cycle anchor would not reset in that case

young plume
#

and instead pay full?

lilac sphinx
young plume
#

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

lilac sphinx
young plume
#

how should we manage these failed payments?

lilac sphinx
#

Likely pending updates is what you want

young plume
#

When a scubription gets charged because of the new billing cycle, if the customer does not have fund on the card, subscription gets passed to past due?

#

What about unpaid?

lilac sphinx
#

This depends on your subscription settings

#

You can configure what will happen