Add Payer
This is Company or an Individual who is sending money to the Virtual receiving accounts, which the client needs to add in the system before they start accepting payments from them.
Definition
URL
POST https://api-test.instarem.com:4803/api/v1/client/{clientId}/payer
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}/payer" \\
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTgxMzQ4OTQsImRhdGEiOnsic3ViIjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWE1IiwiY2xpZW50IjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWExIn0sImlhdCI6MTQ5ODA0ODQ5NH0.pevwSDpk-JDNtVIpqFu_m0Xu1UnDVumrAYStcrxf8sM' \\
--header 'content-type: application/json' \\
--data '{
"payerName": "John Doe",
"payerType": "COMPANY",
"companyName": "Instarem India Pvt Ltd",
"website": "https://www.instarem.com",
"email": "john.doe@instarem.com",
"countryCode": "US",
"virtualReceivingAccountType": [
{
"currencyCode": "USD",
"label": "GLOBAL"
},
{
"currencyCode": "GBP",
"label": "LOCAL"
}
]
}'
var data = JSON.stringify({
"payerType": "COMPANY",
"companyName": "Nium India Pvt Ltd",
"website": "https://www.nium.com",
"payerName": "John Doe",
"email": "john.doe@nium.com",
"countryCode": "US",
"virtualReceivingAccountType": [
{
"currencyCode": "USD",
"label": "GLOBAL"
},
{
"currencyCode": "GBP",
"label": "LOCAL"
}
]
});
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}/payer");
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}/payer");
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", @"{
""payerType"": ""COMPANY"",
""companyName"": ""Nium India Pvt Ltd"",
""website"": ""https://www.nium.com"",
""payerName"": ""John Doe"",
""email"": ""john.doe@nium.com"",
""countryCode"": ""US"",
""virtualReceivingAccountType"": [
{
""currencyCode"": ""USD"",
""label"": ""GLOBAL""
},
{
""currencyCode"": ""GBP"",
""label"": ""LOCAL""
}
]
}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Body Parameters:
Parameter | Description | Type | Required |
---|---|---|---|
payerType | This field defines the type of payer and the value for this could be Individual or Company. | String | Yes |
companyName | This is name of the payer company is applicable when the Payer type is Company. | String | No |
website | This is the business website of the payer company or individual. | String | No |
payerName | This is the Name of an individual when the Payer type is Individual and name of the contact person if the Payer type is Company. | String | Yes |
Email ID of a payer who will be notified about the payment request. | String | Yes | |
countryCode | Country code. | String | Yes |
virtualReceivingAccountType[n].currencyCode | The currency for virtual receiving account used for VRA allocation. Must be required if client is per payer virtual account approach | String | conditional |
virtualReceivingAccountType[n].label | The type for virtual receiving account used for VRA allocation. Must be required if client is per payer virtual account approach and value for this could be LOCAL or GLOBAL or LOCAL,GLOBAL . | String | conditional |
Example Response:
{
"payerId": "ea81eccc-540a-4ce1-8871-ec22ded7ed64",
"receivingAccounts": [
{
"currencyCode": "GBP",
"label": "LOCAL",
"virtualAccount": {
"virtualReceivingAccountId": null,
"virtualReceivingAccount": null,
"bankAccountName": null,
"bankName": null,
"bankAddress": null,
"bankRoutingDetails": null,
"virtualReceivingAccountRequestId": "14011627389003398",
"accountNumber": "170561429342"
},
"status": "REQUESTED",
"message": "Your request for new account is already been initiated"
},
{
"currencyCode": "USD",
"label": "GLOBAL",
"virtualAccount": {
"virtualReceivingAccountId": "9dee24ee-998d-4dbf-a651-1e47b41660a1",
"virtualReceivingAccount": "9109",
"bankAccountName": "NIUM PTE LTD",
"bankName": "CITIBANK NA",
"bankAddress": "CITIBANK NA",
"bankRoutingDetails": {
"routing_code_1": "ABA",
"routing_value_1": "036073151",
"routing_code_2": "SWIFT",
"routing_value_2": "SBI12345"
},
"virtualReceivingAccountRequestId": null,
"accountNumber": "125629574831"
},
"status": "COMPLETED",
"message": "VRA allocated successfully"
}
]
}
Response Parameters:
Parameter | Description | Type |
---|---|---|
payerId | Unique payer ID. | String |
receivingAccounts[n].currencyCode | The currency for virtual receiving account | String |
receivingAccounts[n].label | The type for virtual receiving account used for VRA allocation and value for this could be LOCAL or GLOBAL or LOCAL,GLOBAL | String |
receivingAccounts[n].virtualAccount.virtualReceivingAccountId | Unique identifier number of virtual receiving account generated by Nium | String |
receivingAccounts[n].virtualAccount.virtualReceivingAccount | Virtual receiving account number | String |
receivingAccounts[n].virtualAccount.bankAccountName | Beneficiary name | String |
receivingAccounts[n].virtualAccount.bankName | Beneficiary bank name | String |
receivingAccounts[n].virtualAccount.bankAddress | Beneficiary bank address | String |
receivingAccounts[n].virtualAccount.bankRoutingDetails.routing_code_1 | Routing code 1 (eg IFSC for India, SORT CODE for UK, ABA CODE for USA, BIC CODE for Europe). | String |
receivingAccounts[n].virtualAccount.bankRoutingDetails.routing_value_1 | IFSC Code of the bank (eg SBIN0000058 for IFSC, 259087 for SORT CODE, 111000025 for ABA CODE, LIABLT20001 for BIC CODE). | String |
receivingAccounts[n].virtualAccount.bankRoutingDetails.routing_code_2 | Routing code 1 (eg IFSC for India, SORT CODE for UK, ABA CODE for USA, BIC CODE for Europe). | String |
receivingAccounts[n].virtualAccount.bankRoutingDetails.routing_value_2 | IFSC Code of the bank (eg SBIN0000058 for IFSC, 259087 for SORT CODE, 111000025 for ABA CODE, LIABLT20001 for BIC CODE). | String |
receivingAccounts[n].virtualAccount.virtualReceivingAccountRequestId | Generated request id for virtual account request against currency: EUR, GBP, AUD | String |
receivingAccounts[n].virtualAccount.accountNumber | Returns 12 digit account number generated by Nium | String |
receivingAccounts[n].status | Virtual receiving account request status. | String |
receivingAccounts[n].message | Message of virtual receiving account request. | String |