Activate Card

PATCH CARD-US Node to Activate Card

Previous Step: Create User, OAuth User, open a Synapse account and Create a Card

When a card is ready for use, activate the card and set the card pin. To activate the card, PATCH the card status to CREDIT-AND-DEBIT. You can also set the card pin in the same call by passing preferences.card_pin.

CARD PERMISSIONS

Permission
Comment

INACTIVE

Disables credits and debits on the node.

CREDIT-AND-DEBIT

Enables the card to be used for sending and receiving funds.

LOCKED

Destroys the card. This blocks all transactions. This is used when an account is fraudulent

user_id :
required
string

The user ID of the user

node_id :
required
string

The node ID of the node

BODY PARAMETER

supp_id :
string

Supplemental ID

nickname :
string

Node Nickname

allowed :
string

Node's allowed status. It can be turned to INACTIVE or LOCKED or in case of debit cards, CREDIT-AND-DEBIT

preferences.allow_foreign_transactions :
boolean

Allow foreign transaction on card

preferences.pos_withdrawal_limit :
integer

Point of sale withdraw limit for debit card

preferences.atm_withdrawal_limit :
integer

ATM withdraw limit for debit card

preferences.card_pin :
string

Encrypted 4 digit PIN for the card

EXAMPLE REQUEST

PATCH /v3.1/users/5bb29f48520da000a38cb107/nodes/5bb29f5471fd1b0091317410 HTTP/1.1
Host: uat-api.synapsefi.com
X-SP-USER-IP: 127.0.0.1
X-SP-USER: oauth_NhFV8tDKOMms2j5I4lzxJXUQY9BH6abycdnpTCA3|J6fhD7DNd238
Content-Type: application/json

{
  "allowed":"CREDIT-AND-DEBIT",
  "preferences":{
    "card_pin": "1234"
  }
}

EXAMPLE RESPONSE

{
    "_id": "5bb29f5471fd1b0091317410",
    "_links": {
        "self": {
            "href": "https://uat-api.synapsefi.com/v3.1/users/5bb29f48520da000a38cb107/nodes/5bb29f5471fd1b0091317410"
        }
    },
    "allowed": "CREDIT-AND-DEBIT",
    "client": {
        "id": "5ade26b4567a900029e2afd2",
        "name": "YY Test Account"
    },
    "extra": {
        "note": null,
        "other": {
            "access_token": "5bb29f6bfc0577002aa2a1b0"
        },
        "supp_id": ""
    },
    "info": {
        "balance": {
            "amount": 0,
            "currency": "USD"
        },
        "card_hash": "e9ef5d7c57f73eb6b616b64a878fe4d1db6ae0fb5e5fdc08aefdead605df6550",
        "card_number": "7065",
        "card_style_id": null,
        "document_id": "2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8",
        "monthly_withdrawals_remaining": null,
        "name_on_account": " ",
        "nickname": "My Debit Card",
        "preferences": {
            "allow_foreign_transactions": false,
            "atm_withdrawal_limit": 10,
            "pos_withdrawal_limit": 200
        }
    },
    "is_active": true,
    "timeline": [
        {
            "date": 1538432852093,
            "note": "Node created."
        },
        {
            "date": 1538432878314,
            "note": "Card Created."
        },
        {
            "date": 1538438761052,
            "note": "Node's 'preferences' updated."
        },
        {
            "date": 1538438843615,
            "note": "Node's 'preferences' updated."
        }
    ],
    "type": "CARD-US",
    "user_id": "5bb29f48520da000a38cb107"
}

Encrypting Data

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.

Activate Card


PATCH CARD-US Node to Activate Card

Suggested Edits are limited on API Reference Pages

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