Hi asimneupane0089,
You can validate it using the validationMode, as documented in our API Reference Guide found at https://developer.authorize.net/api/reference/.
validationMode |
Indicates the processing mode for the request. If the customer profile contains no payment data, this field should not be sent.
|
String.
Use testMode to perform a Luhn mod-10 check on the card number, without further validation. Use liveMode to submit a zero-dollar or one-cent transaction (depending on card type and processor support) to confirm the card number belongs to an active credit or debit account.
|
As described above, if you generate a liveMode transaction it will process a real transaction to verify the card number with the issuer. If this fails validation, no payment profile will be created.
Please note, you may also need to include the cardCode value in your request for validation. The cardCode value is not stored in the payment profile for future use, however.
Thank you,
Elaine