#Ida
1 messages ยท Page 1 of 1 (latest)
Can you share a PaymentIntent object where you are facing this?
Payment Intent ID rather
You mean you need the ID, or the full object?
Just the ID works
Basically I had this issue with all of them ๐
Let me have another go and supply you with a recent one.
Ok thanks
I actually get null from:
PaymentIntent.getLatestChargeObject(), so I cannot access the .getPaymentMethodDetails().getCardPresent().getCaptureBefore()
I just tested it with:
pi_3Mc4FaKUVeVlk6JS1ol1z33a
It's in 'TestMode', not production
let me check
I get the charge Id: ch_3Mc4FaKUVeVlk6JS1K3ZW1Pr
should I try to retrieve this charge object with this id?
So I think the issue is you're not expanding latestCharge
You would need to first expand it: https://stripe.com/docs/expand
Then getLatestChargeObject should return the object
Alternatively, yeah you can retrieve it if you like
I tried to retrieve the charge, but the cardPresent is null
Let me check the expand option
Which part was null?
Probably it was getPaymentMethodDetails
And you need to expand
Actually getPaymentMethodDetails shouldn't need an expansion. Which method call in the chain returned null?
PaymentIntent.getLatestChargeObject() is returning null, which property I need to expend?
latest charge needs to be expanded
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
It has expandable next to the field
By default we only return an ID
Ok, I expanded the latest_charge and now the PaymentIntent.getLatestChargeObject() is returning the object, but card_present is null. Should I addExpend it? full path?
I tried
addExpand("latest_charge.payment_method_details.card_present")
But the card_present is still null
What are you hoping to achieve by expanding card_present?
access to the capture_before
From the documantions I understood this is the way to get it. If there is a different way to the get the capture_before field, please let me know
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 accepting these card payments via an in-person transaction on a physical Terminal device?
online payments
Okay yeah, as far as I know, card_present will only be populated with data if the card was processed in person (e.g. the card was present). What are you actually trying to do with this information? It sounds like you're trying to figure out when the authorization will drop off of the customer's account, is that right?
This is the fields I can see in stripe platform, I can see the capture_before field
Yes, I want to know when the pre-authorization will expire.
we know that it is card dependent, and configuration dependent. We might need to restrict the costumer purchase according that period. For example, purchasing a service in the future. We secure it with pre-authorization, but if the future date is after the expiration date, we need to know it and consider not allowing it
I believe if this field is part of the payment intent, there should be a way to retrieve it using java
I can get the card object, but it has no 'capture_before' field
So that's nested under a Charge object and has nothing to do with card_present. Is that Event an example of one where you would want to get the capture_before field? In other words, do you have a webhook handler that is listening for that event? And is that handler going to be responsible for getting capture_before?
I'm not using a webhook for event in this case, I'm using stripe lib something like:
PaymentIntent.retrieve(intentId, requestOptions). Supplying the key in the requestOptions
My apologies, I really appreciate you trying to help me, but I need to go now. I hope you can write me your suggestions, I will back tomorrow morning, UTC+1 time.
Thanks a lot for your advices
Sure thing! Will circle back with a suggestion here shortly