#rhuzaifa_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/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.
- rhuzaifa_code, 3 days ago, 21 messages
- rhuzaifa_error, 3 days ago, 38 messages
- rhuzaifa_code, 3 days ago, 18 messages
- rhuzaifa_docs, 5 days ago, 6 messages
These are reproduction steps
Creating and cancelling subscription via stripe hosted products (checkout session, billing/customer portal)
- Create subscription via checkout session
- 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.
- A
customer.subscription.deletedevent is sent per step2, no cancellation_details exist. - Provide a cancellation reason in the feedback modal in step
2 - A
customer.subscription.updatedevent is generated with cancellation details.
Creating and cancelling subscription via stripe sdk/api
- Create subscription
- Cancel a subscription via
stripe.subscriptions.cancel(), and don't provide cancellation reason to mimic cancellation fromstripe hosted productsabove. - A
customer.subscription.deletedevent is sent per step2, no cancellation_details exist. - Update subscription via ``stripe.subscriptions.update()` and provide cancellation details.
- A
customer.subscription.updatedevent is generated with cancellation details, but this time the subscriptioncancelled_atfield is null.
That request doesn't actually cancel the subscription. You need to call this endpoint instead: https://docs.stripe.com/api/subscriptions/cancel
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
All you're doing in that request is updating the cancellation_details hash
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
Hmm, maybe a bug actually. Why not just set cancellation_details when you call the cancel endpoint?
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
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
Hm, i will try that.
Ok i tried this via the sdk
- Create subscription for a new customer (wait 1 minute)
- Cancel subscription
- Forward test clock to 2 minutes ahead
- Wait for the test clock to be ready
- Update cancellation reason
but still the same result. The customer id is cus_RctTCatNCPrDBT
sub_xxx ID please
thats sub_1QjdgoHj8xfC0YnCjBiUtKVC
Maybe it's a bug then unfortunately. If you can write in to my team we'll validate and get it looked at
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.
alright, I will do that. Thank you!