On This Page
REST API
Listen For the Device Data Collection URL Response
Receiving the response indicates that the device data collection URL completed its processing.
The response is an event callback containing a message with the status of the device
data collection process.
The
event.origin
URL that you use depends on whether you are in a
test or production environment: - Test: https://centinelapistag.cardinalcommerce.com
- Production: https://centinelapi.cardinalcommerce.com
Study the example below to understand how to subscribe to the event and add
JavaScript to receive the response from the device data collection iframe. Place the
JavaScript after the closing
</body>
element.Listen for Device Data Collection Response
window.addEventListener("message", function(event) { if (event.origin === https://centinelapistag.cardinalcommerce.com) { console.log(event.data); } }, false);
This example shows a response payload from the event. None of the data that is
returned needs to be stored for future use.
Event Listener Callback Payload
{ "MessageType": "profile.completed", "Session Id": "f54ea591-51ac-48de-b908-eecf4ff6beff", "Status": true }