{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/adyen/main/json-schema/adyen-loyalty-response-schema.json", "title": "LoyaltyResponse", "description": "It conveys Information related to the Loyalty transaction processed by the POI System. Content of the Loyalty Response message.", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/adyen-loyalty-api-openapi.yml#/components/schemas/LoyaltyResponse", "type": "object", "properties": { "Response": { "$ref": "#/$defs/Response" }, "SaleData": { "$ref": "#/$defs/SaleData" }, "POIData": { "$ref": "#/$defs/POIData" }, "LoyaltyResult": { "type": "array", "items": { "$ref": "#/$defs/LoyaltyResult" } }, "PaymentReceipt": { "type": "array", "items": { "$ref": "#/$defs/PaymentReceipt" } } }, "required": [ "Response", "SaleData", "POIData" ], "$defs": { "Alignment": { "type": "string", "enum": [ "Centred", "Justified", "Left", "Right" ] }, "BarcodeType": { "type": "string", "enum": [ "Code128", "Code25", "EAN13", "EAN8", "PDF417", "QRCode", "UPCA" ] }, "CharacterHeight": { "type": "string", "enum": [ "DoubleHeight", "HalfHeight", "SingleHeight" ] }, "CharacterStyle": { "type": "string", "enum": [ "Bold", "Italic", "Normal", "Underline" ] }, "CharacterWidth": { "type": "string", "enum": [ "DoubleWidth", "SingleWidth" ] }, "Color": { "type": "string", "enum": [ "Black", "Blue", "Cyan", "Green", "Magenta", "Red", "White", "Yellow" ] }, "CustomerOrderReq": { "type": "array", "items": { "type": "string", "enum": [ "Both", "Closed", "Open" ] } }, "DocumentQualifier": { "type": "string", "enum": [ "CashierReceipt", "CustomerReceipt", "Document", "Journal", "SaleReceipt", "Voucher" ] }, "EntryMode": { "type": "array", "items": { "type": "string", "enum": [ "Contactless", "File", "ICC", "Keyed", "MagStripe", "Manual", "Mobile", "RFID", "Scanned", "SynchronousICC", "Tapped" ] } }, "ErrorCondition": { "type": "string", "enum": [ "Aborted", "Busy", "Cancel", "DeviceOut", "InProgress", "InsertedCard", "InvalidCard", "LoggedOut", "MessageFormat", "NotAllowed", "NotFound", "PaymentRestriction", "Refusal", "UnavailableDevice", "UnavailableService", "UnreachableHost", "WrongPIN" ] }, "IdentificationSupport": { "type": "string", "enum": [ "HybridCard", "LinkedCard", "LoyaltyCard", "NoCard" ] }, "IdentificationType": { "type": "string", "enum": [ "AccountNumber", "BarCode", "ISOTrack2", "PAN", "PhoneNumber" ] }, "LoyaltyAccount": { "type": "object", "description": "This data structure conveys the identification of the account and the associated loyalty brand. Data related to a loyalty account processed in the transaction.", "properties": { "LoyaltyAccountID": { "$ref": "#/$defs/LoyaltyAccountID" }, "LoyaltyBrand": { "type": "string", "pattern": "^.+$", "description": "If a card is analysed." } }, "required": [ "LoyaltyAccountID" ] }, "LoyaltyAccountID": { "type": "object", "description": "In the Payment or the Loyalty Request message, it allows to identify the loyalty account by the Sale Terminal instead of the POI Terminal (e.g. because the account identification is a bar-code read by the Cashier on a scanner device). Identification of a Loyalty account.", "properties": { "EntryMode": { "$ref": "#/$defs/EntryMode" }, "IdentificationType": { "$ref": "#/$defs/IdentificationType" }, "IdentificationSupport": { "$ref": "#/$defs/IdentificationSupport" }, "LoyaltyID": { "type": "string" } }, "required": [ "EntryMode", "IdentificationType", "LoyaltyID" ] }, "LoyaltyAcquirerData": { "type": "object", "properties": { "LoyaltyAcquirerID": { "type": "string", "pattern": "^.+$" }, "ApprovalCode": { "type": "string", "pattern": "^.+$" }, "LoyaltyTransactionID": { "$ref": "#/$defs/TransactionIDType" }, "HostReconciliationID": { "type": "string", "pattern": "^.+$" } } }, "LoyaltyAmount": { "type": "object", "description": "An awarded amount or an amount to redeem to the loyalty account might be sent in the Payment request message. Amount of a loyalty account.", "properties": { "LoyaltyUnit": { "$ref": "#/$defs/LoyaltyUnit" }, "Currency": { "type": "string", "pattern": "^[A-Z]{3,3}$" }, "AmountValue": { "type": "number", "maximum": 99999999.999999, "minimum": 0 } }, "required": [ "AmountValue" ] }, "LoyaltyResult": { "type": "object", "description": "In the Message Response, the result of each loyalty brand transaction. Data related to the result of a processed loyalty transaction.", "properties": { "LoyaltyAccount": { "$ref": "#/$defs/LoyaltyAccount" }, "CurrentBalance": { "type": "number", "maximum": 99999999.999999, "minimum": 0, "description": "if known (provided by the card or an external host)." }, "LoyaltyAmount": { "$ref": "#/$defs/LoyaltyAmount" }, "LoyaltyAcquirerData": { "$ref": "#/$defs/LoyaltyAcquirerData" }, "Rebates": { "$ref": "#/$defs/Rebates" } }, "required": [ "LoyaltyAccount" ] }, "LoyaltyUnit": { "type": "string", "enum": [ "Monetary", "Point" ] }, "OutputBarcode": { "type": "object", "properties": { "BarcodeType": { "$ref": "#/$defs/BarcodeType" }, "BarcodeValue": { "type": "string", "pattern": "^.+$" } }, "required": [ "BarcodeValue" ] }, "OutputContent": { "type": "object", "description": "This is a sequence of elements if they have different formats. Content to display or print.", "properties": { "OutputFormat": { "$ref": "#/$defs/OutputFormat" }, "PredefinedContent": { "$ref": "#/$defs/PredefinedContent" }, "OutputText": { "type": "array", "items": { "$ref": "#/$defs/OutputText" } }, "OutputXHTML": { "type": "string", "format": "byte", "pattern": "^.{0,262144}$", "description": "Mandatory, if OutputFormat is XHTML, not allowed otherwise." }, "OutputBarcode": { "$ref": "#/$defs/OutputBarcode" } }, "required": [ "OutputFormat" ] }, "OutputFormat": { "type": "string", "enum": [ "BarCode", "MessageRef", "Text", "XHTML" ] }, "OutputText": { "type": "object", "description": "It conveys Information related to the content of the text message and its format. All the data elements related to the format of the text to display or print are parameters valid for the whole Text content. Content of text message to display or print.", "properties": { "Text": { "type": "string" }, "CharacterSet": { "type": "integer" }, "Font": { "type": "string", "pattern": "^.+$" }, "StartRow": { "type": "integer", "minimum": 1, "maximum": 500 }, "StartColumn": { "type": "integer", "minimum": 1, "maximum": 500 }, "Color": { "$ref": "#/$defs/Color" }, "CharacterWidth": { "$ref": "#/$defs/CharacterWidth" }, "CharacterHeight": { "$ref": "#/$defs/CharacterHeight" }, "CharacterStyle": { "$ref": "#/$defs/CharacterStyle" }, "Alignment": { "$ref": "#/$defs/Alignment" }, "EndOfLineFlag": { "type": "boolean", "default": true } }, "required": [ "Text" ] }, "POIData": { "type": "object", "description": "In the Message Response, identification of the POI transaction. Data related to the POI System.", "properties": { "POITransactionID": { "$ref": "#/$defs/TransactionIDType" }, "POIReconciliationID": { "type": "integer", "description": "If Result is Success." } }, "required": [ "POITransactionID" ] }, "PaymentReceipt": { "type": "object", "description": "If the payment receipts are printed by the Sale system and the POI or the Sale does not implement the Print exchange (Basic profile). Customer or Merchant payment receipt.", "properties": { "DocumentQualifier": { "$ref": "#/$defs/DocumentQualifier" }, "IntegratedPrintFlag": { "type": "boolean", "description": "Type of the print integrated to other prints." }, "RequiredSignatureFlag": { "type": "boolean", "default": false, "description": "Indicate that the cardholder payment receipt requires a physical signature by the Customer." }, "OutputContent": { "$ref": "#/$defs/OutputContent" } }, "required": [ "DocumentQualifier", "OutputContent" ] }, "PredefinedContent": { "type": "object", "description": "It conveys Information related to the predefined message. Reference of a predefined message to display or print.", "properties": { "ReferenceID": { "type": "string", "pattern": "^.+$", "description": "Identification of a predefined message to display or print." }, "Language": { "type": "string", "pattern": "^[a-z]{2,2}$", "description": "Identification of a language." } }, "required": [ "ReferenceID" ] }, "Rebates": { "type": "object", "properties": { "TotalRebate": { "type": "number", "maximum": 99999999.999999, "minimum": 0 }, "RebateLabel": { "type": "string", "pattern": "^.+$" }, "SaleItemRebate": { "type": "array", "items": { "$ref": "#/$defs/SaleItemRebate" } } } }, "Response": { "type": "object", "description": "If Result is Success, ErrorCondition is absent or not used in the processing of the message. In the other cases, the ErrorCondition has to be present and can refine the processing of the message response. AdditionalResponse gives more information about the success or the failure of the message request processing, for logging without real time involvements. Result of a message request processing.", "properties": { "Result": { "$ref": "#/$defs/Result" }, "ErrorCondition": { "$ref": "#/$defs/ErrorCondition" }, "AdditionalResponse": { "type": "string", "pattern": "^.+$", "description": "If present, the POI logs it for further examination." } }, "required": [ "Result" ] }, "Result": { "type": "string", "enum": [ "Failure", "Partial", "Success" ] }, "SaleData": { "type": "object", "description": "Data associated to the Sale System, with a particular value during the processing of the payment by the POI, including the cards acquisition. Data related to the Sale System.", "properties": { "OperatorID": { "type": "string", "pattern": "^.+$" }, "OperatorLanguage": { "type": "string", "pattern": "^[a-z]{2,2}$", "description": "if different from the Login." }, "ShiftNumber": { "type": "string", "pattern": "^.+$", "description": "if different from the Login and see Login .SaleData." }, "SaleTransactionID": { "$ref": "#/$defs/TransactionIDType" }, "SaleReferenceID": { "type": "string", "pattern": "^.+$", "description": "If payment reservation." }, "SaleTerminalData": { "$ref": "#/$defs/SaleTerminalData" }, "TokenRequestedType": { "$ref": "#/$defs/TokenRequestedType" }, "CustomerOrderID": { "type": "string", "pattern": "^.+$", "description": "Additional and optional identification of a customer order." }, "CustomerOrderReq": { "$ref": "#/$defs/CustomerOrderReq" }, "SaleToPOIData": { "type": "string", "pattern": "^.+$", "description": "Stored with the transaction." }, "SaleToAcquirerData": { "type": "string", "pattern": "^.+$", "description": "Send to the Acquirer if present." }, "SaleToIssuerData": { "$ref": "#/$defs/SaleToIssuerData" } }, "required": [ "SaleTransactionID" ] }, "SaleItemRebate": { "type": "object", "description": "To be differentiated from the award which is the amount or quantity earned on the loyalty account. The awarded amount that is attached to an item as a rebate.", "properties": { "ItemID": { "type": "integer", "description": "Item identification inside a transaction (0 to n)." }, "ProductCode": { "type": "integer", "minimum": 1, "maximum": 20, "description": "Product code of item purchased with the transaction." }, "EanUpc": { "type": "integer" }, "UnitOfMeasure": { "$ref": "#/$defs/UnitOfMeasure" }, "Quantity": { "type": "string", "description": "if rebate is additional units." }, "ItemAmount": { "type": "number", "maximum": 99999999.999999, "minimum": 0, "description": "if rebate on the line item amount." }, "RebateLabel": { "type": "string", "pattern": "^.+$", "description": "If provided by the Acquirer." } }, "required": [ "ItemID", "ProductCode" ] }, "SaleTerminalData": { "type": "object", "description": "In the Login Request, if a Sale Terminal is involved in the login. In other messages, when a logical device is out of order (SaleCapabilites), or when the other data have changed since or were not in the Login. Information related to the software and hardware feature of the Sale Terminal.", "properties": { "TotalsGroupID": { "type": "string", "pattern": "^.{1,16}$", "description": "If present, default value for all transaction." } } }, "SaleToIssuerData": { "type": "object", "description": "The POI System receives this information and sends it to the Acquirer for the Issuer without any change. Sale information intended for the Issuer.", "properties": { "StatementReference": { "type": "string", "pattern": "^.+$", "description": "Information to print on the bank statement." } } }, "TokenRequestedType": { "type": "string", "enum": [ "Customer", "Transaction" ] }, "TransactionIDType": { "type": "object", "description": "Identification of a transaction for the Sale System or the POI System.", "properties": { "TransactionID": { "type": "string", "pattern": "^.+$" }, "TimeStamp": { "type": "string", "format": "date-time" } }, "required": [ "TransactionID", "TimeStamp" ] }, "UnitOfMeasure": { "type": "string", "enum": [ "Case", "Centilitre", "Centimetre", "Foot", "Gram", "Inch", "Kilogram", "Kilometre", "Litre", "Meter", "Mile", "Other", "Ounce", "Pint", "Pound", "Quart", "UKGallon", "USGallon", "Yard" ] } } }