Skip to main content
Version

Upper layer protocol

General structure of a message​

Messages are sent via TCP.

Message Layout

A message consists of a header and a body and some additional related data fields.

Message Layout

The message header has a fixed length of 12 bytes, and contains the following fields:

Message Length.

Field

Length (bytes)

Description

Magic Number

1st - 4th

Static value. Always 0x65, 0x70, 0x6f, 0x73

Message Length

5th - 8th

Consist of:

1 . Body length.

2 . Sender Address (1 byte).

3 . Receiver Address (1 byte).

4 . Protocol Version (1 byte).

5 . Protocol Type (1 byte).

Sender Address

9th

Reserved for future use.

Receiver Address

10th

Reserved for future use.

Protocol Version

11th

Protocol version used.

Protocol Type

12th

Protocol type used.

 

The following messages are part of this protocol:

  1. AUTHORIZATION_REQUEST (0310)

  2. AUTHORIZATION_RESPONSE (0311)

  3. TRANSACTION_RESULT (0320)

  4. TRANSACTION_COMPLETE (03FF)

  5. TRANSACTION_CANCEL (0301)

  6. PRE_AUTH_OPERATION_REQUEST (0381)

  7. PRINT_REQUEST (0501)

  8. PRINT_COMMAND (0500)

  9. ABORT (FFFF)

Message Metadata​

The following format is used to describe the message definitions from the CM.com IPP Payments perspective:

Tag NameTag CodeRequired
<TLV tag name><TLV tag>M/O/C

Message format from CM.com IPP Payments Platform perspective

The first column describes the TLV tag name. When the tag name is preceded by a > (greater-than symbol), the tag is part of the constructed tag at the level above. When the tag name is preceded by >> (double greater-than symbols), the tag is a child of the previously constructed tag at the higher level. The second column contains the code for the TLV tag used for this field. The third column describes whether the tag is Mandatory, Optional or Conditional. When a tag is conditional, the conditions are listed after the message definition.

The following format is used to describe the message definitions from the payment terminal perspective:

Tag NameTag CodeEMVSwipe
<TLV tag name><TLV tag>M/O/C/-M/O/C/-

Message format from Payment Terminal Perspective

The first column describes the TLV tag name. When the tag name is preceded by a > (greater than character) the tag is part of the constructed tag on the level above it. The second column contains the code for the TLV tag used for this field. The third column indicates whether the tag is Mandatory, Optional, Conditional or - Not applicable for EMV transactions. The fourth column specifies whether the tag is Mandatory, Optional, Conditional or - Not applicable for Magstripe transactions.

All outgoing messages (AUTHORIZATION_REQUEST, TRANSACTION_RESULT, TRANSACTION_CANCEL, PRINT_REQUEST and PRE_AUTH_OPERATION_REQUEST) need to include a METADATA container tag, directly adjacent to the header.

The payment terminal identifying tags [Terminal model, Terminal brand and Interface Device (IFD) Serial Number] are values that are determined with CM.com IPP Payments Platform during onboarding.

The message will be formatted as follows: HEADER + METADATA (0x7FE000) + CONTENT (0x7FE100).

Tag NameTagM/O/C
Metadata7FE000M
> Application Dialog Variant (02)5FE012M
> Application Protocol Version7FE010M
>> Application Protocol Major Version (00 04)5FE010M
>> Application Protocol Minor Version (00 03)5FE011M
> Application Identification7FE012M
>> Terminal brand5FE101M
>> Terminal model5FE102M
>> Interface Device (IFD) Serial Number9F1EM
>> Terminal application version5FE130M
>> Terminal application build date5FE131O
>> SPHS version5FE132C1
>> SDK version5FE133C1
>> ROM version5FE134C1
>> OS version5FE135C1
Content7FE100M
> Normal message content-M

Metadata

Note

  • C1 - Mandatory only for CM Terminals.

AUTHORIZATION_REQUEST (0310)​

The AuthorizationRequest combines all the information needed to connect the device to the CM.com IPP Payments Platform (this information will be used to validate if that the terminal is a registered terminal) and all the information needed to start a payment.

This section contains a set of tags, indicating whether each tag is mandatory, conditional or optional from a business perspective.

