The fingerprint of a card, also known as the SHA value, is generated by Square’s system and is based on the certificate used to sign your Android application. It’s not possible to predict or manually generate this fingerprint based on user or card details. The fingerprint is unique to each application and is used to configure the Point of Sale API application in the Developer Dashboard.
To link a customer to a sale in Square, you can use the Customers API to create a customer profile and then link that profile to a sale using the customer_id. This would allow you to track which customer made a specific order. However, this requires the customer to be linked at the time of the sale and cannot be done retroactively.
For future transactions, you could consider using the Cards API to save a customer’s card on file (with their permission). This would allow you to charge the card for future purchases and link those transactions to the customer. However, this also requires explicit customer consent and cannot be used to link past transactions.
This answer was reviewed by @Bryan-Square.