#danielncr_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/1334942993374773420
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, that is because you've already deleted that subscription: https://dashboard.stripe.com/logs/req_88mzxfUYvKCcj1 about a second prior to making that Delete request
No, I just wrote python code to do the deletions instead.
There's something weird with the cli vs. the api. Here's another example: {
"error": {
"code": "resource_missing",
"doc_url": "https://stripe.com/docs/error-codes/resource-missing",
"message": "No such subscription: 'sub_1MCqpuGQczlVgspFBQit2ILt'",
"param": "id",
"request_log_url": "https://dashboard.stripe.com/logs/req_zApF5BqDRvX7BL?t=1738345209",
"type": "invalid_request_error"
}
}
Only the deletions I did through the python script show here, none of the ones that I attempted (and failed) through the CLI show: https://dashboard.stripe.com/logs?method[0]=post&method[1]=delete&dashboard=false&direction[0]=self&direction[1]=connect_in&showIP=false
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'm unsure what you're asking here, can you reword please?
When I tried to cancel subscriptions through the CLI they failed saying that the subscription didn't exist. After several attempts at this I wrote python code to do it instead which worked. I'd been using the CLI successfully this way for quite some time and I'd like to know why it didn't work.
Are you using the correct account from the CLI: https://docs.stripe.com/stripe-cli
in what way do I use the correct account?
If you have multiple Stripe accounts and if you've logged in to the CLI from the other accunt, https://docs.stripe.com/stripe-cli#login-account I could see this error surfacing
I tested deleting a subscription via the CLI and it just works
But if I provide a subscription that belong to my other account, it fails
I logged into the correct account first.
Like I said, I've never had this fail before either, before today.
Can you try to delete another subscription using Curl and share the id of the subscription with me?
I've already deleted them all with the python code.
I can give you a request id and a subscription id of when I tried before using the python code:
"message": "No such subscription: 'sub_1LzUJrGQczlVgspFtMrXhnqL'",
"param": "id",
"request_log_url": "https://dashboard.stripe.com/logs/req_tWbarMxOTMygBO?t=1738344198",
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 can''t reproduce this on my end using the CLI: https://docs.stripe.com/api/subscriptions/cancel?lang=cli
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Are you not able to look up that request ID?
I think you've logged into the incorrect account via the CLI.
That first deletion request: https://dashboard.stripe.com/logs/req_tWbarMxOTMygBO is made on
acct_1ASCSHBMAMOLTEak. The one succeeded was made on
acct_1Brc3yGQczlVgspF
The subscription belongs to
acct_1Brc3yGQczlVgspF
So all the evidence suggests my suspicion above so can you ensure that you've logged to the correct CLI account?
My ~/.config/stripe/config.toml file shows the correct account:
color = ''
project-name = 'default'
[default]
account_id = 'acct_1Brc3yGQczlVgspF'
device_name = 'macbookpro.lan'
display_name = 'Spokanefavs'
How could I be logged into some other account? I don't
even know what that other account is.
So you're saying you do not know what this account,
acct_1ASCSHBMAMOLTEak is?
I just looked it up. It's our connect account.
But shouldn't be involved here.
I explicitly used stripe login to get to the spokanefavs account before trying the deletions.
And confirmed that with the config.toml.
The only way I can reproduce the issue is if I log in to a different account and use a subscription id from another account