Add Customer - Business
'AddCustomer-Business' API enables to add business customer
Business Customer - A Fintech or any registered business entity that is onboarded as customer is recognised as a business customer
Bank or financial institution can add a new business customer in their ledger by using this API. On providing the business customer details as request, the customer is added to the ledger with the generation of unique customer ID and the status becomes active.
note
Refer Add Share holder API to add shareholders of business customer Refer Add Legal Representative API to add users who are responsible for operating the account
Method: POST
{{URL}}/jsonrpc
Example
Request Parameters
Parameter | Description |
---|---|
method | String The API method being invoked. Sample Value: "CustomerService.AddCustomer" |
id | String Unique identifier for the request. Used for tracking. Sample Value: "1" |
params | Object |
api | Object |
signature Mandatory | String Sign the request payload (params.payload) using private key. Sample Value: "MEQCIAbpxHpdOyBEVlmxPYv7m4Z1OvWJJYw7g7u3GE3T9nmvAiBjKHckSvb1M6O4t7FeWsn2z9Y3dMeYn3HyX/k28ek/Dw==" |
keyId | String Key ID is provided at the time of device registration. Sample Value: "348076" |
credential Mandatory | String Basic (space) [( "<Username>:<apiKey>" ) as Base64 encoded value] to be provided Sample Value: "Basic bmF2eWEubitlbXBAbmV0eGQuY29tOmY1OWIwY2NlOTU4ZTQ1YTc4MGVhZWIzYWVjOWVjZDAx" |
payload | Object |
type | String Type of customer. Allowed values: "BUSINESS", "INDIVIDUAL". Sample Value: "BUSINESS" |
businessNameLegal | String Legal name of the business. Sample Value: "SMALLSYS INC" |
dateEstablished | String Business establishment date in YYYYMMDD format. Sample Value: "20200714" |
identification | Object |
type | String Type of identification document. Sample Value: "TIN" |
value | String Value of the identification document. Sample Value: "764960722" |
contact | Object |
phoneNumber | String Contact phone number. Sample Value: "4810201421" |
String Contact email address. Sample Value: "daves@bank.com" | |
address | Object |
addressLine1 | String Address line 1. Sample Value: "795 E DRAGRAM" |
city | String City of the address. Sample Value: "TUCSON" |
state | String State or province. Sample Value: "AZ" |
country | String Country code in ISO 3166-1 alpha-2 format. Sample Value: "US" |
zip | String ZIP or postal code. Sample Value: "85705" |
kycStatus | String Status of the KYC (Know Your Customer) process. Sample Value: "ACTIVE" |
kycData | Object |
applicationId | String Identifier of the KYC application. Sample Value: "KYC_00002990750" |
refId | String KYC reference ID. Sample Value: "2371226d-a6c2-4358-9250-157e80be05c8" |
additionalkycinfo | Object Additional KYC information (if any). Sample Value: {} |
- cURL
- C#
- Go
- NodeJS
curl --location --globoff '{{URL}}/jsonrpc' \
--header 'Content-Type: application/json' \
--data-raw '{"method":"CustomerService.AddCustomer","id":"1","params":{"api":{"signature":"{{signature}}","keyId":"{{ApplicationKeyId}}","credential":"{{Credential}}"},"payload":{"type":"BUSINESS","businessNameLegal":"SMALLSYS INC","dateEstablished":"20200714","identification":[{"type":"TIN","value":"764960722"}],"contact":{"phoneNumber":"4810201421","email":"daves@bank.com"},"address":{"addressLine1":"795 E DRAGRAM","city":"TUCSON","state":"AZ","country":"US","zip":"85705"},"kycStatus":"ACTIVE","kycData":{"applicationId":"KYC_00002990750","refId":"2371226d-a6c2-4358-9250-157e80be05c8","additionalkycinfo":{}}}}}'
var options = new RestClientOptions("{{URL}}/jsonrpc")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Post);
request.AddHeader("Content-Type", "application/json");
var body = @"{" + "\n" +
@" ""method"": ""CustomerService.AddCustomer""," + "\n" +
@" ""id"": ""1""," + "\n" +
@" ""params"": {" + "\n" +
@" ""api"": {" + "\n" +
@" ""signature"": ""{{signature}}""," + "\n" +
@" ""keyId"": ""{{ApplicationKeyId}}""," + "\n" +
@" ""credential"": ""{{Credential}}""" + "\n" +
@" }," + "\n" +
@" ""payload"": {" + "\n" +
@" ""type"": ""BUSINESS""," + "\n" +
@" ""businessNameLegal"": ""SMALLSYS INC""," + "\n" +
@" ""dateEstablished"": ""20200714""," + "\n" +
@" ""identification"": [" + "\n" +
@" {" + "\n" +
@" ""type"": ""TIN""," + "\n" +
@" ""value"": ""764960722""" + "\n" +
@" }" + "\n" +
@" ]," + "\n" +
@" ""contact"": {" + "\n" +
@" ""phoneNumber"": ""4810201421""," + "\n" +
@" ""email"": ""daves@bank.com""" + "\n" +
@" }," + "\n" +
@" ""address"": {" + "\n" +
@" ""addressLine1"": ""795 E DRAGRAM""," + "\n" +
@" ""city"": ""TUCSON""," + "\n" +
@" ""state"": ""AZ""," + "\n" +
@" ""country"": ""US""," + "\n" +
@" ""zip"": ""85705""" + "\n" +
@" }," + "\n" +
@" ""kycStatus"": ""ACTIVE""," + "\n" +
@" ""kycData"": {" + "\n" +
@" ""applicationId"": ""KYC_00002990750""," + "\n" +
@" ""refId"": ""2371226d-a6c2-4358-9250-157e80be05c8""," + "\n" +
@" ""additionalkycinfo"": {}" + "\n" +
@" }" + "\n" +
@" }" + "\n" +
@" }" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{URL}}/jsonrpc"
method := "POST"
payload := strings.NewReader(`{
"method": "CustomerService.AddCustomer",
"id": "1",
"params": {
"api": {
"signature": "{{signature}}",
"keyId": "{{ApplicationKeyId}}",
"credential": "{{Credential}}"
},
"payload": {
"type": "BUSINESS",
"businessNameLegal": "SMALLSYS INC",
"dateEstablished": "20200714",
"identification": [
{
"type": "TIN",
"value": "764960722"
}
],
"contact": {
"phoneNumber": "4810201421",
"email": "daves@bank.com"
},
"address": {
"addressLine1": "795 E DRAGRAM",
"city": "TUCSON",
"state": "AZ",
"country": "US",
"zip": "85705"
},
"kycStatus": "ACTIVE",
"kycData": {
"applicationId": "KYC_00002990750",
"refId": "2371226d-a6c2-4358-9250-157e80be05c8",
"additionalkycinfo": {}
}
}
}
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': '{{URL}}',
'path': '/jsonrpc',
'headers': {
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"method": "CustomerService.AddCustomer",
"id": "1",
"params": {
"api": {
"signature": "{{signature}}",
"keyId": "{{ApplicationKeyId}}",
"credential": "{{Credential}}"
},
"payload": {
"type": "BUSINESS",
"businessNameLegal": "SMALLSYS INC",
"dateEstablished": "20200714",
"identification": [
{
"type": "TIN",
"value": "764960722"
}
],
"contact": {
"phoneNumber": "4810201421",
"email": "daves@bank.com"
},
"address": {
"addressLine1": "795 E DRAGRAM",
"city": "TUCSON",
"state": "AZ",
"country": "US",
"zip": "85705"
},
"kycStatus": "ACTIVE",
"kycData": {
"applicationId": "KYC_00002990750",
"refId": "2371226d-a6c2-4358-9250-157e80be05c8",
"additionalkycinfo": {}
}
}
}
});
req.write(postData);
req.end();
Body
{
"method": "CustomerService.AddCustomer",
"id": "1",
"params": {
"api": {
"signature": "{{signature}}",
"keyId": "{{ApplicationKeyId}}",
"credential": "{{Credential}}"
},
"payload": {
"type": "BUSINESS",
"businessNameLegal": "SMALLSYS INC",
"dateEstablished": "20200714",
"identification": [
{
"type": "TIN",
"value": "764960722"
}
],
"contact": {
"phoneNumber": "4810201421",
"email": "daves@bank.com"
},
"address": {
"addressLine1": "795 E DRAGRAM",
"city": "TUCSON",
"state": "AZ",
"country": "US",
"zip": "85705"
},
"kycStatus": "ACTIVE",
"kycData": {
"applicationId": "KYC_00002990750",
"refId": "2371226d-a6c2-4358-9250-157e80be05c8",
"additionalkycinfo": {}
}
}
}
}
Response: 200
Request Parameters
Parameter | Description |
---|---|
id | String Echoed request identifier. Used to match the response to the original request. Sample Value: "1" |
result | Object |
Id | String Unique identifier of the customer created. Sample Value: "EPL01100000000011008" |
CustomerNumber | String Customer number assigned by the system. Usually the same as Id. Sample Value: "EPL01100000000011008" |
Status | String Current status of the customer. Sample Value: "ACTIVE" |
TenantId | String Identifier of the tenant or organization to which the customer belongs. Sample Value: "OID0000001001" |
jsonrpc | String JSON-RPC protocol version. Sample Value: "2.0" |
{
"id": "1",
"result": {
"Id": "EPL01100000000011008",
"CustomerNumber": "EPL01100000000011008",
"Status": "ACTIVE",
"TenantId": "OID0000001001"
},
"jsonrpc": "2.0"
}