Manage Deposit Account

Freeze Deposit Account

To freeze a deposit account created on Anchor, send a POST request to /accounts/{accountId}/freeze with the required parameters.

MethodEndpoint
POST{{baseUrl}}/api/v1/accounts/{accountId}/freeze

Here is a sample request payload:

curl --request POST \
     --url https://api.sandbox.getanchor.co/api/v1/accounts/17145771745590-anc_acc/freeze \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-anchor-key: <API Key>' \
     --data '
{
  "data": {
   "type": "DepositAccount",
    "attributes": {
      "freezeReason": "FRAUD",
      "freezeDescription": "Fraudulent transactions"
    }
  }
}
'
{
  "data": {
    "id": "17145771745590-anc_acc",
    "type": "DepositAccount",
    "attributes": {
      "createdAt": "2024-05-01T15:26:15",
      "bank": {
        "id": "16565854883910-anc_bk",
        "name": "CORESTEP MICROFINANCE BANK",
        "cbnCode": "",
        "nipCode": "090365"
      },
      "metadata": {},
      "freezeReason": "FRAUD",
      "accountName": "Frank Frank",
      "frozen": true,
      "frozenBy": "CUSTOMER",
      "currency": "NGN",
      "accountNumber": "******5077",
      "type": "SAVINGS",
      "freezeDescription": "Fraudulent transactions",
      "status": "ACTIVE"
    },
    "relationships": {
      "virtualNubans": {
        "data": [
          {
            "id": "17145771747610-anc_va",
            "type": "VirtualNuban"
          }
        ]
      },
      "customer": {
        "data": {
          "id": "169558360676414-anc_ind_cst",
          "type": "IndividualCustomer"
        }
      }
    }
  }
}

Unfreeze Deposit Account

To unfreeze a deposit account, make a POST request to /accounts/unfreeze endpoint and pass the deposit account id in the body of the payload.

MethodEndpoint
POST{{baseUrl}}/api/v1/accounts/unfreeze

Below is a sample payload:

curl --location 'https://api.sandbox.getanchor.co/api/v1/accounts/unfreeze' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-anchor-key: <API Key>' \
--data '{
    "data": {
        "id": "172286425432341-anc_acc",
        "type": "DepositAccount",
        "attributes": {}
    }
}'
{
    "data": {
        "id": "17145771745590-anc_acc",
        "type": "DepositAccount",
        "attributes": {
            "createdAt": "2024-05-01T15:26:15",
            "bank": {
                "id": "16565854883910-anc_bk",
                "name": "CORESTEP MICROFINANCE BANK",
                "cbnCode": "",
                "nipCode": "090365"
            },
            "metadata": {},
            "accountName": "Frank Frank",
            "frozen": false,
            "frozenBy": "CUSTOMER",
            "currency": "NGN",
            "accountNumber": "******5077",
            "type": "SAVINGS",
            "status": "ACTIVE"
        },
        "relationships": {
            "virtualNubans": {
                "data": [
                    {
                        "id": "17145771747610-anc_va",
                        "type": "VirtualNuban"
                    }
                ]
            },
            "customer": {
                "data": {
                    "id": "169558360676414-anc_ind_cst",
                    "type": "IndividualCustomer"
                }
            }
        }
    }
}

Update Deposit Account

You can use the endpoint /api/v1/accounts/{accountId} to update a deposit account’s metadata and/or move an deposit account from one product to another product. e.g from OPS Account to CURRENT account.

Method:

MethodEndpoint
PATCH{{baseUrl}}/api/v1/accounts/{accountId}