generate
generate(
customer: CustomerInfo,
passkey: string,
config: ComplianceConfig,
): CardResultSource: index.ts:135
Generates a unique closed-loop reward card (PAN + expiry + CVV + keyId) from customer identity data.
Every call produces a different PAN even for the same customer, because a CSPRNG salt is mixed into the hash before digit generation.
⚠️ The returned cvv is SAD — do not persist it. Store keyId alongside the card record for future validation. Call redactCardResult() before saving.
Parameters
customer(CustomerInfo) — Full customer identity informationpasskey(string) — Secret passkey (≥16 chars) for CVV HMAC key derivation. Must be distinct from any PAN encryption key.config(ComplianceConfig) — Optional compliance config (pbkdf2Iterations, keyId, onEvent)
Returns