#silvers_paymentmethod-fingerprint
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/1230250600852230195
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Where are you looking for the fingerprint specifically?
Let me see if there's a mobile dev around who can help
thanks!!
fingerprint I get from paymentIntent.cardDetails is redacted.
Can you say more about this or share an example?
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]
Can you share the payment intent id from this screenshot?
pi_3P6fx1AjXk06DiYs1XyBmfGL I think it's that one
Thank you, taking a look
That does not look like it's the same Payment Intent. pi_3P6fx1AjXk06DiYs1XyBmfGL does not have a charge
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
From the flow you described, it sounds like you'd want to use the SetupIntents, https://docs.stripe.com/terminal/features/saving-cards/save-cards-directly. This allows you to collect payment method details without making a charge, and you would not need to cancel the payment intent.
But i'd need to create a customer using the SetupIntents API right? Which is not what I want to do ๐
Then, what do you do with the collected payment method?
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
Then, what do you do with it in the database since you don't use it to make a payment.
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
You do not need to create a customer, https://docs.stripe.com/api/setup_intents/create since you do not intend to attach the payment method to a customer for future use.
From your screenshot earlier, how are you retrieving the payment method? Are you using your publishable key or secret API key?
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
If you retrieve the payment method, https://docs.stripe.com/api/payment_methods/retrieve using your secret API key, do you see the fingerprint?
Let me try that, this might solve it !!
silvers_paymentmethod-fingerprint