Cards
Read a payment card from a photo, check a card number someone typed, and keep a fingerprint you can store instead of the number.
Check a typed number#
cards.check validates a number from a checkout form: the Luhn checksum, a length that fits the network, the expiry when you send it, and the BIN record. Accept the card when scheme_valid is true and expired isn't.
curl -X POST https://verisec.dev/v2/cards/check \
-H "Authorization: Bearer $VERISEC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"number": "4242 4242 4242 4242",
"expiry": "09/29"
}'Try it with the test cards.
Read a card from a photo#
cards.read reads every card in a photo: the number, expiry and holder with their confidences, the checks, the BIN record and the issuer. cards.number and cards.expiry each read one part.
curl -X POST https://verisec.dev/v2/cards/read \
-H "Authorization: Bearer $VERISEC_API_KEY" \
-F image=@card-visa.jpgEvery card endpoint#
| Endpoint | What it does |
|---|---|
POST/v2/cards/read | Read a payment card |
POST/v2/cards/number | Read a card number |
POST/v2/cards/expiry | Read a card's expiry date |
POST/v2/cards/check | Check a card number |
POST/v2/cards/fingerprint | Fingerprint a card number |