Tutorial: Block, Unblock, Hold, Release Amount for Accounts
API References for Endpoints in this tutorial:
Tutorial: Blocking an Account
In this scenario, we will explore how to block a deposit account using the MBanq Cloud API. Blocking an account involves locking or putting a hold on the account, preventing various types of credit and debit transactions. It is a useful feature for client management, risk monitoring, fraud prevention, and regulatory compliance.
There are situations where it becomes necessary to flag or put a hold on an account. This feature provides the ability to lock or hold an account for informational/notification purposes, blocking transactions, or restricting account activities. It is essential for general client management, risk monitoring, fraud prevention, and compliance with accounting, KYC/AML, and regulatory requirements.
Blocking an account serves various purposes, such as blacklisting a client, flagging dormant or inactive accounts, identifying suspicious activities like illegal entries or fraud, guaranteeing loans, enforcing compulsory savings, holding an account for passbook loss, handling the death of an account holder, managing inactive/dormant accounts and escheatment rules, responding to emergencies or natural disasters, facilitating the transfer or acquisition of portfolios, and locking accounts in case of arrears or financial distress.
The ability to flag or block an account can have different intended results. It can be used for informational and notification purposes, or it can restrict transactions and place funds on hold.
Now, let's proceed with the step-by-step tutorial on how to block a deposit account using the MBanq Cloud API.
Step 1: Make the API Request
To block a deposit account, send a POST request to the following endpoint:
POST https://api.cloud.mbanq.com/v1/savingsaccounts/{savingsId}?command=block
Replace {savingsId}
with the ID of the savings account you want to block. Here is an example request using cURL:
curl -X POST https://api.cloud.mbanq.com/v1/savingsaccounts/1?command=block \
-H 'Content-Type: application/json' \
-d '{
"reason": "block reason"
}'
Parameter | Value Type | Example Value | Explanation |
---|---|---|---|
savingsId | Number | 1 | The ID of the savings account to be blocked |
reason | String | "block reason" | The reason for blocking the account |
Step 2: Receive the API Response
If the request was successful, you will receive a JSON response with the updated account information. Here is an example response:
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"subStatus": {
"id": 400,
"code": "SavingsAccountSubStatusEnum.block",
"value": "Block",
"none": false,
"inactive": false,
"dormant": false,
"escheat": false,
"block": true,
"blockCredit": false,
"blockDebit": false
}
}
}
Parameter | Value Type | Example Value | Explanation |
---|---|---|---|
officeId | Number | 1 | The ID of the office where the account belongs |
clientId | Number | 1 | The ID of the client associated with the account |
savingsId | Number | 1 | The ID of the blocked savings account |
resourceId | Number | 1 | The resource ID of the blocked savings account |
changes | Object | See below example | Information about the changes made to the account |
subStatus | Object | See below example | Substatus details of the savings account after being blocked |
id | Number | 400 | The ID of the substatus indicating the account is blocked |
code | String | "SavingsAccountSubStatusEnum.block" | The code representing the substatus of a blocked account |
value | String | "Block" | The value representing the substatus of a blocked account |
none | Boolean | false | Indicates if the substatus is "none" |
inactive | Boolean | false | Indicates if the substatus is "inactive" |
dormant | Boolean | false | Indicates if the substatus is "dormant" |
escheat | Boolean | false | Indicates if the substatus is "escheat" |
block | Boolean | true | Indicates if the substatus is "block" |
blockCredit | Boolean | false | Indicates if the account is blocked for credit transactions (true or false) |
blockDebit | Boolean | false | Indicates if the account is blocked for debit transactions (true or false |
Updated 9 months ago