Create Payment Request
This is a request for payment generated by the client sent to the Payer requesting payments for a particular PO/invoice in certain currency virtual receiving account.
Definition
URL
POST https://api-test.instarem.com:4803/api/v1/client/{clientId}/payer/{payerId}/paymentRequest
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 multipart/form-data. | String | Yes |
Path Parameters:
Parameter | Description | Type | Required |
---|---|---|---|
clientId | This is the unique client ID generated by Nium. | String | Yes |
payerId | This is the unique payer 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/{payerId}/paymentRequest" \\
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTgxMzQ4OTQsImRhdGEiOnsic3ViIjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWE1IiwiY2xpZW50IjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWExIn0sImlhdCI6MTQ5ODA0ODQ5NH0.pevwSDpk-JDNtVIpqFu_m0Xu1UnDVumrAYStcrxf8sM' \\
--header 'content-type: multipart/form-data' \\
--form "clientId=593feb7c5g32bb2357b2df6c" \\
--form "payerId=ee0f344e-bbc7-4f33-a366-39386584cb30" \\
--form "amount=1000.12" \\
--form "description=Payment Request for Goods sent on 02/12/2020" \\
--form "dueDate=2021-01-10" \\
--form "terms=NET30" \\
--form "paymentReferenceNumber=CL123456" \\
--form "currencyCode=EUR" \\
--form "label=LOCAL" \\
--form "sendEmail=true" \\
--form "payReqDocs="
var data = new FormData();
data.append("clientId", "593feb7c5g32bb2357b2df6c");
data.append("payerId", "eb69f945-f507-4767-97da-03ef4fc55dce");
data.append("amount", "1000.12");
data.append("description", "Payment Request from API");
data.append("dueDate", "2019-11-10");
data.append("terms", "NET30");
data.append("paymentReferenceNumber", "PR200");
data.append("currencyCode", "EUR");
data.append("label", "LOCAL");
data.append("sendEmail", "true");
data.append("payReqDocs", "");
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api-test.instarem.com:4803/api/v1/client/{clientId}/payer/{payerId}/paymentRequest");
xhr.setRequestHeader("authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTgxMzQ4OTQsImRhdGEiOnsic3ViIjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWE1IiwiY2xpZW50IjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWExIn0sImlhdCI6MTQ5ODA0ODQ5NH0.pevwSDpk-JDNtVIpqFu_m0Xu1UnDVumrAYStcrxf8sM");
xhr.setRequestHeader("content-type", "multipart/form-data");
xhr.send(data);
var client = new RestClient("https://api-test.instarem.com:4803/api/v1/client/{clientId}/payer/{payerId}/paymentRequest");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTgxMzQ4OTQsImRhdGEiOnsic3ViIjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWE1IiwiY2xpZW50IjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWExIn0sImlhdCI6MTQ5ODA0ODQ5NH0.pevwSDpk-JDNtVIpqFu_m0Xu1UnDVumrAYStcrxf8sM");
request.AddHeader("content-type", "multipart/form-data");
request.AlwaysMultipartFormData = true;
request.AddParameter("clientId", "593feb7c5g32bb2357b2df6c");
request.AddParameter("payerId", "eb69f945-f507-4767-97da-03ef4fc55dce");
request.AddParameter("amount", "1000.12");
request.AddParameter("description", "Payment Request from API");
request.AddParameter("dueDate", "2019-11-10");
request.AddParameter("terms", "NET30");
request.AddParameter("paymentReferenceNumber", "PR200");
request.AddParameter("currencyCode", "EUR");
request.AddParameter("label", "LOCAL");
request.AddParameter("sendEmail", "true");
request.AddParameter("payReqDocs", "");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Body Parameters:
Parameter | Description | Type | Required |
---|---|---|---|
clientId | Unique id generated for Client. | String | No |
payerId | Unique id generated for Payer. | String | No |
amount | This is the payment amount that is being requested from the Payer. | Number | Yes |
description | Description of the payment being requested. This parameter is mandatory if currencyCode is INR. | String | No |
dueDate | This field is date before which the invoice has to be paid/payment is to be made by the Payer. | String | No |
terms | Invoice payment terms outline how, when, and by what method a customer/Payer remits payment to a seller. | String | No |
paymentReferenceNumber | Unique Reference Number that is being requested from the Payer. This parameter is mandatory if currencyCode is INR. | String | No |
currencyCode | Code of the currency in which the payment is being requested in. Example: CurrencyCode will be USD if the invoice currency is USD and payment is being requested in USD virtual receiving account. | String | Yes |
label | The type for virtual receiving account used for payment request and value for this could be LOCAL or GLOBAL or LOCAL,GLOBAL. For SGD currency, label should be LOCAL,GLOBAL | String | Yes |
sendEmail | Boolean flag to send or not send email notification to the PAYER | Boolean | No |
payReqDocs | These documents could be invoice copy, PO copy, shipment notice copy for the Payers reference. | File | No |
Response:
{
"paymentRequestId": "PR100799",
"virtualAccount": "9675538230127460",
"bankAccountName": "Instarem India",
"bankName": "DBS Hong Kong",
"bankAddress": "Hong Kong",
"bankRoutingDetails": {
"routing_code_1": "IFSC CODE",
"routing_value_1": "SBIN0000058",
"routing_code_2": "IFSC CODE",
"routing_value_2": "259087"
}
}
Response Parameters:
Parameter | Description | Type |
---|---|---|
paymentRequestId | Unique payment request ID. | String |
virtualAccount | Unique virtual account number. | String |
bankAccountName | Beneficiary Name. | String |
bankName | Bank Name. | String |
bankAddress | Address of the bank. | String |
bankRoutingDetails.routing_code_1 | Routing code type 1 (eg IFSC for India, SORT CODE for UK, ABA CODE for USA, BIC CODE for Europe) | String |
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 |
bankRoutingDetails.routing_code_2 | Routing code type 2 (eg IFSC for India, SORT CODE for UK, ABA CODE for USA, BIC CODE for Europe) | String |
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 |