#rhuzaifa_api

1 messages · Page 1 of 1 (latest)

tranquil hullBOT
#

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

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

fathom stream
#

These are reproduction steps

Creating and cancelling subscription via stripe hosted products (checkout session, billing/customer portal)

  1. Create subscription via checkout session
  2. Visit billing/customer portal and cancel subscription (portal is configured to cancel subscription immediately), remain on the portal and don't provide a cancellation reason in the feedback modal.
  3. A customer.subscription.deleted event is sent per step 2, no cancellation_details exist.
  4. Provide a cancellation reason in the feedback modal in step 2
  5. A customer.subscription.updated event is generated with cancellation details.

Creating and cancelling subscription via stripe sdk/api

  1. Create subscription
  2. Cancel a subscription via stripe.subscriptions.cancel(), and don't provide cancellation reason to mimic cancellation from stripe hosted products above.
  3. A customer.subscription.deleted event is sent per step 2, no cancellation_details exist.
  4. Update subscription via ``stripe.subscriptions.update()` and provide cancellation details.
  5. A customer.subscription.updated event is generated with cancellation details, but this time the subscription cancelled_at field is null.
sullen dune
#

All you're doing in that request is updating the cancellation_details hash

fathom stream
#

Yes, but i am cancelling the subscription before and then updating cancellation reasons via the update endpoint

#

The subscription in req id (in op) also has a cancelled status

#

But canceled_at is null

sullen dune
#

Hmm, maybe a bug actually. Why not just set cancellation_details when you call the cancel endpoint?

fathom stream
#

I want to mimic what the customer portal does ex: it cancels the subscription and then updates the reason afterwards

#

Just to correctly test the subscription updated and deleted events I receive via webhooks

sullen dune
#

Yeah I guess this is a bug then that I'll file with the team

#

Wondering actually if this is something to do with the test clock

#

Both the DEL and POST request were made at the same test clock time, so likely a race condition of sorts?

#

I would cancel, then advance the clock (even a few minutes) and then set the cancellation_details hash

#

See if that fixes it

fathom stream
#

Hm, i will try that.

#

Ok i tried this via the sdk

  1. Create subscription for a new customer (wait 1 minute)
  2. Cancel subscription
  3. Forward test clock to 2 minutes ahead
  4. Wait for the test clock to be ready
  5. Update cancellation reason

but still the same result. The customer id is cus_RctTCatNCPrDBT

sullen dune
#

sub_xxx ID please

fathom stream
#

thats sub_1QjdgoHj8xfC0YnCjBiUtKVC

sullen dune
#

Maybe it's a bug then unfortunately. If you can write in to my team we'll validate and get it looked at

tranquil hullBOT
#

Hello @fathom stream, we have sent you a direct message, please check it at https://discord.com/channels/@me/1328345173415039028

  • 🔗The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
fathom stream
#

alright, I will do that. Thank you!