Brian Dunning's FileMaker Custom Functions

CreditCardName ( CreditCardNumber )

Returns the CC type from the number

  Average rating: 4.4 (28 votes) Log in to vote

Geoff Wells   Geoff Wells
DataIsland Software LLC

Share on Facebook Share on Twitter

  Sample input:
  Sample output:
Invalid Card Number

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

Takes a 15 or 16 digit credit card number, with or without dashes and returns the credit card type (Visa, Mastercard etc. ). Numbers are checked using the Luhn Mod-10 algorithm.



Locke   Locke, usa
Jan 31, 2009
How can i get the 3 luhn function in file...
i need this code but its telling me that the lunh function can not be found...thanks...
Harold Sookman   Harold Sookman, Montreal
Nov 15, 2011
Been using this for a while but just came up with a VISA number that it claims is not valid. The VISA payment for the number in question was authorized so it must be correct.

Begins with 4313 if that helps...
Rob   Rob, Monk Media
Nov 15, 2016
Geoff, if you are still maintaining this function, I believe it's outdated according to

Looks like a great function but it's unusable without the current credit card numbering schemes.
Will Loving   Will Loving, Dedication Technologies, Inc.
May 5, 2017
I've revised the function to handle 13-19 digit card numbers and to remove brands and ranges that are no longer valid per the information at the Wikipedia link posted above by Rob. The function has been reposted at "CreditCardType" at

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 16 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: