Activate

Outlines activating a gift card for use by a shopper.


Not all operations are available for each type of gift card. For an overview of supported features for the different types, see Gift Card Overview

Endpoint

The URL used to send  Terminal API  messages depends on your type of implementation. For more information on the architectures available, see the Terminal API Overview .

Request

Stored Value requests are used to activate a gift card. For a list of StoredValueRequest fields, see StoredValueRequest fields.

The elements of an activate request are wrapped in a StoredValueRequest envelope.

The SaleID and ServiceID in the MessageHeader should be unique. SaleID and ServiceID combinations are rejected if used recently, within 48 hours.

The fields described below are the basic fields you specify when making a StoredValueRequest call to the Terminal API.

StoredValueRequest - Activate
{
   "SaleToPOIRequest":{
      "MessageHeader":{
         "MessageType":"Request",
         "MessageClass":"Service",
         "MessageCategory":"StoredValue",
         "SaleID":"POSSystemID12345",
         "POIID":"MX925-260193322",
         "ProtocolVersion":"3.0",
         "ServiceID":"9264"
      },
      "StoredValueRequest":{
         "SaleData":{
            "SaleTransactionID":{
               "TransactionID":"4738",
               "TimeStamp":"2018-03-29T14:44:32+00:00"
            }
         },
         "StoredValueData":[
            {
               "StoredValueTransactionType":"Activate",
               "StoredValueAccountID":{
                  "StoredValueAccountType":"GiftCard",
                  "StoredValueProvider":"SVS",
                  "ExpiryDate":"1117",
                  "EntryMode":[
                     "Scanned"
                  ],
                  "IdentificationType":"PAN",
                  "StoredValueID":"6006491260550218066"
               },
               "ItemAmount":0,
               "Currency":"EUR"
            }
         ]
      }
   }
} 

Response

For a list of StoredValueResponse fields, see StoredValueResponse fields.

You receive a response with the following fields:

StoredValueResponse - Activate
{
   "SaleToPOIResponse":{
      "StoredValueResponse":{
         "POIData":{
            "POITransactionID":{
               "TimeStamp":"2018-03-26T09:31:29.000Z",
               "TransactionID":"oLkO001522056689002.9815220566972551"
            }
         },
         "SaleData":{
            "SaleTransactionID":{
               "TimeStamp":"2018-03-26T09:31:34.000Z",
               "TransactionID":"4821"
            }
         },
         "PaymentReceipt":[
            {
               "DocumentQualifier":"CashierReceipt",
               "OutputContent":{
                  "OutputFormat":"Text",
                  "OutputText":[
                     {
                        "CharacterStyle":"Bold",
                        "Text":"name=Adyen&key=header1",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=www.adyen.com&key=header2",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"key=filler",
                        "EndOfLineFlag":true
                     },
                     {
                        "CharacterStyle":"Bold",
                        "Text":"name=MERCHANT%20COPY&key=merchantTitle",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"key=filler",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Date&value=26%2f03%2f18&key=txdate",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Time&value=11%3a31%3a29&key=txtime",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"key=filler",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Card&value=%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a8066&key=pan",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Pref.%20name&key=preferredName",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Card%20type&value=svs&key=cardType",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Payment%20method&value=svs&key=paymentMethod",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Payment%20variant&value=svs&key=paymentMethodVariant",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Entry%20mode&value=MKE&key=posEntryMode",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"key=filler",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=MID&key=mid",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=TID&value=MX925-286240330&key=tid",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=PTID&value=12000000&key=ptid",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"key=filler",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=ATC&key=atc",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Tender&value=oLkO001522056689002&key=txRef",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Reference&value=4821&key=mref",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"key=filler",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Type&value=REFUND&key=txtype",
                        "EndOfLineFlag":true
                     },
                     {
                        "CharacterStyle":"Bold",
                        "Text":"name=TOTAL&value=%c2%a3%2010.00%20%20&key=totalAmount",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"key=filler",
                        "EndOfLineFlag":true
                     },
                     {
                        "CharacterStyle":"Bold",
                        "Text":"name=APPROVED&key=approved",
                        "EndOfLineFlag":true
                     }
                  ]
               }
            },
            {
               "DocumentQualifier":"CustomerReceipt",
               "OutputContent":{
                  "OutputFormat":"Text",
                  "OutputText":[
                     {
                        "CharacterStyle":"Bold",
                        "Text":"name=Adyen&key=header1",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=www.adyen.com&key=header2",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"key=filler",
                        "EndOfLineFlag":true
                     },
                     {
                        "CharacterStyle":"Bold",
                        "Text":"name=CARDHOLDER%20COPY&key=cardholderHeader",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"key=filler",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Date&value=26%2f03%2f18&key=txdate",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Time&value=11%3a31%3a29&key=txtime",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"key=filler",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Card&value=%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a%2a8066&key=pan",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Pref.%20name&key=preferredName",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Card%20type&value=svs&key=cardType",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Payment%20method&value=svs&key=paymentMethod",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Payment%20variant&value=svs&key=paymentMethodVariant",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Entry%20mode&value=MKE&key=posEntryMode",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"key=filler",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=MID&key=mid",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=TID&value=MX925-286240330&key=tid",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=PTID&value=12000000&key=ptid",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"key=filler",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=ATC&key=atc",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Tender&value=oLkO001522056689002&key=txRef",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Reference&value=4821&key=mref",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"key=filler",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Type&value=REFUND&key=txtype",
                        "EndOfLineFlag":true
                     },
                     {
                        "CharacterStyle":"Bold",
                        "Text":"name=TOTAL&value=%c2%a3%2010.00%20%20&key=totalAmount",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"key=filler",
                        "EndOfLineFlag":true
                     },
                     {
                        "CharacterStyle":"Bold",
                        "Text":"name=APPROVED&key=approved",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"key=filler",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Please%20retain%20for%20your%20records&key=retain",
                        "EndOfLineFlag":true
                     },
                     {
                        "Text":"name=Thank%20you&key=thanks",
                        "EndOfLineFlag":true
                     }
                  ]
               }
            }
         ],
         "StoredValueResult":[
            {
               "StoredValueTransactionType":"Activate",
               "ItemAmount":0,
               "Currency":"GBP"
            }
         ],
         "Response":{
            "Result":"Success"
         }
      },
      "MessageHeader":{
         "ProtocolVersion":"3.0",
         "SaleID":"POSSystemID12345",
         "MessageClass":"Service",
         "MessageCategory":"StoredValue",
         "ServiceID":"0326113134",
         "POIID":"MX925-286240330",
         "MessageType":"Response"
      }
   }
}

Not all data in a response will always be available. The availability of some data depends on an internet connection and the payment method used.

Activate and load

You can also activate and immediately load a balance to a gift card. To do this, make a stored value request as above, but include a ItemAmount for the value to be loaded to the gift card. If the value of ItemAmount is greater than 0, a load will occur automatically after activation.