#jamaicaf_api

1 messages ยท Page 1 of 1 (latest)

toxic rampartBOT
#

๐Ÿ‘‹ 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.

chrome foxBOT
rugged tree
#

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

rare rune
rugged tree
#

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

rare rune
#

Oh

#

No it's on the charge object

#

Not payment intent

rugged tree
#

we are not gettign a charge object for link

rare rune
#

Can you share a screenshot where you're seeing this then

rugged tree
#

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)
rare rune
#

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

rugged tree
#

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

rare rune
#

It has a latest_charge param

#

I'm looking at it

rugged tree
#

can you show me how to access?

#

Oh! youre saying I need to refetch it?

#

"latest_charge": "py_3P9i3kCbgzve9rMj0rZP4A2P",

rare rune
#

Yeah

rugged tree
#

why? I only care about the outcome.reason

#

which i can see in the console

rare rune
#

With the api version you're using: ```The charges property on PaymentIntent has been removed. You can use the latest_charge property instead.

rare rune
#

So you need to retrieve the charge

rugged tree
#

what I'm seeing has it outside of teh charge. please see the first screen shot

rare rune
#

I saw it

#

That's the charge

#

py_ id's are charges

rugged tree
#

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

rare rune
#

Yeah that top-level property is on the charge object.

rare rune
#

You need to use the retrieve charge api to retrieve that py_ id

#

Under latest_charge

rugged tree
#

why is it structured differently in the object i see in your dashboard??

rare rune
#

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

rugged tree
#

no its not

#

it has a pk id of pi_

#

that is a payment intent object not a charge object

rare rune
rugged tree
#

the payment intent object has a keyvalue pair of latest charge according to your docs

rare rune
#

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

rugged tree
#

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

rare rune
rugged tree
#

are you saying if we update api versioning then we might break this for cards?

rare rune
#

Yeah

#

Can you share an existing card PI

#

so i can check

#

Strange that versions are being mixed here

rugged tree
#

yes give me one minute

#

pi_3P9pcOKN1ApXu8y50w8vAIhj

rare rune
#

Strange. Yeah you're using an older api version for those requests: 2018-05-21

rugged tree
#

I see. Okay I will discuss with my tech lead. Thank you this has been helpful

rare rune
#

Oh

#

I see why

rugged tree
#

?

rare rune
#

Those payment intents are from different accounts

#

Each account has a different default api version

rugged tree
#

they are using the same underlying client

#

?

#

oh the code library doesn't determine, its the account

#

?

rare rune
#

Correct

#

The stripe account

rugged tree
#

So because the first account is newly created we're locked into the newer api versioning

#

?

rare rune
#

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

rugged tree
#

I see

#

thank you very helpful!

#

sorry i was getting frustrated earlier this has been a difficult bug to understand

rare rune
#

No worries

rugged tree
#

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

violet sable
#

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?

rugged tree
#

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