Request PIN Control Access Token
Send a request to this endpoint to generate a PIN control access token for a specific card version. The requested scope determines which PIN operation the token authorises: VIEW_PIN, SET_PIN or CHANGE_PIN. If no sequenceNumber is provided, the latest card version is used.
For the SET_PIN scope, sequenceNumber is ignored and the latest card version is always used, because a PIN can only be set on the latest card version.
For multi-application cards, the SET_PIN and CHANGE_PIN scopes can only be requested for the main card, not for its card applications; requesting either scope for a card application returns 400.
A successful response returns the token id, a pinUrl for the mobile device webview and a pinFrameUrl for the desktop browser iframe. Both URLs are specific to the requested scope. The token is valid for 30 seconds and is single-use: it is consumed by the first successful operation, so a reused or expired token is rejected. The token only authorises the scope it was created with; using it for another operation returns 400.
For the mobile webview flow, the device sends another API request — a POST to the pinUrl with an application/json request body containing the token id in a field named pinControlId.
For the desktop browser flow, open an iframe to the pinFrameUrl. After the iframe has loaded, the browser makes a window.postMessage() call to the iframe. The message object contains an operation field (view-pin for the VIEW_PIN scope, set-pin for the SET_PIN and CHANGE_PIN scopes) and a pinControlId field (the token id).
Note that you must use set-pin as the operation for the CHANGE_PIN scope as well.
For the SET_PIN and CHANGE_PIN scopes, the cardholder submits the PIN with the button inside the iframe. If you prefer to drive the submission from your own page instead, send a second window.postMessage() call with the operation field set to set-pin-set and no other fields; the iframe then submits the PIN currently entered in it.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Optional audit user header
Path Parameters
Unique identifier of the card for which you want to access the PIN.
Body
Describes the scope of the operation authorised by the user.
VIEW_PIN, SET_PIN, CHANGE_PIN "VIEW_PIN"
The sequence number of the card version, this value is also known as PSN (pan sequence number)
x >= 11
Response
Successful creation of the PIN control access token
The ID of this PIN Control access token.
"20218aae-b15e-406c-9e9f-23735cd86a48"
The URL that the cardholder's mobile device webview should browse to for accessing the PIN.
"https://api.tenant.sandbox.mycore.enfuce.com/issuer-web/pin/view"
The URL of the iframe for desktop browser based flows for accessing PIN.
"https://api.tenant.sandbox.mycore.enfuce.com/issuer-web/pin/view/frame"

