Track Payment Request
Track payment request API helps you to track the realtime status of the payment. Payment requests can be tracked basis payment request ID or status of the payment:
Definition
URL
GET 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 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 |
payerId | This is the unique payer ID generated by Nium. | String | Yes |
Query Parameters:
Parameter | Description | Type | Required |
---|---|---|---|
fromDate | Defines the start date of the date range for which the payment requests are to be track. | String | No |
toDate | Defines the end date of the date range for which the payment requests are to be track. | String | No |
start | Starting page value. | Number | No |
count | Offset count. | Number | No |
currencyCode | Code of the currency for which the payment requests are to be tracked for. | String | No |
prId | Unique ID created per payment request creation | String | No |
paymentReferenceNumber | Payment Reference Number - order number provided by the client | String | No |
Example Request:
- Bash
- Javascript
- C#
curl --request get \\
--url "https://api-test.instarem.com:4803/api/v1/client/{clientId}/payer/{payerId}/paymentRequest?fromDate=&toDate=&start=&count=¤cyCode=&prId=&paymentReferenceNumber=" \\
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTgxMzQ4OTQsImRhdGEiOnsic3ViIjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWE1IiwiY2xpZW50IjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWExIn0sImlhdCI6MTQ5ODA0ODQ5NH0.pevwSDpk-JDNtVIpqFu_m0Xu1UnDVumrAYStcrxf8sM' \\
--header 'content-type: application/json'
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("get", "https://api-test.instarem.com:4803/api/v1/client/{clientId}/payer/{payerId}/paymentRequest?fromDate=&toDate=&start=&count=¤cyCode=&prId=&paymentReferenceNumber=");
xhr.setRequestHeader("authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTgxMzQ4OTQsImRhdGEiOnsic3ViIjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWE1IiwiY2xpZW50IjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWExIn0sImlhdCI6MTQ5ODA0ODQ5NH0.pevwSDpk-JDNtVIpqFu_m0Xu1UnDVumrAYStcrxf8sM");
xhr.setRequestHeader("content-type", "application/json");
xhr.send();
var client = new RestClient("https://api-test.instarem.com:4803/api/v1/client/{clientId}/payer/{payerId}/paymentRequest?fromDate=&toDate=&start=&count=¤cyCode=&prId=&paymentReferenceNumber=");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTgxMzQ4OTQsImRhdGEiOnsic3ViIjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWE1IiwiY2xpZW50IjoiNTk0MjNmMzZjZWEyMTQ2OTI2ODczOWExIn0sImlhdCI6MTQ5ODA0ODQ5NH0.pevwSDpk-JDNtVIpqFu_m0Xu1UnDVumrAYStcrxf8sM");
request.AddHeader("content-type", "application/json");
IRestResponse response = client.Execute(request);
Response:
{
"filteredRecords": [
{
"paymentRequestId": "PR100799",
"amount": 1000.12,
"description": "Payment Request for Goods sent on 02/12/2020",
"dueDate": "2021-01-10",
"paymentReferenceNumber": "CL123456",
"paymentTerms": "NET30",
"prId": "PR100799",
"status": "PENDING",
"payer": {
"payerId": "ee0f344e-bbc7-4f33-a366-39386584cb30",
"payerCompanyName": "Instarem India Pvt Ltd",
"payerCompanyWebsite": "https://www.instarem.com",
"payerName": "John Doe",
"payerEmailId": "john.doe@nium.com",
"payerType": "COMPANY"
},
"currency": {
"currencySymbol": "$",
"currencyCode": "USD"
},
"transactionId": "32696a9a-a376-4687-87b0-443231a29dde",
"createdAt": "2020-12-14T06:30:05.443Z",
"updatedAt": "2020-12-14T06:30:05.443Z"
},
{
"paymentRequestId": "PR001089",
"amount": 111,
"description": "Payment Request from API",
"dueDate": "2021-12-12",
"paymentReferenceNumber": "35456667734",
"paymentTerms": "bank transfer",
"prId": "PR001089",
"status": "PAID",
"payer": {
"payerId": "506f2024-6735-4558-94aa-2a0143b9586b",
"payerName": "tata",
"payerEmailId": "ma@nium.com",
"payerType": "COMPANY",
"payerCompanyName": "UniInstarem India Pvt Ltdque",
"payerCompanyWebsite": "manu.com"
},
"currency": {
"currencySymbol": "$",
"currencyCode": "USD"
},
"transactionId": "b0a01cd7-23be-47bc-a86c-265f32715a01",
"createdAt": "2021-10-12T12:48:44.601Z",
"updatedAt": "2021-10-12T12:48:44.601Z"
}
],
"totalRecords": 1
}
Response Parameters:
Parameter | Description | Type |
---|---|---|
filteredRecords[n].paymentRequestId | Payment Request identifier, Unique ID created per payment request creation | String |
filteredRecords[n].amount | Requested amount. | Number |
filteredRecords[n].description | Requested payment description. | String |
filteredRecords[n].dueDate | Due date in YYYY-MM-DD format. | String |
filteredRecords[n].paymentTerms | Terms specify the period allowed to a payer to pay off the amount requested. This is an optional field. | String |
filteredRecords[n].paymentReferenceNumber | Payment Reference Number order number. This is an optional field. | String |
filteredRecords[n].prId | Unique ID created per payment request creation.(DEPRECATED) | String |
filteredRecords[n].status | The status of the payment | String |
filteredRecords[n].payer.payerId | Unique payer ID. This is an optional field. | String |
filteredRecords[n].payer.payerCompanyName | Payers company name. | String |
filteredRecords[n].payer.payerCompanyWebsite | Website link. | String |
filteredRecords[n].payer.payerName | Name of the payer. | String |
filteredRecords[n].payer.payerEmailId | Email Id of the payer. | String |
filteredRecords[n].payer.payerType | Type of the payer. | String |
filteredRecords[n].currency.currencySymbol | Currency symbol. | String |
filteredRecords[n].currency.currencyCode | Currency code. | String |
filteredRecords[n].transactionId | Transaction Id will be labeled after successful reconciliation of payment received against this payment request else the value will be null. | String |
filteredRecords[n].createdAt | Created date and time of the payment request. | String |
filteredRecords[n].updatedAt | Last updated date and time of the payment request. | String |
totalRecords | Payment request count. | Number |