Get Card Info Widget URL
Retrieve Card Widget Url
Definition
URL
POST https://api-test.instarem.com:4803/api/v1/cardInfoWidgetURL
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 value is application/json. | String | Yes |
X-CLIENT-ID | Unique id for client generated by Nium, Required only in case of partner based model (E.g. 593feb7c7c52bb2357b2df6c). | String | No |
Example Request
- Bash
- Javascript
- C#
curl --location --request POST 'https://api-test.instarem.com:4803/api/v1/cardInfoWidgetURL' \\
--header 'Accept: application/json' \\
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MTY4MjM3NTQsImRhdGEiOnsiY2xpZW50IjoiNTkzZmViN2M3YzUyYmIyMzU3YjJkZjZjIiwiY3JlZElkIjoiNWZmODMyNWJiNGM4NDAwMDcxNDJmNjJmIiwic3ViIjoiNTkzZmViZjc3YzUyYmIyMzU3YjJkZjcxIn0sImlhdCI6MTYxNjczNzM1NH0.efTJPiajRc5f55SDihqsS1FwOBOs2rwszkx1ZzOAepQ' \\
--header 'Content-Type: application/json' \\
--data-raw '{
"service_name": "VISA",
"type": 4
}'
var data = JSON.stringify({
"service_name": "VISA",
"type": 4
});
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/cardInfoWidgetURL");
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/cardInfoWidgetURL");
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", @"{
""service_name"": ""VISA"",
""type"": 4
}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Body Parameters
Parameter | Description | Type | Required |
---|---|---|---|
service_name | Service name (VISA) | String | Yes |
type | Possible values (2 & 4). Based on type below fields will be rendered over widget. 2: ["CARD_NUMBER"] 4: ["CARD_NUMBER", "EXPIRY_DATE"] NOTE: Default value will be 2. | Number | No |
Example Response
{
"widget_url": "https://preprodwidget.nium.com/dashboard?data=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjoiNjA1OTg1YmZlODU5YWQwMDI2Y2ZjNGM4IiwiaWF0IjoxNjE2NDc5Njc5LCJleHAiOjE2MTY0ODA1Nzl9.RwQqUIv9zqsW-qm7OPpiWgfnTwGM69JACAayz6jZu7U",
"expiry_at": "2021-03-23T10:48:09Z"
}
Response Parameters
Parameter | Description | Type |
---|---|---|
widget_url | Widget Url. | String |
expiry_at | Datetime of widget url expiry. | String |