Requirements
Make sure that:- You have API credentials for the Configuration API.
- Your API credential has the Bank Issuing PIN Change Webservice role.
- Your application uses iOS version 13.0 or higher.
- You installed Adyen’s Card Reveal iOS SDK.
Get a public key from Adyen
You need a base64-encoded RSA public key to generate an encrypted session key. Use the Configuration API to get the public key from Adyen. To get a public key:-
Make a GET /publicKey request, specifying the following query parameters:
Get a public key
curl
Java
PHP
C#
NodeJS (JavaScript)
Go
Python
Ruby
NodeJS (TypeScript)
The response contains:- The public key
- The expiry date of the public key
- Pass the publicKey to your client.
Generate an encrypted PIN block
You must embed the PIN in an encrypted PIN block before sending it to Adyen. Do this with Adyen’s Card Reveal iOS SDK as follows:-
Initialize the
PinChangeServicemethod. Initialize the service -
Call the
encryptedPinBlockmethod, passing the publicKey and the new PIN as parameters. Generate encrypted PIN block
encryptedPinBlock object contains the following data:
- The encryptedPinBlock that you must send to Adyen.
- The symmetric session encryptedKey that you need to securely send the PIN block to Adyen.
- The token that Adyen needs to decrypt your PIN block.
Request a PIN change to Adyen
To request a PIN change, make a POST /pins/change call and specify the following request parameters:
The following code sample shows how to request a PIN change.
Request a PIN change