Taras Lysyi

QuickCheckout · Softcery · 2022

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 payments ran without 3-D Secure

After

3-D Secure on the token

  • The 3-D Secure provider authenticates the token
  • Its result goes with the charge and to fraud screening
One card payment
  1. Shopper’s browser → Tokenization vendor: card number
  2. Tokenization vendor → Shopper’s browser: token
  3. Shopper’s browser → Go API: token
  4. Go API → 3-D Secure provider: token
  5. 3-D Secure provider → Go API: CAVV · ECI
  6. Go API → Tokenization vendor: tokenCAVV · ECI
  7. Tokenization vendor → Payment gateway: card number + CVVCAVV · ECI
  8. 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

  1. Authentication

    The Go API starts 3-D Secure 2 with the card token and the order total, without asking the shopper for a challenge.

  2. 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.

  3. 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.

  4. 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.

Back to all work