Virtual Card Number Validation
Frequency: Reported
Similar to credit card numbers, the digits in virtual card numbers and associated transaction numbers carry meaning. When a Capital One Virtual Credit Card is used, validate the data against the following business rules to reach a spend decision.
Each transaction made with a virtual card number has a unique eight-digit transaction ID.
Transaction ID rules
| Digit position (0-7) | Purpose | Rule |
|---|---|---|
| 7 | Online transaction indicator | 1 = true; 0 = false |
| 6 | Authorization/charge indicator | 0 = authorization; 1 = charge |
An authorization is a hold on funds, such as when checking into a hotel. A charge is the bill or balance due, such as when checking out.
Virtual card number rules
| Digit position (0-15) | Purpose | Rule |
|---|---|---|
| 15 | Merchant-bound indicator | 1 = true; 0 = false |
| 14 | Card type | 0 = Visa; 1 = Mastercard |
| 13 | Multi-use indicator | 1 = true; 0 = false |
Merchant-bound virtual card numbers may be used only at a specified merchant. Multi-use virtual card numbers may be used for online or offline card-not-present transactions.
Visa transactions are valid when the virtual card number is merchant-bound and not multi-use. A Visa transaction can still be valid when it is online and under $100, provided that it is not an authorization.
Mastercard transactions are valid when the amount is under $100, the purchase is online or in person, and the virtual card number is not merchant-bound. A Mastercard transaction can still be valid and merchant-bound when the amount is over $100.
Test cases
For each test case, determine the expected response from the rules:
vcnNumber | transactionId | transactionAmount | Expected response |
|---|---|---|---|
1234567891012001 | 12345101 | $50 | T |
1234567891012011 | 12345110 | $150 | T |
1234567891012110 | 12345101 | $50 | T |
1234567891012100 | 12345111 | $50 | T |
1234567891012100 | 12345101 | $50 | F |