#kafkaesque_unexpected
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/1491157398990229568
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Okay, some ids and screenshots
in_1THOTCFdviIHOKAnlZ3QqFqF
Here's where in my application I'm seeing the error
We use stripe subscriptions to generate these invoices: sub_sched_1S1EOzFdviIHOKAnzvmjO36W
This one is configured to use this 8608 card
here's my internal view of what's being charged...
It seems like all three of the subscription charges with this card created that error (those are the 95 charges and they have the little arrow circle indicating they're recurring)
that 450 charge to the card went without a hitch
so whats different?
Hmm that is hard to say. That error doesn't make sense given the dashboard flow you are describing. Trying to look into what is happening in your logs. Do you see this error outside of that invoice timeline?
i couldn't find that error looking around the stripe dash
Gotcha, I did find the API call that caused it https://dashboard.stripe.com/acct_1Bm6B4FdviIHOKAn/logs/req_GqffkCIjPp6GfR
and i wasn't able to figure out how to replicate it at all in test mode so i'm trying to understand what it means
It looks like that API call was made with the stripe-go library, meaning the call probably came from Go code that you wrote (maybe in response to a webhook event?). Does that sound familiar to you?
Ah it looks like the specific PM that that API call used was previously detached via this other call from your Go code
https://dashboard.stripe.com/acct_1Bm6B4FdviIHOKAn/logs/req_OwnCws9qRI1Ojt
So yeah I think finding your code that made this call would be the way to debug this. It looks like whatever pulled the payment method ID to be used in that pay call may have an issue.
If I had to guess, your code may cache payment method IDs locally and something forgot to remove that ID when pulling valid ones to try to charge here. If it is pulling that info from the Stripe API, that is something we can speak to in this server.
Let me try and see if we're caching anything
My only objection to that line is it seems like the very first time we tried to charge this card, we got the error. I suppose they could've added the card before trying to charge but thats not a common pattern in our platform. though, that being said...this is a sub_sched...looks like it was created in august then charged in september
though we only started useing this card in february, but even then if its like january, they add the card, the card gets detatched
k, i do think we store an id in dynamo, lemme see what payment_id we have stored in dynamo for this subscription
Hello
Jumping in as Pompey needs to head out soon
But yeah, we won't know why your code made the request to detach the payment method. We won't have visiblity into that.
yep, i know. im pulling some logs and seeing what we have cached. i guess my question is, if this payment method is detatched, why am i having success using it to send those one time invoices, what's special about them that makes the detatched payment method work...
here's the pi for that charge where the card worked....
pi_3TIE3RFdviIHOKAn0GKjcwv1
notably I'm seeing...
"payment_method": "card_1SowYVFdviIHOKAntOs5NwrG",
which, notably, is not pm_1S2ZX0FdviIHOKAny1QS7F0b
I guess that explains things.
Ok, I think that puts the ball back on my court. Pompey was probably right something fishy is cached somewhere