#alexdw_code

1 messages ¡ Page 1 of 1 (latest)

tardy nexusBOT
#

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

unkempt sable
#

Could you share the subscription ID (sub_xxx) for the issue you described?

jagged umbra
#

sure.

#

sub_1QKxDQKmTZfp0GCQygJS47F8,

#

sub_1QKwuxKmTZfp0GCQ0ha3Wu7j
sub_1QKtbZKmTZfp0GCQvIkoRYxy

unkempt sable
#

I'd recommend checking why your code sent a request to Stripe to cancel the subscription

#

This is the same for these 3 subscriptions

tardy nexusBOT
jagged umbra
#

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?

summer lake
summer lake
jagged umbra
#

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

summer lake
#

The main question is why is your app sending the DELETE request?

jagged umbra
#

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