#silvers_paymentmethod-fingerprint

1 messages ยท Page 1 of 1 (latest)

wooden spireBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

eternal sentinelBOT
solid ridge
#

Where are you looking for the fingerprint specifically?

hexed blade
#

PaymentIntent.paymentMethod.cardDetails object

#

Through Java SDK for Android

solid ridge
#

Let me see if there's a mobile dev around who can help

hexed blade
#

thanks!!

wooden spireBOT
vital trellis
#

fingerprint I get from paymentIntent.cardDetails is redacted.
Can you say more about this or share an example?

hexed blade
#

Sure, there it is : ```public static Object serializePaymentIntent(
PaymentIntent paymentIntent,
String currency
) {
if (paymentIntent == null) {
return JSObject.NULL;
}

JSObject object = new JSObject();

object.put("stripeId", paymentIntent.getId());
object.put("created", paymentIntent.getCreated());
object.put(
  "status",
  translatePaymentIntentStatusToJS(paymentIntent.getStatus().ordinal())
);
object.put("amount", paymentIntent.getAmount());
object.put("currency", currency);
object.put("amountTip", paymentIntent.getAmountTip());
object.put("statementDescriptor", paymentIntent.getStatementDescriptor());
object.put(
  "statementDescriptorSuffix",
  paymentIntent.getStatementDescriptorSuffix()
);

Moshi moshi = new Moshi.Builder().build();

PaymentMethod paymentMethod = paymentIntent.getPaymentMethod();
AmountDetails amountDetails = paymentIntent.getAmountDetails();```
#

Thats part of my function to serialize the payment intent I get when retrieving it. I create a payment intent without customer, just to be able to get the M2 Reader to work and scan the card

#

then, paymentMethod variable contains the paymentMethod we get from the paymentIntent, and out of this I'd like to get the card details and the fingerprint

#

That's what I get from this extract of code, returned to my front React app. I just need the fingerprint to be clearly visible and not [redacted]

last tree
#

Can you share the payment intent id from this screenshot?

hexed blade
#

pi_3P6fx1AjXk06DiYs1XyBmfGL I think it's that one

last tree
#

Thank you, taking a look

#

That does not look like it's the same Payment Intent. pi_3P6fx1AjXk06DiYs1XyBmfGL does not have a charge

hexed blade
#

I don't charge anything and don't process the payment since I just want to collect the payment method

#

Maybe that's why ? Even if the amount is 50, I use cancelCollectPaymentMethod right after because the sole purpose of what I'm doing is to get the card's fingerprint

last tree
hexed blade
#

But i'd need to create a customer using the SetupIntents API right? Which is not what I want to do ๐Ÿ˜ž

last tree
#

Then, what do you do with the collected payment method?

hexed blade
#

Just get the fingerprint and cancel everything

#

I just need the fingerprint to search into my database for an occurence, that's all I want to do

last tree
#

Then, what do you do with it in the database since you don't use it to make a payment.

hexed blade
#

These cards have theorically been used before to make payments on our application, it's a Box Office. So when the customer comes to the box-office and don't have his ticket, we ask him for his card, tap it on the M2 Reader and then look up the orders with the same fingerprint

#

That's why we save the fingerprint in our database, because it's not risky and PCI friendly, and we can match it later with the card if necessary

#

And that's why in this use case I just want to be able to get the fingerprint from the card tapped on the reader, so I can send a query to our backend to search through the orders

last tree
#

From your screenshot earlier, how are you retrieving the payment method? Are you using your publishable key or secret API key?

eternal sentinelBOT
hexed blade
#

I'll take a look at the Setup Intent API right now, thanks for that!
Abou the payment method, I think (not sure) I use my secret API key

#

I first create a payment intent and then uses the client_secret returned by this payment intent to create the paymentMethod

last tree
hexed blade
#

Let me try that, this might solve it !!

solar basin
#

silvers_paymentmethod-fingerprint