Encrypted PIN Change
Change card PIN with Change Request
Changes the PIN of the card specified in the request URL using the Change Request process. Follow these instructions to use this endpoint:
- Retrieve the encryption key in JWK format with the GET Retrieve latest public key method and make it available.
- Collect the customer's desired PIN through a text input in your frontend and store it as string containing a JSON-formatted object {"pin": "<NEW_PIN>"}.
- Parse the received encryption key JWK from the first step (you may want to use a suitable library of your choice, e.g. JOSESwift for iOS or Nimbus JOSE for Android).
- Encrypt the string containing the new PIN from step 2 into a JWE using the previously received encryption key and the following properties:
- Algorithm: RSA-OAEP-256
- Encryption method: A256CBC-HS512
- Key ID: kid property from the encryption key JWK
- On the customer's device, generate the compact serialization of the JWE created in the previous step—this will be used as the encrypted_pin parameter.
- Call this endpoint from your backend.
post/v1/cards/{card_account_id}/sca_pin_update_requests
Path parameters
card_account_idstring required
Unique identifier of the card whose PIN you wish to change.
Request body
Response
The request was accepted, and now the customer must confirm the change request.
Example response
{
"id": "d6c778822b2d7bd3b778935bcfd0d1d3csc",
"status": "CONFIRMATION_REQUIRED",
"updated_at": "2022-04-21T13:59:52+00:00",
"url": "https://example.com/authorize"
}