Update card PIN
Updates the card PIN.
PIN Block Format (ISO 9564-1 Format 2): The PIN must be formatted as a 16-character PIN block before encryption:
- Byte 0: Control field (
2indicates Format 2) - Byte 1: PIN length in hexadecimal (4-12)
- Bytes 2-(1+N): The actual PIN digits
- Remaining bytes: Padding (
F)
Example:
A 4-digit PIN “5678” would be encoded as: 245678FFFFFFFFFF
Formatting the PIN block:
const pinBlock = `2${pinLength.toString(16)}${pin}${'F'.repeat(14 - pinLength)}`;
Encryption:
- Generate a random AES-128 key
- Encrypt the PIN block using AES-128-GCM with the random key
- RSA-encrypt the AES key using the server’s public key
- Send the RSA-encrypted key as
encryptedKeyand the AES-encrypted PIN block asencryptedPin
Validation:
- PIN must be 4-12 digits
- Weak PINs (repeating like 1111, sequential like 1234) are rejected
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The id of the card whose pin is being updated
Request Body required
Section titled “Request Body required ”object
Base64-encoded RSA-encrypted AES-128 key used for PIN encryption
AES-128-GCM encrypted PIN block. The plaintext must be an ISO 9564-1 Format 2 PIN block.
object
Base64-encoded initialization vector for AES-GCM decryption
Base64-encoded AES-GCM encrypted PIN block
object
Base64-encoded RSA-encrypted AES-128 key used for PIN encryption
AES-128-GCM encrypted PIN block. The plaintext must be an ISO 9564-1 Format 2 PIN block.
object
Base64-encoded initialization vector for AES-GCM decryption
Base64-encoded AES-GCM encrypted PIN block
object
Base64-encoded RSA-encrypted AES-128 key used for PIN encryption
AES-128-GCM encrypted PIN block. The plaintext must be an ISO 9564-1 Format 2 PIN block.
object
Base64-encoded initialization vector for AES-GCM decryption
Base64-encoded AES-GCM encrypted PIN block
Responses
Section titled “ Responses ”Response for status 200
object
Response for status 401
object
A URI reference that identifies the problem type
A short, human-readable summary of the problem type
The HTTP status code
A human-readable explanation specific to this occurrence
A URI reference that identifies the specific occurrence
The authentication realm
The required scope for this resource
Response for status 404
object
A URI reference that identifies the problem type
A short, human-readable summary of the problem type
The HTTP status code
A human-readable explanation specific to this occurrence
A URI reference that identifies the specific occurrence
The type of resource that was not found
The identifier of the resource that was not found
Response for status 500
object
A URI reference that identifies the problem type
A short, human-readable summary of the problem type
The HTTP status code
A human-readable explanation specific to this occurrence
A URI reference that identifies the specific occurrence