Load a balance to a gift card

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

Endpoint

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

Request

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

The elements of a gift card load 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 - Load
{
   "SaleToPOIRequest":{
      "MessageHeader":{
         "ProtocolVersion":"3.0",
         "MessageClass":"Service",
         "MessageCategory":"StoredValue",
         "MessageType":"Request",
         "ServiceID":"0326113134",
         "SaleID":"POSSystemID12345",
         "POIID":"MX925-286240330"
      },
      "StoredValueRequest":{
         "SaleData":{
            "SaleTransactionID":{
               "TransactionID":"4821",
               "TimeStamp":"2018-03-26T09:31:34+00:00"
            }
         },
         "StoredValueData":[
            {
               "StoredValueTransactionType":"Load",
               "StoredValueAccountID":{
                  "StoredValueAccountType":"GiftCard",
                  "StoredValueProvider":"SVS",
                  "EntryMode":[
                     "Scanned"
                  ],
                  "IdentificationType":"PAN",
                  "ExpiryDate":"1117",
                  "StoredValueID":"6006491260550218066"
               },
               "ItemAmount":10,
               "Currency":"GBP"
            }
         ]
      }
   }
} 

Response

For a list of StoredValueResponse fields, see StoredValueResponse fields. You receive a response with the following fields:

StoredValueResponse - Load
{
   "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":"Load",
               "ItemAmount":10,
               "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.