Collecting Device Data
The following options are available for device data collection:
- Card BIN in JWT: This option is the recommended approach and allows you to pass the card BIN (first eight digits or full card number) in the JWT.
- Card BIN as a POST parameter plus JWT: This option allows you to pass the card BIN directly from the web front end to the device data collection URL instead of the JWT. However, a JWT is still required in order to authenticate the session.
Card BIN in JWT
As part of the JWT generation, you add the card BIN to the payload within
the transactional JWT. When the device data collection URL is invoked, the
transactional JWT is sent to the URL.
The following example shows the return URL populated in the transactional
JWT instead of a POST parameter.
- Add the card BIN (first eight digits or full card number) to the transactional JWT.
- Create a POST request to send the transactional JWT to the device data collection URL.
- Handle the response from the device data collection URL on the return URL provided within the transactional JWT.
Card BIN in JWT
<iframe height="1" width="1" style="display: none;"> <form id="collectionForm" name="devicedata" method="POST" action="https://centinelapistag.cardinalcommerce.com/V1/Cruise/Collect"> <input type="hidden" name="JWT" value="Transactional JWT generated per specification" /> </form> <script>window.onload = function() { // Auto submit form on page load document.getElementById('collectionForm').submit(); } </script> </iframe>
Card BIN as a POST Parameter Plus JWT
This option allows you to post the card BIN as a POST parameter along with the transactional JWT.
When the device data collection URL is invoked, the transactional JWT and the BIN
are posted to the URL.
The following example shows the return URL populated in the transactional JWT along with a POST
parameter.
- Create a POST request to send the transactional JWT and the card BIN (first eight digits or full card number) to the device data collection URL.
- Handle the response from the device data collection URL on the return URL provided within the transactional JWT.
Card BIN as a POST Parameter Plus JWT
<iframe height="1" width="1" style="display: none;"> <form id="collectionForm" name="devicedata" method="POST" action="https://centinelapistag.cardinalcommerce.com/V1/Cruise/Collect"> <!-- POST Parameters: Bin=First eight digits to full pan of the payment card number. JWT=JWT generated per merchant spec --> <input type="hidden" name="Bin" value="41000000" /> <input type="hidden" name="JWT" value="JWT generated per merchant spec" /> </form> <script>window.onload = function() { // Auto submit form on page load document.getElementById('collectionForm').submit(); } </script> </iframe>