#amy_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/1237339335657783409
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi! the fingerprint field works the same in test mode as in livemode. What exact issue are you facing?
I can see the fingerprint in stripe's background, but I query it through the API, but I can't get any information about the card. Why?
PaymentMethod paymentMethod = PaymentMethod.retrieve(pmId);
Is it the same? In the current test environment, the callback information obtained by the front-end after the successful payment, "fingerprint":"[redacted]", what does this mean?
but I query it through the API, but I can't get any information about the card.
what does that mean? I see you made a call to the API via our Java SDK. The finrgerprint would be returned in the response(under.getCard().getFingerprint()as far as I remember). What code are you using, what did you expect to see, what did you see instead?
In the current test environment, the callback information obtained by the front-end after the successful payment, "fingerprint":"[redacted]",
where precisely are you seeing that?
but like in general yes, the fingerprint is not returned on the frontend(when using publishable API keys), that's expected, it is only returned when using secret API keys on the backend
Credit card after successful callback results see
fingerprint was this delivered to us at webHook? No sign of it so far
response={"billingDetails":{"address":{}},"cardPresent":{},"created":1714026342,"id":"pm_1P9LkY04cT6YoXkE8Q9ha329","livemode":false,"metadata":{},"object":"payment_method","type":"card_present"}
If you look at the data returned, there are no crad entities
what webhook event are you expecting? if you paid a PaymentIntent with a PaymentMethod, then sure, you will get events like payment_intent.payment_succeeded . fingerprint won't be in the top-level event data, since it lives inside the Charge or PaymentMethod object, you have to make some extra API calls.
and where does this object come from?
Now I want to get this fingerprint, think of three ways:
- webHook;
- Callback received after the front end swipes the card successfully;
3, the server side according to pmId, actively query;
What's your suggestion? Which way is more appropriate?
Have been paid for the successful order inside the acquisition
1 or 3 works.
but 1, I can't see a callback for this fingerprint information
If it is 3, do I need to use charge or paymentMethod?
listen to e.g. payment_intent.payment_succeeded , call Charge.retrieve() on the value of https://docs.stripe.com/api/payment_intents/object#payment_intent_object-latest_charge , look at the fingerprint in https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card-fingerprint .
or listen to payment_intent.payment_succeeded and call PaymentMethod.retrieve() , or so on.
they both work.
So far I'm just PaymentMethod.retrieve(), but I don't get the card information
Or is it necessary to query when the callback comes back, and now it is not at the callback time, so the query cannot be queried?
again, what does that mean?
What exact code are you using, what did you expect to see, what did you see instead?
There is a field that has the fingerprint:
https://docs.stripe.com/api/payment_methods/object#payment_method_object-card_present-fingerprint
I have verified that the fingerprint can be queried using charge, but cannot be queried using paymentMethod
so please show me the exact code you've written to query it, and share an example pm_xxx ID you've used with that code.
One more question, just to be clear, is each card going to have a unique fingerprint? Or will some cards have no fingerprints?
PaymentMethod paymentMethod = PaymentMethod.retrieve(pmId);
is each card going to have a unique fingerprint?
yes
Or will some cards have no fingerprints?
no, they all have a fingerprint
sure, and then what?
what do you do with the variable paymentMethod to look at and log the values of the fields you're interested in?
pm_1PBCl204cT6YoXkEfsOHuBbX
for example paymentMethod.getCardPresent() etc. Please share the complete code you're using.
I don't care if the paymentMethod gets the fingerprints, I can get them through the Charge
it will return null
There is one last question to confirm, that is, webHook will not return the fingerprint, so we need to actively query the API, right?
you would call the API as part of your code that handles the webhook yes, so you can get more detail.