Set PIN

PATCH CARD-US Node to set PIN

When a card is activated, you must also PATCH the PIN. The PIN is sometimes requested from a merchant during a POS transaction. Please be sure to encrypt the pin before submitting.

API ENDPOINT

https://uat-api.synapsefi.com/v3.1/users/:user_id/nodes/:node_id

PATH PARAMETER

user_id :
required
string

The user ID of the user

node_id :
required
string

The node ID of the card

BODY PARAMETER

card_pin :
string

Encrypted PIN that you wish to set for the card

EXAMPLE REQUEST

Please encrypt the PIN before sending it to us.

{
  "preferences":{
    "card_pin": "mlMKMv5+ekyw9M5AtqUBZxgdzj+GEjzddp93qSPw6uRXGpdNiNulVZxcbH1gGGiwEU9UeOwGmgiMaQsDkpbuh3SWY6IxSiPNHI9ryY8z/z+d8MXockQxsKnl1B+ekcLAXx9s2RZM7T6Nfoa+ABGwRV7aFGt91NYaolA0tfU19O1J9juB/iljm9cz5JUKDPCxZbn+LW1f4O/5Pt3fDX9Nrre/HsuHtgc7OIu6XTvg1FCm+ds3AkFdHA0dw1aW4j5biXWVEkNpb01PIicANYXtO/AusqH8udBLh0GIU/xNSTzipk/M2hUqoTZdOo7Hu8UZgLbWUEpv7hAAY2tfu/ymsA=="
  }
}

EXAMPLE RESPONSE

{
    "client_id": "589acd9ecb3cd400fa75ac06",
    "client_name": "SynapseFI",
    "expires_at": "1539514834",
    "expires_in": "7200",
    "oauth_key": "oauth_Xvu0wFyWPZr05Y1anpIO9VzslxjGQHMLoAf6q7Ne",
    "refresh_expires_in": 9,
    "refresh_token": "refresh_rXaps6TgYHiM8mJyflz9PwFh1DBqn40CotQV3Ebv",
    "scope": [
        "USER|PATCH",
        "USER|GET",
        "NODES|POST",
        "NODES|GET",
        "NODE|GET",
        "NODE|PATCH",
        "NODE|DELETE",
        "TRANS|POST",
        "TRANS|GET",
        "TRAN|GET",
        "TRAN|PATCH",
        "TRAN|DELETE",
        "SUBNETS|GET",
        "SUBNETS|POST",
        "SUBNET|GET",
        "SUBNET|PATCH",
        "STATEMENTS|GET",
        "STATEMENT|GET"
    ],
    "user_id": "5bc305abd83c197a45848f88"
}

Timeline

After the card is successfully activated, the timeline will be updated to reflect that the preferences were updated.

    "timeline": [
        {
            "date": 1538021004393,
            "note": "Node created."
        },
        {
            "date": 1538021606419,
            "note": "Card Created."
        },
        {
            "date": 1538021607416,
            "note": "Node's 'preferences' updated"
        }
    ]

Max PIN Attempts:

This Limit is set in your controls, as listed on your spec sheet. When a user goes over the maximum amount of pin attempts permitted, you will need to reset the pin or the user’s account will be locked for 24 hours.

Encrypt PIN

Make sure you encrypt the card_pin on the client's device using our public key provided below.

-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzxVLeRTf77kmG/42SdjjtRfaI/7GN4UoUBfxzN80gCyrjK+tHYJR7DKefC47fNyA2dGU7x3tu1wQRKOkjschbC3ZWF1mCqccUiHRPiGhH9VBsxLbAUCFAKOPZcBDCT7IhUdd6S23e99ewkb0c6pRk28u+kz+7ZB7d6Z/S+Em316zs0HqEnEaoUNFXtdTyW3EPuaqo0+p9daICRC44VbrTlzc+Y1A/CsiOcCCl4ske8scu/fWg0K3nybfn7IdO2smkzRwwGOc4uexBMnAkAyl0eQrqXZO4vis6ktmLFV4NpYsd0U2vvmuXFoA9XBcJHdbAww/TGwHq5RJ3505QSEK8QIDAQAB
-----END PUBLIC KEY-----

JSencrypt is an easy to use library to use for this purpose, the implementation would look something like this:

// Encrypt with the public key...
var encrypt = new JSEncrypt();
encrypt.setPublicKey($('#pubkey').val());
var encryptedCardPin = encrypt.encrypt($('#card_pin').val());

Padding:
Please make sure you are using PKCS1_v1_5 padding for encryption.

Set PIN


PATCH CARD-US Node to set PIN

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.