Register a Card
Changed onWhen registering a card, you can provide either an Evervault encrypted card number or a plaintext card number. If you provide a plaintext card number it will be encrypted and the encrypted value will be returned in the response.
Card registration is idempotent on card number. Registering the same card number a second time returns the existing Card object, rather than creating a new one. This means you can use the Card object id as a unique identifier. If you register an existing card number but with a different expiry date, the existing Card object is updated with the new date, and Evervault returns a 200 OK response. A 201 Created response indicates that a new Card object was created.
Request
- Base URLhttps://api.evervault.com
- AuthHTTP basic
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"number": "4242424242424242",
"expiry": {
"month": "12",
"year": "29"
},
"externalCustomerReference": "00-4bf92f3577b34da6a3ce929d3e0e4736-00f067aa0ba902b7-01"
}Response
Returns an existing Card object. If the card number is already registered but with a different expiry date, the date is updated to the value in the request before the Card object is returned.
Example response
{
"id": "card_eead1d640d7c",
"number": "ev:debug:Tk9D:number:nTepvAI585M7lUVp:AkJ6Brzat0E7ui8DSKCSXO7AopU/+GFuBekQ6cGx7eTl:sfihK53itmHp+URxomnTITUpwQwM5nnRrnQ0qdIOUlA=:$",
"expiry": {
"month": "9",
"year": "26"
},
"bin": "424242",
"lastFour": "4242",
"brand": "visa",
"funding": "credit",
"segment": "consumer",
"country": "gb",
"currency": "gbp",
"issuer": "Gringotts Wizarding Bank and Trust Company",
"status": "active",
"replacement": null,
"automaticUpdates": "enabled",
"createdAt": 169297262323,
"updatedAt": null
}Changes
- info
added the new optional request property
- info
removed the
cardholder-opted-outenum value from theresponse property for the response status - info
removed the
cardholder-opted-outenum value from theresponse property for the response status
- info
- info
the
response's property pattern^[a-z]{2}$was removed for the status - info
the
response's property pattern^[a-z]{2}$was removed for the status - info
the
response's property pattern^[a-z]{3}$was removed for the status - info
the
response's property pattern^[a-z]{3}$was removed for the status
- info