{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/adyen/main/json-schema/adyen-loyalty-request-schema.json", "title": "LoyaltyRequest", "description": "It conveys Information related to the Loyalty transaction to process. Content of the Loyalty Request 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/LoyaltyRequest", "type": "object", "properties": { "SaleData": { "$ref": "#/$defs/SaleData" }, "LoyaltyTransaction": { "$ref": "#/$defs/LoyaltyTransaction" }, "LoyaltyData": { "$ref": "#/$defs/LoyaltyData" } }, "required": [ "SaleData", "LoyaltyTransaction", "LoyaltyData" ], "$defs": { "CustomerOrderReq": { "type": "array", "items": { "type": "string", "enum": [ "Both", "Closed", "Open" ] } }, "EntryMode": { "type": "array", "items": { "type": "string", "enum": [ "Contactless", "File", "ICC", "Keyed", "MagStripe", "Manual", "Mobile", "RFID", "Scanned", "SynchronousICC", "Tapped" ] } }, "ForceEntryMode": { "type": "array", "items": { "type": "string", "enum": [ "CheckReader", "Contactless", "File", "ICC", "Keyed", "MagStripe", "Manual", "RFID", "Scanned", "SynchronousICC", "Tapped" ] } }, "IdentificationSupport": { "type": "string", "enum": [ "HybridCard", "LinkedCard", "LoyaltyCard", "NoCard" ] }, "IdentificationType": { "type": "string", "enum": [ "AccountNumber", "BarCode", "ISOTrack2", "PAN", "PhoneNumber" ] }, "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" ] }, "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" ] }, "LoyaltyData": { "type": "object", "description": "In the Payment, Loyalty or Balance Inquiry Request message, it allows the Sale Terminal to send the identification of the loyalty account or an awarded amount or an amount to redeem to the loyalty account. Data related to a Loyalty program or account.", "properties": { "CardAcquisitionReference": { "$ref": "#/$defs/TransactionIDType" }, "LoyaltyAccountID": { "$ref": "#/$defs/LoyaltyAccountID" }, "LoyaltyAmount": { "$ref": "#/$defs/LoyaltyAmount" } } }, "LoyaltyHandling": { "type": "string", "enum": [ "Allowed", "Forbidden", "Processed", "Proposed", "Required" ] }, "LoyaltyTransaction": { "type": "object", "properties": { "LoyaltyTransactionType": { "$ref": "#/$defs/LoyaltyTransactionType" }, "Currency": { "type": "string", "pattern": "^[A-Z]{3,3}$" }, "TotalAmount": { "type": "number", "maximum": 99999999.999999, "minimum": 0 }, "OriginalPOITransaction": { "$ref": "#/$defs/OriginalPOITransaction" }, "TransactionConditions": { "$ref": "#/$defs/TransactionConditions" }, "SaleItem": { "type": "array", "items": { "$ref": "#/$defs/SaleItem" } } }, "required": [ "LoyaltyTransactionType" ] }, "LoyaltyTransactionType": { "type": "string", "enum": [ "Award", "AwardRefund", "Rebate", "RebateRefund", "Redemption", "RedemptionRefund" ] }, "LoyaltyUnit": { "type": "string", "enum": [ "Monetary", "Point" ] }, "OriginalPOITransaction": { "type": "object", "description": "In the Payment or the Loyalty Request message, it allows using the card of a previous CardAcquisition or Payment/Loyalty request. Identification of a previous POI transaction.", "properties": { "SaleID": { "type": "string", "pattern": "^.+$", "description": "Identification of a Sale System or a Sale Terminal for the Sale to POI protocol." }, "POIID": { "type": "string", "pattern": "^.+$", "description": "If original transaction is coming from another POI." }, "POITransactionID": { "$ref": "#/$defs/TransactionIDType" }, "ReuseCardDataFlag": { "type": "boolean", "default": true, "description": "Indicate if the card data has to be got from a previous transaction." }, "ApprovalCode": { "type": "string", "pattern": "^.+$", "description": "If referral." }, "CustomerLanguage": { "type": "string", "pattern": "^[a-z]{2,2}$", "description": "If the language is selected by the Sale System before the request to the POI." }, "AcquirerID": { "type": "integer", "description": "Restrict to these Acquirer if present." }, "AmountValue": { "type": "number", "maximum": 99999999.999999, "minimum": 0 }, "HostTransactionID": { "$ref": "#/$defs/TransactionIDType" } } }, "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" ] }, "SaleItem": { "type": "object", "description": "In loyalty or value added payment card transaction, the items of the sale are entering in the processing of the transaction. Sale items of a transaction.", "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", "description": "If data sent, POI has to store it and send it if the host protocol allows it." }, "UnitOfMeasure": { "$ref": "#/$defs/UnitOfMeasure" }, "Quantity": { "type": "string", "description": "If data sent, POI has to store it and send it if the host protocol allows it." }, "UnitPrice": { "type": "number", "maximum": 99999999.999999, "minimum": 0, "description": "if Quantity present." }, "ItemAmount": { "type": "number", "maximum": 99999999.999999, "minimum": 0, "description": "Total amount of the item line." }, "TaxCode": { "type": "integer", "description": "If data sent, POI has to store it and send it if the host protocol allows it." }, "SaleChannel": { "type": "integer", "description": "If data sent, POI has to store it and send it if the host protocol allows it." }, "ProductLabel": { "type": "string", "pattern": "^.+$" }, "AdditionalProductInfo": { "type": "string", "pattern": "^.+$", "description": "If data sent, POI has to store it and send it if the host protocol allows it." } }, "required": [ "ItemID", "ProductCode", "ItemAmount" ] }, "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" ] }, "TransactionConditions": { "type": "object", "description": "Conditions on which the transaction must be processed.", "properties": { "AllowedPaymentBrand": { "type": "array", "items": { "type": "string", "pattern": "^.+$", "description": "Restrict brand if data sent." } }, "AcquirerID": { "type": "array", "items": { "type": "integer", "description": "Restrict to these Acquirer if present." } }, "DebitPreferredFlag": { "type": "boolean", "description": "The preferred type of payment is a debit transaction rather a credit transaction." }, "AllowedLoyaltyBrand": { "type": "array", "items": { "type": "string", "pattern": "^.+$", "description": "Restrict brand if data sent." } }, "LoyaltyHandling": { "$ref": "#/$defs/LoyaltyHandling" }, "CustomerLanguage": { "type": "string", "pattern": "^[a-z]{2,2}$", "description": "If the language is selected by the Sale System before the request to the POI." }, "ForceOnlineFlag": { "type": "boolean", "default": false, "description": "Go online if data sent." }, "ForceEntryMode": { "$ref": "#/$defs/ForceEntryMode" }, "MerchantCategoryCode": { "type": "string", "pattern": "^.{3,4}$", "description": "The payment implies a specific MCC." } } }, "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" ] } } }