#alexdw_code
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/1306539789780127836
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Could you share the subscription ID (sub_xxx) for the issue you described?
sure.
sub_1QKxDQKmTZfp0GCQygJS47F8,
sub_1QKwuxKmTZfp0GCQ0ha3Wu7j
sub_1QKtbZKmTZfp0GCQvIkoRYxy
Your server made a request to cancel the subscription: https://dashboard.stripe.com/test/logs/req_U0RfDZmHghaJdd
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I'd recommend checking why your code sent a request to Stripe to cancel the subscription
This is the same for these 3 subscriptions
let me check again. maybe some automation code sent the request. it's strange
I checked. no code will send the cancellation request automatically.
I'm in Test Mode, is there any environmental impact?
Hmmm, I see that the Subscription creation request is sent from a US IP address, and the cancellation request sent from China. Is this expected? Do you think your secret keys might be compromised?
Not sure what you mean by this?
Just to clarify, Test mode and Live mode exist in parallel, and only depend on what set API keys you use.
oh I see
the US IP address is my local debug environment, and the cancellation request source is the UAT service. I redirected and listening the invoice.payment_succeeded event by stripe cli, and the UAT service listen the subscription created event to verify the data.
Maybe I should forward both "invoice.payment_succeeded" and "subscription.created" events by the Stripe CLI
The main question is why is your app sending the DELETE request?
I think so. This occurred because when my remote service received the 'subscription.created' webhook event, it couldn't find the corresponding subscription record in the database (as it was still being processed locally). As a result, the service treated it as an invalid subscription and sent a DELETE request to Stripe, causing the immediate cancellation.
thank you very much vanya