If a non-numeric value (e.g., "abc") is passed, Number(credentials.cardKey) will yield NaN, potentially leading to runtime issues.
if (!/^\d+$/.test(credentials.cardKey)) { throw new Error("card-key must be a valid numeric string"); } options.cardKey = Number(credentials.cardKey);