Luhn (card numbers) check digit validator
From the rightmost digit, double every second digit (subtracting 9 if that exceeds 9), sum everything, and require a multiple of 10.
Try it: a valid example · a broken example
curl 'https://check-digit.gumballtools.com/api/v1/run?input=79927398713&format=luhn'