Activate/Deactivate/Terminate Card Number

Activate, Inactivate or Terminate a card number

After you have issued a card number to a DEPOSIT-US or SUBACCOUNT-US account, set the card permissions to activate, deactivate or terminate a card. You also have the option to set the PIN or update card preferences by passing the card_pin or preferences.

API ENDPOINT

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

PATH PARAMETER

user_id :
required
string

The user ID of the user

node_id :
required
string

The ID of the node the card number was issued to

subnet_id:
required
string

The ID of the subnet (card number)

BODY PARAMETER

status :
required
string

Permission of the card (Active, Inactive, or Terminated)

card_pin:
string

Encrypted pin for the card

preferences.allow_foreign_transactions:
boolean

Allow foreign transaction on card

preferences.daily_atm_withdrawal_limit:
integer

Max atm withdraw limit for debit card

preferences.daily_transaction_limit :
integer

Daily transaction limit for debit card

CARD PERMISSIONS

Set the following permissions to activate, deactivate or terminate a card number.

Status

ACTIVE

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

INACTIVE

Disables debit permissions on the node.

PENDING

Card is awaiting verification. No actions may be taken on this card while it is listed as pending.

TERMINATED

Disables the card number and blocks all transactions. This is used when an account is fraudulent.

EXAMPLE REQUEST

PATCH /v3.1/users/5bb29f48520da000a38cb107/nodes/5bb29f5471fd1b0091317410/subnets/5bc920f2fff373002bf0d51b
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

{
    "status": "ACTIVE",
    "preferences": {
      "allow_foreign_transactions":true,
      "daily_atm_withdrawal_limit":10,
      "daily_transaction_limit":1000
    }
}
node_id = '594e606212e17a002f2e3251'
subnet_id = '59c9f77cd412960028b99d2b'

body := {
    "status": "ACTIVE",
    "preferences": {
      "allow_foreign_transactions":true,
      "daily_atm_withdrawal_limit":10,
      "daily_transaction_limit":1000
    }
}

user.update_subnet(node_id, subnet_id, body)
const nodeID = '594e606212e17a002f2e3251';
const subnetID = '59c9f77cd412960028b99d2b';
const body = {
    "status": "ACTIVE",
    "preferences": {
      "allow_foreign_transactions":true,
      "daily_atm_withdrawal_limit":10,
      "daily_transaction_limit":1000
    }
};

user.updateSubnet(nodeID, subnetID, body);
node_id = '594e606212e17a002f2e3251'
subnet_id = '59c9f77cd412960028b99d2b'

body= {
    "status": "ACTIVE",
    "preferences": {
      "allow_foreign_transactions":true,
      "daily_atm_withdrawal_limit":10,
      "daily_transaction_limit":1000
    }
}

user.update_subnet(node_id: node_id, payload: body, subnter_id: subnet_id)
$preferences = (object)[
     "allow_foreign_transactions" => true,
     "daily_atm_withdrawal_limit" => 10,
     "daily_transaction_limit" => 1000
];
$body = (object)[
  "status" => "ACTIVE",
  "preferences" => $preferences
];

node_id = '594e606212e17a002f2e3251'
subnet_id = '59c9f77cd412960028b99d2b'


$user->update_subnet(node_id, subnet_id, $body);
nodeID := "59c9f6a66d7d8a002f71b191"
subnetID := "5bc920f2fff373002bf0d51b"
body := `{
    "status": "ACTIVE",
    "preferences": {
      "allow_foreign_transactions":true,
      "daily_atm_withdrawal_limit":10,
      "daily_transaction_limit":1000
    }
}`

data, err := user.UpdateSubnet(nodeID, subnetID, body)

EXAMPLE RESPONSE

{
    "_id": "5bc920f2fff373002bf0d51b",
    "_links": {
        "self": {
            "href": "https://uat-api.synapsefi.com/v3.1/users/5bb29f48520da000a38cb107/nodes/5bb29f5471fd1b0091317410/subnets/5bc920f2fff373002bf0d51b"
        }
    },
    "access_token": "5bc920f9a5061e002681c89f",
    "account_class": "DEBIT_CARD",
    "card_hash": "78eb685b26d99d32538feb97cfd1274f994bdde48fa75471f22ba3029cbbc4e0",
    "card_number": "5431",
    "card_style_id": null,
    "client": {
        "id": "5b0da0f66e990e001f0c5f54",
        "name": "YY Test Account"
    },
    "cvc": "***",
    "exp": "2022-11-17",
    "nickname": "My Debit Card",
    "node_id": "5bb29f5471fd1b0091317410",
    "preferences": {
        "allow_foreign_transactions": true,
        "daily_atm_withdrawal_limit": 10,
        "daily_transaction_limit": 1000
    },
    "status": "ACTIVE",
    "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-----

Padding

Please make sure you are using PKCS1_v1_5 padding for encryption.

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());

Activate/Deactivate/Terminate Card Number


Activate, Inactivate or Terminate a card number

Suggested Edits are limited on API Reference Pages

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