#Nukes002
1 messages · Page 1 of 1 (latest)
Can you share with me the checkout session IDs?
I just need the checkout session ID. It looks like cs_test_XXXX in test mode and cs_live_XXXX in live mode
cs_test_a1CcYdnhvJTwawIfnWkVb5bjF7VYuMThXubOx8mbKZmYhMspa4Xv7LR3Oz
yea didnt know if theres Confidential or not
cs_live_a1TPibQ07h8Sst0wQHcrTkOaAGCZzNkRzDLyE1Ew8M59uBijC8WueSdQUV
It happens on the payment intent succeeded portion
Thanks. The IDs are just a random string, only Stripe engineer can query the checkout session info from the ID
makes sense
OK, so where do you see this charges? from the checkout session object?
OK, so you expand the payment_intent
has the charges
yea
so this in test mode
pi_3M2qgiAALr01f0o815vt21Ap
Has the charges list
This PI in production lacks the Charges list
pi_3M9LbRI9Uk2ZIuMv1uKoSk91
OK. So I believe your question is why one PaymentIntent has charges list and the other has latest_charge, am I right?
That's because of the API change as explained in this change log https://stripe.com/docs/upgrades#2022-11-15
https://dashboard.stripe.com/logs/req_PIcMEoChNEyulO this request was made with the latest API 2022-11-15, so the response follows the latest API behvaiour.
Ugh
so i need to fix all code to make a second call for the charge?
or is there a simpler way to get the URL?
Does your code rely on the whole charge object? or just the ID?
for the reciept?
i havent looked through all the code, it broke when trying to link the reciept for the charge
OK. Since you are using the latest API version, I'd suggest you to use Charge ID from latest_charge property and call retrieve charge API to obtain the charge object, and get the receipt_url from it.
ok. just need to change some modeling then.
how often do these major changes happen?
this may be alot of code as i relied on that Responce json in my db
This page will be updated (https://stripe.com/docs/upgrades#api-versions) when a new API is released. Note that your Stripe API version is not automatically upgrade when a new API version is released, you need to visit your Dashboard settings and manually upgrade the API version.
well that helps, ok thanks
teach me to use 2 accounts
Can i roll back my second account? or no
I also realized that the test mode request and live mode request are created in two different accounts, without two different API versions, and that's why the behaviours are different.
No you can't roll back your Stripe API version, but you can use a different API version when making a request. https://stripe.com/docs/api/versioning#versioning
maybe ill just fix it all together, has to happen eventually.
Hey Thanks a ton for your help, pass this on to your supervisor if you get a chance. So helpful!