#jamaicaf_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/1233413904147677194
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
I'm looking in stripe console now for this specific payment intent cancelation and same thing I see the outcome.reason was "requested_block_on_incorrect_zip" which is exactly the data we wanted to automatically collect
Where are you seeing this? outcome isn't a field on the payment intent: https://docs.stripe.com/api/payment_intents/object
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Trust me it is
I was also confused by your docs
I am working with a legacy integration that has been using stripe_payment_intent.charges.data for about 4 or 5 years now successfully with cards
If you look at the logs in your console you'll see there are properties in object that are not listed in your docs
we are not gettign a charge object for link
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Can you share a screenshot where you're seeing this then
yes one min
the one on the left is in stripe console and contains data we want
the one on the right is from sentry error logging
for cancel request/response we're just doing this
@raise_stripe_api_error
def cancel_payment_intent(self, *, payment_intent_id):
return self.client.PaymentIntent.cancel(payment_intent_id)
Yeah it's a py_ id
That's a charge not a payment intent
You can get it from the latest_charge param on the payment intent
yes you can see from the code snippet above that the response returns payment intent
latest_charge param?
if you look up pi_3P9i3kCbgzve9rMj0pXHmCnk you will see there is no associated charge
can you show me how to access?
Oh! youre saying I need to refetch it?
"latest_charge": "py_3P9i3kCbgzve9rMj0rZP4A2P",
With the api version you're using: ```The charges property on PaymentIntent has been removed. You can use the latest_charge property instead.
That's on the charge
So you need to retrieve the charge
what I'm seeing has it outside of teh charge. please see the first screen shot
youre not listening
in the first screenshot i see a top level property called outcome
that is all i need
can i get that object without any refetch
Yeah that top-level property is on the charge object.
You cannot
You need to use the retrieve charge api to retrieve that py_ id
Under latest_charge
why is it structured differently in the object i see in your dashboard??
I've already said. The object you're looking at on the dashboard is a Charge object. Not a Payment Intent
py_ id's are charges not payment intents
no its not
it has a pk id of pi_
that is a payment intent object not a charge object
the payment intent object has a keyvalue pair of latest charge according to your docs
Your first screenshot is of the charge.failed event
Which is a charge object
That has the outcome field
The payment intent object does not
You need to retrieve the associated charge from under latest_charge on the payment intent
Then you can access the outcome field
you are right. i was looking at the prior fail
so it sounds like to get this data the only possible way is to fetch the charge object?
is there a plan to deprecate getting this information for free from card payment intents
It depends on what api version you're using. We also show latest_charge on the card payment intent if you use api version >= 2022-11-15. Which is what you used for link here
are you saying if we update api versioning then we might break this for cards?
Yeah
Can you share an existing card PI
so i can check
Strange that versions are being mixed here
Strange. Yeah you're using an older api version for those requests: 2018-05-21
I see. Okay I will discuss with my tech lead. Thank you this has been helpful
?
Those payment intents are from different accounts
Each account has a different default api version
they are using the same underlying client
?
oh the code library doesn't determine, its the account
?
So because the first account is newly created we're locked into the newer api versioning
?
Api version is set at account creation. We never automatically upgrade you to a newer stripe api version. You'd need to manually do that yourself if you ever want to upgrade
I see
thank you very helpful!
sorry i was getting frustrated earlier this has been a difficult bug to understand
No worries
Are you still there? I have another question
I'm looking at the same usecase but this time with a card on the same account
pi_3P9T4iCbgzve9rMj1TQOWoXG
if you look at the logs, this shows the last log as payment intent canceled. its different from the link logs
afaik we did not have issues with canceling this one and as i said its on the same newer account
Hi ๐ jumping in as my teammate needed to step away.
Looking at that intent, can you help me understand what the difference you're referring to?
hi yes one minute let me explain more clearly
I'm looking at two different transactions both on the same account
the one we're having trouble with is pi_3P9i3kCbgzve9rMj0pXHmCnk
i belive this was using link
the paymentintent cancled object has a latest_charge property in the object but no charges object
actually never mind i think i answered my own question just now