PIN Management USA

PIN management in the USA is managed by the processor through web views.

There is no customization available with these views.


Step 1

Initiate PIN Change

POST {{teller}}/api/v1/card_issuing/accounts/:account_id/pin/direct_render


Step 2

Present the web view to the user.

Use the URL returned in the previous step.

Step 3

Handle the verdict

After the user sends their pin change request the processor will respond with one of the following codes:

Status codeDescriptionNext steps
0SuccessContinue the procedure
-1Bad submitter ID or no redirect URL providedRetry with valid submitter ID or provide redirect URL
-10Invalid token. Token is either expired or not found.Verify that the token is correct or call the get token endpoint again.
-11Cardholder submitted a form with a token that is no longer valid, because Get Card PIN Change Key was called again, invalidating the previous key.Verify that the form is using the correct key before calling the get token endpoint again.
-999System errorContact Berkeley for troubleshooting
-9999Unknown errorContact Berkeley for troubleshooting

Step 4

Commit the change if successful.


Note: The PIN will not be changed until commit is called.


Android (Kotlin)

class MainActivity : AppCompatActivity() { 
    lateinit var webView: WebView
    override fun onCreate(savedInstanceState: Bundle?) {
        webView = WebView(this)
        webView.settings.javaScriptEnabled = true
        webView.addJavascriptInterface(WebAppInterface(this), "Android")
        webView.webChromeClient = WebChromeClient()
        webView.webViewClient = WebViewClient()
    override fun onResume() {
    class WebAppInterface(private val context:Context) {
        fun postMessage(code: Int) {
            Toast.makeText(context, "Received code $code", Toast.LENGTH_LONG).show()

iOS (Swift)

class ViewController: UIViewController, WKScriptMessageHandler, WKNavigationDelegate {
    func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
    override func viewDidLoad() {
        let preferences = WKPreferences();
        preferences.javaScriptEnabled = true;
        let contentController = WKUserContentController();
        contentController.add(self, name: "IOS");
        let config = WKWebViewConfiguration();
        config.preferences = preferences;
        config.userContentController = contentController;
        let url = URL(string: "https://...");
        let webview = WKWebView(frame:
            self.view.bounds, configuration: config); self.view.addSubview(webview);
        webview.navigationDelegate = self
        webview.load( URLRequest( url: url!) );
    func webView(_ webView: WKWebView, didCommit navigation: WKNavigation!) {
                                   completionHandler: { (html: Any?, error: Error?) in