You may either;
Setup a Certification Authority (CA) and issue smart card certificates OR
Get smart card certificates from a 3rd party certificate provider
In first option, if you setup a Microsoft CA, it can issue smart card certificates that you can directly use for logging on to AD (Active Directory) domain, it will see the CA as trusted root authority and automatically map UPN (user principal name) part of the certificate (which should be on CN field) to the AD user.
In the second option you should distribute to root CA of the provider to the client PCs and follow the procedure at https://learn.microsoft.com/en-us/troubleshoot/windows-server/certificates-and-public-key-infrastructure-pki/import-third-party-ca-to-enterprise-ntauth-store. This procedure is required for smart card logons.
In both options the client PCs that your application will run should be AD domain members.
In your application, I think you should check UPN information at CN (common name) field and check that root certificate of the smart card certificate chain is trusted by the Operating System. Then UPN may should be mapped to the AD user.