Tag NameTagEMVSwipe
Command identifier5FE000MM
Terminal key serial number5FE310MM
Terminal Type9F35MM
Terminal Capabilities9F33MM
Additional Terminal Capabilities9F40MM
Cardholder Verification Method (CVM) List8EM-
CVM Results9F34M-
Terminal Verification Results (TVR)95MO
Application Cryptogram9F26M-
Cryptogram Information Data9F27M-
Issuer Application Data9F10M-
Unpredictable Number9F37M-
Application Interchange Profile82M-
Dedicated File (DF) Name84M-
Application Version Number – terminal9F09M-
Point of service entry mode9F39MM
Transaction status information9BO-
EMV Transaction type9CM-
Terminal country code9F1AM-
Transaction date9AMM
Transaction time9F21MM
Terminal SCA support5FE108M-
Transaction Sequence Counter9F41M-
CM Transaction Type5FE303MM
Amount Entry7FE320MM
> Amount display string5FE321MM
> Transaction Currency Exponent5F36MM
> Transaction Currency Code5F2AMM
> Amount, Authorized (Binary)81MM
> Amount, Gratuity Authorised Amount5FE34CC4C4
Encrypted cardholder data5FE312MM
> PAN5AM-
> Track 2 Equivalent Data57M-
> TRACK2DATA5FE313-M
> Application Effective Date5F25C2-
> Application Expiration Date5F24C2-
> PAN Sequence Number5F34C2-
> Service Code5F30C2-
AID entry7FE306M-
> Application identifier (AID)4FM-
> Application label50M-
> Application preferred name9F12C2-
> Issuer Code Table Index9F11C2-
> Application priority indicator87C2-
> Language preference5F2DC2-
> Application Selection Registered Proprietary Data9F0AC2-
> Issuer Identification Number Extended9F0CC2-
> Issuer Identification Number42C2-
Transaction identifier5FE300C1C1
Application Identifier (AID) – terminal9F06C6-
Application Transaction Counter (ATC)9F36C2-
Application usage control9F07C2-
Form factor indicator9F6EC2-
Issuer country code5F28C2-
Transaction category code9F53O-
Issuer action code – Default9F0DC2-
Encrypted PIN block5FE311C5C5
Original reference STAN5FE306C3C3
Original reference date5FE307C3C3
EMV PIN try counter9F17C2C2
Merchant order reference5FE341OO
PIN length5FE315OO
Amount authorized numeric9F02O-
Cardholder data length5FE346OO

AuthorizationRequest.

Note

  • C1 - Mandatory in the cloud flow and must also be included in transactions where multiple AUTHORIZATION_REQUESTs are sent, such as in SCA flows or PIN retry scenarios Multiple Authorization Request.

  • C2 - Present if it is present on the card.

  • C3 - present if the tag CM Transaction Type 5FE303 CM Payment Transaction Types is Refund or PRE_AUTH_OPERATION_REQUEST (0381).

  • C4 - present if being onboarded to use the feature tipping.

  • C5 - Present if CVM is Online PIN.

  • C6 - If tag 4F is not available then tag 9F06 shall be present.

  • Remarks

    • For the PURCHASE flow, the following transaction type tags must be set: EMV Transaction Type (9C) = 00 details here: EMV Transaction Types, and CM Transaction Type (5FE303) = 0x0001 details here: CM Payment Transaction Types.

    • For the MAT flow, the following transaction type tags must be set: EMV Transaction Type (9C) = 00 details here: EMV Transaction Types, and CM Transaction Type (5FE303) = 0x0002 details here: CM Payment Transaction Types.

    • For the REFUND flow, the following transaction type tags must be set: EMV Transaction Type (9C) = 20 details here: EMV Transaction Types, and CM Transaction Type (5FE303) = 0x0004 details here: CM Payment Transaction Types.

    • For the PRE-AUTH flow, the following transaction type tags must be set: EMV Transaction Type (9C) = 00 details here: EMV Transaction Types, and CM Transaction Type (5FE303) = 0x0005 details here: CM Payment Transaction Types.

    • Terminal SCA support possible values for the tag TERMINAL_SCA_SUPPORT 5fe108 details here: Multiple Authorization Request

    • The terminal time is now assessed and compared to the store’s time. If the deviation is significant, the platform will terminate the transaction. In such cases, the abort message will include the new result code: INCORRECT TIME (0x0F03).

Responses
AUTHORIZATION_RESPONSE
ABORT

Possible responses to the AuthorizationRequest

AUTHORIZATION_RESPONSE (0311)​

The AuthorizationResponse, among other data can include issuer scripts that the terminal must forward to the card, so the card can process them and generate the second AC that contains the result of that process. This could happen if the card has been inserted into the terminal and an ICC transaction was performed.\

The result of handling such action need to be sent in the subsequent TRANSACTION_RESULT (0320) message.

