#pro-pooja_webhooks

1 messages ¡ Page 1 of 1 (latest)

errant fulcrumBOT
#

👋 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/1230511539371638904

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

visual beaconBOT
#

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.

shut crane
#

Hello

#

Easiest way to handle this is to simply mock the response instead of actually triggering the Event

midnight bear
#

Instructions are not clear

#

What exact should be sent as parameter to edit the reason

shut crane
#

Ah actually I'm incorrect -- that isn't a parameter you will be able to dictate in the fixture since it isn't set via an API request

#

So let's back up a second

#

Using a test clock and going through all of the retries using a failing payment method is the way to do this.

#

What are you trying right now?

midnight bear
#

Updating the subscription

  1. attaching this card - 4000000000000341 ,
  2. setting the subscription end date from forever to future date
  3. Update the Subscription
    Then, simulating the clock to end date set for the subscription, but it is canceling the subscription directly with reason "cancellation_requested"
shut crane
#

Well yeah... you don't want to set a cancellation date if you want the reason for cancellation to be payment_failed

#

That happens when the Subscription goes through all your set retries based on your Settings and then cancels

midnight bear
#

So, I need to simulate the clock to the next billing cycle date?

shut crane
#

And then move the clock past whatever the time period you have set for those retries is

midnight bear
#

It is set to retry 3 days after the previos attempt

shut crane
#

And what do you have set for If all retries for a payment fail,?

midnight bear
#

Cancel the subscription

#

I am on a test mode, so the live mode's settings will be applied automatically , right?

shut crane
#

Yes

#

Wait no

#

lol sorry

#

Yes, we changed this recently

#

Where testmode should use your livemode settings as well

#

If you try to change them in testmode you should see them greyed out (disabled for update)

midnight bear
#

Yes, its grayed out

shut crane
#

Can you share a Subscription ID where you didn't set it to explicitly cancel and you advanced time past your retry settings?

midnight bear
#

sub_1P6urPGVCe8mF8QWU1Evw508

shut crane
#

You set an explicit canellation date for that Subscription via the Subscription Schedule

#

You need to create one without an explicit cancellation as we discussed above

midnight bear
#

sub_1P6msLGVCe8mF8QW9bhtSXKC

shut crane
#

Great now advance time

midnight bear
#

Advanced to May 18, 2024|5:47 AM GMT+1

shut crane
#

Yeah that's not far enough... you need to generate the next Invoice so that payment fails for that Invoice and it goes through the retries

#

Then when all retries fail the Sub will cancel

midnight bear
#

How can I genearte Invoice manually?

shut crane
#

Why?

#

You can update the Subscription to change quantity or Price and use proration_behavior: 'always_invoice' if you want to force an Invoice to be generated

midnight bear
#

Okay

#

Invoice of 0.0 generated

shut crane
#

There is a 15 GBP Invoice in draft