How can i get the Credit card type by card number using paypal rest api in java

Marcel_Hadler
Contributor
Contributor

Hi,

 

As you know when we add credit card using paypal rest api, we need to submit:-

Credit card number,

Expiry month,

Expiry Year,

CVV,

Type

 

Is there any way to get the credit card type(Visa, Mastercard etc) by card number, I have seen in my ecommerce websites where user type the card number card type automatically displayed, i could not found solution, please help me,

 

Thanks

Login to Me Too
1 REPLY 1

MTS_Jennifer
Moderator
Moderator

Hello,

Thank you for posting to the PayPal Merchant Technical Support Community.

You have a few options to be able to determine the card types. You can use the Standard Card Fields with PayPal Checkout, and PayPal will be able to determine the card type.

The other option is that you could code a script with your form that will auto determine the card type.

Card Starts with the following here are the card types:

  • 4 = Visa
  • 5 or 2 = MasterCard
  • 6 = Discover
  • 3 = Amex

Thank you,

Jennifer

PayPal

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.