Tag NameTagM/O/C
Command identifier5FE000M
Command result code5FE001M
Transaction identifier5FE300M
Authorization Response Code8AM
Gateway Data7FE340O
> STAN5FE34AC2
Authorization Code89C1
Acquirer data5FE33AO
Pre Auth Valid Date5FEF01C3
Pre Auth Valid Time5FEF02C3
Issuer Authentication Data91C4
Issuer Script Template 171C4
Issuer Script Template 272C4

AuthorizationResponse.

Note

  • C1 -Present if the data being made available by the financial institutions in the payment chain.

  • C2 - Present if available in the CM IPP Payments Platform.

  • C3 -Present only for the Pre-Authorization.

  • C4 - Present for EMV transactions and required by issuer.

  • Remarks

    • If the result code tag 5FE001 indicates PIN_INCORRECT_RETRY [0301], SCA_ADDITION_REQUIRED [0x030D] or CONTACT_CHIP_REQUIRED [0x030E], then an additional AuthorizationRequest must be performed with the same transaction identifier or a TransactionCancel with the transaction identifier.

PRE_AUTH_OPERATION_REQUEST (0381)​

A pre-authorization is a transaction in which a specific amount is temporarily reserved on the customer’s account balance without the payment being processed immediately.

This amount is reserved to ensure that funds are available to cover the cost of a future transaction, commonly used for hotel reservations, car rentals, or EV charging / Fuel dispensing.

Once the service or delivery of goods is completed, the pre-authorization can either: be updated by increasing the pre-authorization amount, or be finalized by fully or partially capturing the pre-authorized amount or canceling it.

The validity period of a pre-authorization depends on the policies of the card brand.

For the pre-authorization operation, there are distinct scenarios: Finalize a Pre-Authorization (which includes Confirmation and Cancellation) and Update a Pre-Authorization.

For comprehensive information regarding these scenarios, please click here: PRE-AUTH CANCELLATION / CONFIRMATION / UPDATE

There are exceptions based on the processor and acquirer requirements for using the pre-authorization functionality. Please consult with the CM Product Team during onboarding to determine the best setup, as well as the rules and details for its usage in your specific context.

Tag NameTagM/O/C
Command identifier5FE000M
CM Transaction Type5FE303M
Original stan reference5FE306M
Original date reference5FE307M
Amount entry7FE320C1
> Amount display string5FE321C1
> Transaction Currency Exponent5F36C1
> Transaction Currency Code5F2AC1
> Amount, Authorized (Binary)81C1
Merchant reference order5FE341O

Pre-Auth-Operation.

Note

  • C1 - Present if it is a CONFIRM_PRE_AUTH (0x0006) or UPDATE_PRE_AUTH (0x0008); optional for CANCEL_PRE_AUTH.
  • Remarks

    • 5FE303 - CM Transaction type CM Payment Transaction Types should be used only for CONFIRM_PRE_AUTH (0x0006), CANCEL_PRE_AUTH (0x0007) or UPDATE_PRE_AUTH (0x0008).

    • For UPDATE_PRE_AUTH amount has no restrictions.

    • For each pre-authorization operation request, the validity period will be checked. If the request refers to a transaction whose validity period has expired, the result code TRANSACTION_EXPIRED (0x0F02) will be returned.

Responses
ABORT
TRANSACTION COMPLETE

Possible responses to Pre-Auth-Operation.

Transaction Completion Dialog​

The dialog for the completion of the transaction consists of two messages TRANSACTION_RESULT (0320) and TRANSACTION_COMPLETE (03FF).

TRANSACTION_RESULT (0320)​

After all parties—the card, terminal, CM.com IPP Payments Platform, processor/acquirer, and issuer—have successfully authorized the financial transaction, the terminal sends a TransactionResult to the CM.com IPP Payments Platform to complete the transaction. It is important to mention that the final decision on the result code of the message lies with the card. A transaction is immutable upon the receipt of the TransactionResult by the CM.com IPP Payments Platform.

Tag NameTagEMVSwipe
Command identifier5FE000MM
Command result code5FE001MM
Transaction identifier5FE300MM
Amount entry7FE320MM
> Amount display string5FE321MM
> Transaction Currency Exponent5F36MM
> Transaction Currency Code5F2AMM
> Amount, Authorized (Binary)81MM
> Amount, Gratuity Authorised Amount5FE34CC1C1
Terminal Verification Results (TVR)95MO
Application Cryptogram9F26M-
Cryptogram Information Data9F27M-
Transaction Status Information (TSI)9BO-

TransactionResult

Note

  • C1 - Present if the transaction type, card and terminal capabilities, and the specific processes performed during the transaction are provided.

DELAYED TRANSACTION RESULT​

