User lookup and enrollment using Viking terminals
Description
This is a quickstart quide for using Storebox services with Viking terminals.
For a more indepth introduction please refer to the document DAM Services Storebox Cardlink integration ECR integration notes
APIs involved
Flow
- Register store (this is only done once per store location)
- Lookup user
- Optional If user doesn't exist request enrollment
Store enrollment
Every new store location has to be registered before first use. This is a one time process that is done in two steps- Request Store token from Storebox (documentation)
- Call registerstore through Baxi
Step 1 & 2: Get Store token from Storebox
See documentation. Here is an example using cURL. Username and password are issued by Storebox.% curl -u username:password "https://test-dam.storebox.com/v1/authenticate?storeId=my-unique-id-1" {"token":"eyJ0eSNIP.eyJzdSNIP.KzHE1SNIP"}
Step 3: Register store
Using the token from Step1, execute the following DA framework message using theSendJson
function in Baxi.
action value is subject to change and must always be verified in latest Nets terminal documentation.
Request
{
"da": {
"ver": "1.0",
"type": 101,
"action": 114,
"ra2dam": {
"ver": "2.0",
"requestid": "1231231230",
"registerstore": {
"asset": {
"template": { "name": "storebox" },
"attributes": [
{
"token": "eyJ0eSNIP.eyJzdSNIP.KzHE1SNIP"
}
]
}
}
}
}
}
Response
{
"dam2ra":{
"registerstore": {
"asset":{
"attributes":[{"response":"Store registered successfully"}]
}
}
}
}
User lookup
To lookup if a customer is registered in Storebox or an associated customer program,
use the following JSON payload in the SendJson
function in Baxi.
action value is subject to change and must always be verified in latest Nets terminal documentation.
Request
{
"da": {
"ver": "1.0",
"type": 101,
"action": 192,
"ra2t": { "ver": "1.0", "query": [ { "mode": 4 } ] },
"ra2dam": {
"ver": "2.0",
"requestid": "1231231230",
"getasset": {
"asset": {
"template": { "name": "storebox" },
"keys": [
{
"cardref": "<cardref.001>"
}
]
}
}
}
}
}
Response
{
"da":{
"ver":"1.0",
"type":101,
"action":192,
"status":" 5:0",
"statustext":"OK",
"dam2ra":{
"requestid":"1231231230",
"responseid":"e333542b-a234-4565-a387-63ac4dc0b994",
"ver":"2.0",
"getasset":{
"asset":{
"id":"1231231230",
"template":"uuid",
"keys":[],
"attributes":[{"payload":" - Solution specific JSON content from Storebox - "}]
}
}
}
}
}
User enrollment
It is possible to enroll a customer directly from the terminal. It is a prerequisite that some kind of customer identifier can be supplied.
This can either be a member id or a phone number, which will be used to activate a consent process.
Get phone number
The terminal can be used to request the phone number from customer.action value is subject to change and must always be verified in latest Nets terminal documentation.
Request
{
"da":{
"ver":"1.0",
"type":998,
"action":3,
"ra2t":{
"ver":"1.0",
"query":[{ "id":7, "target":1, "mode":1, "max":8, "min":8 }]
}
}
}
Response
{
"da":{
"ver":"1.0",
"type":998,
"action":3,
"t2ra":{
"ver":"1.0",
"results":[{"id":9,"value":"12345678"}]
}
}
}
Note that the customer will most likely not enter country code on the terminal and
the enrollment request require that the phone number is in
MSISDN format, so it is up the integrator
to make sure that the phone number is in the correct format.
Enroll
When the phone number and/or the member id has been collected, the enrollment request can
be made using the following payload, using SendJson
in Baxi.
{phone} and {member id} should be replaced with their respective values. Only one of them is required, but both may be supplied.
Note: {member id} is currently not used, but reserved for future use.
action value is subject to change and must always be verified in latest Nets terminal documentation.
Request
{
"da": {
"ver": "1.0",
"type": 101,
"action": 191,
"ra2t": { "ver": "1.0", "query": [ { "mode": 4 } ] },
"ra2dam": {
"ver": "2.0",
"requestid": "1231231230",
"insertasset": {
"asset": {
"template": { "name": "storebox" },
"keys": [ { "cardref": "<cardref.001>" } ],
"attributes": [
{
"msisdn": "{phone}"
},
{
"memberno": "{member id}"
}
]
}
}
}
}
}
Response
Per default the response always contains a "posapi" object with card identifiers for the new card for use with receipt delivery through POS API.
Furthermore other API references may be contained depending on the services used from Storebox. E.g. a "cardlinkapi" object or "loyaltyapi" object. The name designates the API that is in play for the customers setup and contains any data that is relevant in response to insertAsset.
{
"da" : {
"ver" : "1.0",
"type" : 101,
"action" : 191,
"status" : " 5:0",
"statustext" : "OK",
"dam2ra" : {
"requestid" : "1231231230",
"responseid" : "6b9e963e-eec2-4615-a20f-f47d60185c8e",
"ver" : "2.0",
"insertasset" : {
"asset" : {
"template" : "92debb63-0cc5-4570-aeaf-a3f9fb6c0563",
"keys" : [ {
"cardref" : "f37388e0-0a1f-11eb-b596-5c4242535400"
} ],
"attributes" : [ {
{
"payload": {
"id": "800unxobgxyrguqqv11ankz0vsuy2p5w",
"posapi": {
"userId": [
{
"type": "pan",
"value": "f37388e0-0a1f-11eb-b596-5c4242535400"
}
]
},
"cardlinkapi": {
"...": "..."
}
}
}
} ],
"id" : "92debb63-0cc5-4570-aeaf-a3f9fb6c0563"
}
}
}
}
}
Send a receipt to the new user, by inserting the userId
, along with any other
custom user ids in the POS API receipt payload,
like this example
{
"userId" : [
{
"type" : "pan",
"value" : "f37388e0-0a1f-11eb-b596-5c4242535400"
},
...
],
...
}
FAQ
What are the technical requirement?
The following requirements must be in place to use the DAM services from an ECR application;
- ECR must use BAX integration component with support for the DAM API
- Supported BAX versions (current versions recommended)
- Baxi.Net V1.10.2.1
- JavaBaxi V1.2.3.0
- AndroidBaxi V1.2.5.1
- Baxi.iOSV.1.2.7.0
- BaxiAgent V.1.4.1.0
- A NETS Viking terminal with support for the DAM services must be used
- Supported terminal types and software versions (or higher)
- Ingenico Telium 2,integrated with ECR
- Viking payment application 5.17. Version 6.X highly recommended for improved contactless handling. Version 08.06 is needed to support PAR
- ECR can communicate with the terminal through any available interface for the given terminal type.
- For RS232 based integrations, we highly recommended setting max baud rate (57600) in terminal and ensure the same baud rate is used in the BAXI.ini file. A lower baud rate will result in prolonged token retrieval. Notice that any changes to baud rate must be synchronised between the terminal and BAXI