Brian Dunning's FileMaker Custom Functions

CreditCardType ( CreditCardNumber )

Returns Credit/Debit Card Type, e.g. Visa, MC, AmEx, Discover, JCB, China Union, etc.

  Average rating: 3.5 (2 votes) Log in to vote

Will Loving   Will Loving - Show more from this author
Dedication Technologies, Inc.

Share on Facebook Share on Twitter

  Sample input:
CreditCardType( 5128351752976780 )
  Sample output:

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This is a revision of Geoff Well's implementation of Brian Dunning's Card Validator. It performs a Luhn validation check on the card number - all charge card numbers must pass this validation test - and then if it passes, reports the type of Card. This function requires that the 3 Luhn custom functions - Luhn, LuhnDoubleEven, LuhnProduct - available at

This version reflects new brands and current card number ranges including the new "2" BIN ranges for Mastercard (issued starting October 2016; 222100-272099), other 17-19 digit length card numbers, and older 13 and 14 digit numbers. For current card number ranges and brands, see for current ranges.

The following discontinued brands have been removed: Bankcard, Diners Club enRoute, Laser, Solo, Switch. I have also removed the detailed breakdown of various Visa cobrands such as Electron, Visa Purchasing, etc. Please reports any errors or suggested improvements in the comments at

To obtain the Issuing Bank and type of card (debit or credit) for a specific BIN / IIN (Bank Identification Number / Issuing Institution Number), use the online service with an HTTP POST request.



Lee Smith   Lee Smith
May 6, 2017
I think you need to add your Parameter to the name. i.e. CreditCardType (CreditCardNumber).

Because FileMaker is looking for CreditCardNumber as a parameter.

When I use the Clip Manager link, Clip Manager, provides reditCardTyp as the Parameter, which then has top be changed to CredCardNumber.

Will Loving   Will Loving, Dedication Technologies, Inc.
May 6, 2017
Thanks Lee. Should read correctly now.

Log in to post comments.


Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth:

Under construction. Email me your wish list for improvements.