Add Bank Account
This API is invoked when the Customer adds his own bank account for the the purpose of withdrawing payment in them. The Customer can add a maximum of 2 bank accounts and choose in which bank account they want to withdraw the payment in.
Definition
URL
POST https://api-test.instarem.com:4803/api/v1/client/{clientId}/bankAccounts
Header Parameters:
| Parameter | Description | Type | Required |
|---|---|---|---|
| authorization | Authentication token. | String | Yes |
| content-type | The Content-Type entity header is used to indicate the media type of the resource. Expected values could be application/json or multipart/form-data. | String | Yes |
Path Parameters:
| Parameter | Description | Type | Required |
|---|---|---|---|
| clientId | This is the unique client ID generated by Nium. | String | Yes |
Example Request:
- Bash
- Javascript
- C#
curl --request post \\
--url "https://api-test.instarem.com:4803/api/v1/client/{clientId}/bankAccounts" \\
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTgxMzQ4OTQsImRhdGEiOnsic3ViIjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWE1IiwiY2xpZW50IjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWExIn0sImlhdCI6MTQ5ODA0ODQ5NH0.pevwSDpk-JDNtVIpqFu_m0Xu1UnDVumrAYStcrxf8sM' \\
--header 'content-type: application/json' \\
--data '{
"beneficiaryCountryCode": "SG",
"beneficiaryCurrencyCode": "SGD",
"bankName": "Citibank",
"accountType": "Company",
"accountNumber": "60001234569",
"routingCodeType1": "SWIFT",
"routingCodeValue1": "ADCBINBB123"
}'
var data = JSON.stringify({
"beneficiaryCountryCode": "SG",
"beneficiaryCurrencyCode": "SGD",
"bankName": "Citibank",
"accountType": "Individual",
"accountNumber": "60001234569",
"routingCodeType1": "ACH CODE",
"routingCodeValue1": "111000025",
"routingCodeType2": "SWIFT",
"routingCodeValue2": "ADCBINBB123"
});
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("post", "https://api-test.instarem.com:4803/api/v1/client/{clientId}/bankAccounts");
xhr.setRequestHeader("authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTgxMzQ4OTQsImRhdGEiOnsic3ViIjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWE1IiwiY2xpZW50IjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWExIn0sImlhdCI6MTQ5ODA0ODQ5NH0.pevwSDpk-JDNtVIpqFu_m0Xu1UnDVumrAYStcrxf8sM");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
var client = new RestClient("https://api-test.instarem.com:4803/api/v1/client/{clientId}/bankAccounts");
var request = new RestRequest(Method.POST);
request.AddHeader("authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTgxMzQ4OTQsImRhdGEiOnsic3ViIjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWE1IiwiY2xpZW50IjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWExIn0sImlhdCI6MTQ5ODA0ODQ5NH0.pevwSDpk-JDNtVIpqFu_m0Xu1UnDVumrAYStcrxf8sM");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", @"{
""beneficiaryCountryCode"": ""SG"",
""beneficiaryCurrencyCode"": ""SGD"",
""bankName"": ""Citibank"",
""accountType"": ""Individual"",
""accountNumber"": ""60001234569"",
""routingCodeType1"": ""ACH CODE"",
""routingCodeValue1"": ""111000025"",
""routingCodeType2"": ""SWIFT"",
""routingCodeValue2"": ""ADCBINBB123""
}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Body Parameters:
| Parameter | Description | Type | Required |
|---|---|---|---|
| countryCode | Clients bank country code If the bank account is a Singapore bank account then the value would be SG.(Deprecated- instead use beneficiaryCountryCode ) | String | No |
| currencyCode | Clients bank currency code.(Deprecated- instead use beneficiaryCurrencyCode) | String | No |
| beneficiaryCountryCode | Clients bank country code If the bank account is a Singapore bank account then the value would be SG. | String | Yes |
| beneficiaryCurrencyCode | Clients bank currency code. | String | Yes |
| bankName | Clients bank name. | String | Yes |
| accountType | Account type of client either Individual or Company. | String | Yes |
| accountNumber | Client/Beneficiary physical bank account number. | String | Yes |
| routingCodeType1 | Routing codeType1 of bank like SWIFT,IFSC , SORT CODE, ACH CODE, BSB CODE, BANK CODE. | String | Yes |
| routingCodeValue1 | Value of routingCodeType1. | String | Yes |
| routingCodeType2 | Routing codeType2 of bank like SWIFT,IFSC , SORT CODE, ACH CODE, BSB CODE, BANK CODE. | String | No |
| routingCodeValue2 | Value of routingCodeType2. | String | No |
Response:
{
"accountId": "03bd58a0-f726-11ea-ab6c-414e561364fe",
"currencyCode": "SGD"
}
Response Parameters:
| Parameter | Description | Type |
|---|---|---|
| accountId | Unique bank account id generated by Nium. | String |
| currencyCode | Clients bank currency code | String |