The Processor Style Protocol supports what is called a “delayed transaction result.” This feature allows the customer up to 24 hours between the messages AUTHORIZATION_REQUEST (0310) and TRANSACTION_RESULT (0320) to complete the transaction. Within this time frame, the messages are still considered part of the same transaction. If more than 24 hours elapse between the AUTHORIZATION_RESPONSE (0311) and the TRANSACTION_RESULT (0320) sent by the terminal, the transaction is aborted, sending an ABORT (FFFF) message with the result code TRANSACTION_EXPIRED (0x0f02) to the terminal.

This functionality is of particular interest to integrators whose solutions require waiting time between a successful AuthorizationResponse and the dispatch of goods or rendering of services. Additionally, it allows for recovery in case of connection drops.

To use the “delayed transaction result” functionality, please consult with the CM Product Team during onboarding to determine the best setup for the rules around its usage, based on the specific context.

Responses
TRANSACTION COMPLETE
ABORT

Possible Responses to a TransactionResult.

TRANSACTION_COMPLETE (03FF)​

The TransactionComplete message signals the final state and result of the transaction.

Tag NameTagM/O/C
Command identifier5FE000M
Command result code5FE001M
Transaction identifier5FE300M
Gateway Data7FE340O
> STAN5FE34AC1

TransactionComplete (The tags returned are identical, independent of it being an EMV or swipe transaction).

Note

General Messages​

General messages can be sent regardless of transaction phase. The Command result codes are described in the glossary: Command Result Codes

TRANSACTION_CANCEL (0301)​

With the TRANSACTION_CANCEL message the terminal can request the cancellation of a transaction that is still in progress. It must be sent before the transaction point of no return (immutable state).

Tag NameTagM/O/C
Command identifier5FE000M
Command result code5FE001M
EMV transaction date9AM
EMV transaction time9F21M
Amount entry7FE320M
>Amount display string5FE321M
>Transaction Currency Exponent5F36M
>Transaction Currency Code5F2AM
>Amount, Authorized (Binary)81M
Transaction identifier5FE300C1

TransactionCancel

Note

  • C1 - Mandatory if it is known. This tag can be received via two options:

    • It will be in the authorization response message received for the non cloud flow.

    • It is received in the initial transaction information for the cloud flow during the polling.

Possible Response
TRANSACTION COMPLETE
ABORT

Possible Responses to TransactionCancel.

ABORT (FFFF)​

In the event of an error, the CM.com IPP Payments Platform may send an ABORT message instead of the expected response message (e.g., AUTHORIZATION_RESPONSE, TRANSACTION_COMPLETE). The ABORT message can include various result codes (see Appendix A.2), but those relevant to the flow of this type of message are:

  • SERVER_BUSY (0x0f01) when a cancel is sent while the transaction is still pending an answer from the financial institutions in the payment chain. An abort message will be sent with the code SERVER_BUSY.

  • TRANSACTION_EXPIRED (0x0f02) when a TRANSACTION_CANCEL (0301) is sent too late for the transaction to be reversed.

  • SYSTEM_ERROR (0xffff) when an unexpected error occurs while handling the request.

Tag NameTagM/O/C
Command identifier5FE000M
Command result code5FE001M

Abort.

Printing Messages​

When receipt printing is supported by the device, using the printing dialog is strongly recommended. If an integrator decides to make use of the printing dialog, CM.com IPP Payments Platform strongly advises to make the printing messages part of the same session used by the terminal to execute the transaction.

CM.com IPP Payments Platform provides the PrintCommand message to integrators for each PrintRequest received.

The message contains all the tags and their values that are necessary to be printed on a receipt by the card.

In addition, the CM.com IPP Payments Platform provides integrators with formatted receipts through the constructed tag FORMATTED_RECEIPTS - 7fe506, which contains the sub-tag RECEIPT_FORMATTED_LINES - 7fe505 twice, within the PrintCommand message.

The first instance of the sub-tag represents the merchant receipt, while the second represents the cardholder receipt. This structure allows integrators to easily differentiate between receipts intended for the merchant and those for the cardholder. Each RECEIPT_FORMATTED_LINES - 7fe505 contains multiple RECEIPT_FORMATTED_LINE - 5fe505 tags. These multiple lines should be read in strict order to ensure that the header, content, and footer are in the correct sequence. This ordering is essential for properly formatted receipt output, with each section displayed in its intended position.

  • Merchant Receipt: is the first sub-tag RECEIPT_FORMATTED_LINES 7fe505. This receipt includes all necessary data elements required to ensure compliance.

  • Cardholder Receipt: is the second sub-tag RECEIPT_FORMATTED_LINES 7fe505. In specific scenarios, such as during a refund, the formatted cardholder receipt includes a designated area for the cardholder’s signature, as well as an indication that a signature is required. (The space is also included within the formatted lines).

