3-D Secure on tokenized cards
Card numbers became tokens before they reached our API, so 3-D Secure had to work from the token.
Result
3-D Secure launched on all of the checkout’s payment gateways.
Before
Cards charged without 3-D Secure
- Card tokenno card number
- No 3‑D Secureskipped
- Chargewithout 3‑D Secure
- Card payments ran without 3-D Secure
After
3-D Secure on the token
- Card tokenno card number
- 3‑D Secureon the token
- Chargewith CAVV and ECI
- The 3-D Secure provider authenticates the token
- Its result goes with the charge and to fraud screening
- Shopper’s browser → Tokenization vendor: card number
- Tokenization vendor → Shopper’s browser: token
- Shopper’s browser → Go API: token
- Go API → 3-D Secure provider: token
- 3-D Secure provider → Go API: CAVV · ECI
- Go API → Tokenization vendor: tokenCAVV · ECI
- Tokenization vendor → Payment gateway: card number + CVVCAVV · ECI
- Go API → Eye4Fraud: ECI
The card number exists only inside the tokenization vendor: in the field the shopper types into, and in its proxy on the way to the gateway. It never reaches our API.
Key decision
Treat 3-D Secure as extra evidence for fraud screening. If it fails, the order still goes through.
What I did
- Authentication
The Go API starts 3-D Secure 2 with the card token and the order total, without asking the shopper for a challenge.
- Result on the charge
The result goes with the charge: the CAVV (proof of authentication) and the ECI (outcome code). The ECI also goes to Eye4Fraud.
- Merchant settings
Merchants turn 3-D Secure on per gateway in the admin. It can’t be saved without the 3-D Secure provider’s credentials.
- When 3-D Secure fails
Amex and Discover cards skip 3-D Secure. When it fails, the order completes without it and the team gets a Slack alert.
Hardest part
Three vendors, one card payment
No vendor saw the whole payment: one held the card, one authenticated it, one charged it. I worked with all three support teams to agree how the token, the CVV and the 3-D Secure result move between them, and kept the Go API in step as their APIs changed.