Terminals must use the Transaction Options tag 5FE304 (instead of Transaction Type) to determine the receipt generation logic. The tag value controls signature line placement and refund line printing as follows:

  • Value 0x00 (NONE): No signature line is required.

  • Value 0x02 (REQUEST_SIGNATURE): A signature line is required, and specific refund line printing rules apply.

Receipt Generation Rules Based on Transaction Options (5FE304)​

Integrators using the print message to generate receipts must implement the following logic based on the 5FE304 value:

For Purchase Transactions:

  • If CVM performed is Signature, the CM.com IPP Payments Platform will send 5FE304 = 0x02.

  • When 5FE304 = 0x02, terminals must print the refund line in the Merchant Receipt.

For Refund Transactions:

  • The CM.com IPP Payments Platform will send 5FE304 = 0x02 for all refunds.

  • When 5FE304 = 0x02, terminals must print the refund line in the Cardholder Receipt.

  • The merchant is required to print and sign the cardholder’s receipt for refunds.

For integrators using CM formatted receipts, the signature line and refund line are already included in the appropriate receipt when the Transaction Options tag 5FE304 has a value of 0x02.

In all cases where a signature is required, integrators must print the receipt to comply with card scheme regulations.

Scenarios​

CHIP / CONTACTLESS

  • The CVM (Cardholder Verification Method) result requests Signature.

  • Example: CVM Result = 1E0000 → Signature required.

MAGSTRIPE

  • The transaction was performed using the magnetic stripe.

  • The Service Code does not indicate that a PIN is required.

  • Example: Service Code = 201 → Signature required.

This setup ensures that all necessary receipt data is consistently available to meet the standards. Integrators have the flexibility of creating their receipts using the tags shown in the PrintCommand or using directly the formatted receipts tag with the receipt already created.

Successful Print Flow

Unsuccessful Print Flow

To request for a specific receipt, the transaction identifier must be added to the PRINT_REQUEST. If the field Transaction identifier is omitted, the last receipt of the last transaction executed by CM.com IPP Payments Platform is returned. It is recommended to always send the transaction identifier, even if it is the last transaction.

If the terminal fails to connect during the last transaction attempt, the latest transaction recorded on the CM.com IPP Payments Platform will be from before this attempt.

Tag NameTagM/O/C
Command identifier5FE000M
Transaction identifier5FE300O

PrintRequest

Possible Response
PRINT_COMMAND
ABORT

Possible Responses to a PrintRequest.

Following the PRINT_REQUEST the CM.com IPP Payments Platform can send the receipt(s) to the terminal. The terminal can use this information to facilitate the receipt.

  1. Example Formatted Receipt.

Receipt Example

The PRINT_COMMAND contains all the necessary data for generating receipts, including the required tags and their corresponding values. This information can be used by the terminal to either print a physical receipt or display the relevant details.

It is strongly recommended to use this message for the creation of the receipt. The table below lists the tags to be included for the creation of the receipt.

Tag NameTagM/O/C
Command identifier5FE000M
Authorisation code89M
Language preference5F2DM
Merchant name and location9F4EM
Receipt footer5FE501M
Terminal identification9F1CM
Merchant identifier9F16M
Receipt Merchant Language5FE509M
Transaction options5FE304M
Merchant order reference5FE341M
App preferred name9F12M
PAN masked5FE314M
Point of service entry mode9F39M
Authorisation response code8AM
Transaction date9AM
Transaction time9F21M
Transaction identifier5FE300M
CM transaction type5FE303M
Transaction status5FE305M
Processor name5FE333M
Cvm results9F34C1
Terminal Verification Results95C1
Transaction sequence counter9f41M
Amount entry7FE320M
> Amount display string5FE321M
> Transaction currency code5F2AM
> Transaction currency exp5F36M
> Amount authorised binary81M
Transaction succeeded5fe30aM
Formatted receipts7fe506M
> Receipt formatted lines7fe505M
>> Receipt formatted line5fe505M
Receipt duplicated5FE502M
AID card4FC1
PAN sequence number5F34C1
Card sequence number5FE309C1
Issuer Identification Number42C2

PrintCommand

Note

  • C1 - Present if it was in the AUTHORIZATION_REQUEST.

  • C2 - Present if the transaction was done via magnetic stripe.

  • Special notes for the header and footer:

    • The receipt header must always include the merchant name (or merchant ‘doing business as name’), city, state/province and country.

    • Receipt header length: The maximum accepted is 64 characters.

    • Receipt footer length: The maximum accepted is 64 characters.

  • Remarks