A Terminal API diagnosis request lets you verify the condition of a payment terminal and its components such as the communication module, the battery, or the built-in printer.
If you have a Mobile SDK solution using mobile devices instead of payment terminals, a diagnosis request lets you check the security of a device.
In both cases a diagnosis request also gives information about any offline payments that have not been sent to Adyen yet.
Depending on your integration, see:
Requirements
Before you begin, take into account the following requirements and limitations.
| Requirement | Description |
|---|---|
| Integration type | Supported with:
|
| Limitations | Not supported with a Mobile Payments app solution. |
Diagnose a payment terminal
The diagnosis request supports you in business critical processes, because the response includes:
batteryLevel: This parameter is included for battery-powered terminals, and shows the battery charge level. You can use this information to let your staff know they need to recharge the terminal soon. For guidelines regarding terminal battery usage, see Manage battery power.unconfirmedBatchCount: The number of payments that the terminal has not been able to send to the Adyen host for completion (capture and settlement). AnunconfirmedBatchCountgreater than 0 (zero) indicates there is possibly a problem with your network.
Diagnosing a payment terminal is best done in two steps:
- First check the condition of the terminal.
- Then, if the
unconfirmedBatchCountis greater than 0 (zero), check if the Adyen host system is reachable.
1. Verify the condition of a terminal
To check the condition of a payment terminal:
-
Make a POST Terminal API request, specifying:
-
The standard
SaleToPOIRequest.MessageHeaderobject, withMessageClassset to Service andMessageCategoryset to Diagnosis.Parameter Required Description ProtocolVersion
3.0 MessageClass
Service MessageCategory
Diagnosis MessageType
Request ServiceID
Your unique ID for this request, consisting of 1-10 alphanumeric characters. Must be unique within the last 48 hours for the terminal ( POIID) being used.SaleID
Your unique ID for the POS system component to send this request from. POIID
The unique ID of the terminal to send this request to. Format: [device model]-[serial number].
-
The DiagnosisRequest body, including:
Parameter Required Description HostDiagnosisFlagInitially set the value to false.
You only need to set the value to true for further diagnosis when the initial response includes anunconfirmedBatchCountgreater than zero. This is explained in 2. Verify that the Adyen host system is reachable.
-
-
Use the following parts of the response to check the condition of the terminal:
-
The
POIStatusobject:Parameter Description GlobalStatusThe condition of the payment terminal. CommunicationOKFlagA Boolean that indicates whether the general condition of the communication module is OK. PrinterStatusThis parameter is included when the payment terminal has a built-in printer, and indicates the condition of the printer module. NoPaper indicates the receipt paper roll is missing or the paper is not sticking out. -
The
Response.AdditionalResponsestring of key-value pairs separated by &:Parameter Description batteryLevelThis parameter is included for battery-powered terminals, and indicates the battery charge level as a percentage of fully charged. unconfirmedBatchCountThe number of payments that the terminal has not yet sent for completion to our platform, and thus cannot be settled. firmwareVersionThe software version that the terminal is on. networkProfileA Base64 string. Decode this to see the IP address of the terminal and other network data. merchantAccountThe merchant account that the diagnosed payment terminal is assigned to. terminalIdThe POIID of the diagnosed payment terminal, in the format [device model]-[serial number]. storeIdThe store that the diagnosed payment terminal is assigned to. tamperStatusThis parameter only applies to UX300 and UX410 terminals. The value ARS_TRIGGERED indicates that anti-removal switches (ARS) have been triggered. This means you must stop using the terminal immediately. -
If the terminal uses Point-to-Point Encryption (P2PE) instead of Adyen End-to-End Encryption (E2EE),
Response.AdditionalResponsealso includes the following parameters:The diagnosis response includes P2PE protocol, SRED, vault, and app manager versions as provided by the hardware manufacturer. You need to specify this data in your annual PCI assessment.
Parameter Description p2peFirmwareVersionNumberThe version number of the P2PE software managed and used by Adyen. p2peOpenProtocolVersionThe version of the open protocol application. p2peSREDVersionThe version of the Secure Reading and Exchange of Data (SRED) functionality. p2peVaultVersionThe version of the vault. p2peAppManagerVersionThe version of the app manager.
-
-
In the
AdditionalResponsecheck the value of theunconfirmedBatchCount. This should be 0 (zero). If not, there may be a problem with your network.
If theunconfirmedBatchCountis greater than 0, proceed to step 2: Verify that the Adyen host system is reachable.
2. Verify that the Adyen host system is reachable
If the diagnosis response shows an unconfirmedBatchCount greater than 0 (zero), there may be a problem with your network. To check if this is the case:
-
Make another diagnosis request as described under 1. Verify the condition of a terminal, but this time set
DiagnosisRequest.HostDiagnosisFlagto true. A communication test will try to reach the Adyen host system. -
In the response, check the
HostStatusarray:Parameter Description IsReachableFlagA Boolean that indicates if the Adyen host system was reached. If the Adyen host system could not be reached, you may need to adjust your firewall settings or other network aspects.
Diagnose a Mobile SDK solution
In a Mobile SDK solution, the Terminal API diagnosis request enables you to do the following:
-
Check if there are stored offline payments that have not been forwarded to Adyen yet. If the request has
hostDiagnosisFlagset to true, the SDK will try to go online and forward these transactions.Diagnosis of offline payments is only included if your Mobile SDK solution supports Store and Forward offline payments.
-
Check for security threats that would block transactions. If threats are detected that an operator can solve, the response includes information about the cause and solution of the problem.
-
Check the expiry date of the Android or iOS SDK that is used on the mobile device. Transactions will be blocked if mandatory updates are not carried out.
Proceed as follows:
-
Make a Terminal API diagnosis request with:
-
SaleToPOIRequest.MessageHeader: The standardMessageHeaderobject, with the following parameters.Parameter Required Description ProtocolVersion
3.0 MessageClass
Service MessageCategory
Diagnosis MessageType
Request ServiceID
Your unique ID for this request, consisting of 1-10 alphanumeric characters. Must be unique within the last 48 hours for the terminal ( POIID) being used.SaleID
Your unique ID for the POS system component to send this request from. POIID
The installation ID of the SDK, for example AC2ABBE8-EDD8-4E2B-AF45-8770FA2347DC.924. -
DiagnosisRequest: The request body. This must include:
Parameter Description HostDiagnosisFlagSet the value to true so that the SDK will try to connect to Adyen for a security scan and to forward any stored offline transactions. If you set this field to false, the SDK will not connect to Adyen.
-
-
In the response, check the following:
-
The
HostStatusarray:Parameter Description IsReachableFlagA Boolean that indicates if the Adyen host system was reached. -
The
Response.AdditionalResponsestring of key-value pairs separated by &:Parameter Description sdkExpiryThe date and time in UTC format when the installed Mobile SDK version expires. terminalIdThe installation ID of the Mobile SDK. unconfirmedBatchCountThe number of stored transactions that have not been forwarded to the Adyen payments platform yet. storeAndForwardStatusA Base64-encoded string with more information about offline transactions. attestationStatusA Base64-encoded string with information about any security issues.
-
-
If present, Base64-decode the
storeAndForwardStatusvalue. The resulting JSON object can include:Parameter Type Description availableBoolean Indicates if transactions are accepted offline when the internet connectivity drops. activeBoolean Indicates if the mobile device is currently offline. expiresAtstring The date and time in UTC format when offline payments are no longer possible if the mobile device cannot go online to let the Adyen payments platform attest the security of the device. forwardAttemptStatusstring Shows what happened when the SDK tried to forward stored offline transactions. Possible values: Success, Connectivity failure, Other failure. -
Base64-decode the
attestationStatusvalue. The resulting JSON object can include:Parameter Type Description statusstring The overall result of checking the security of the mobile device. Possible values: - Valid: the mobile device is secure.
- Rejected: a threat was detected.
- Failed: could not attest the security of the device. This can be caused by a loss of internet connectivity.
- Expired: an attestation token has expired. Retry the diagnosis request with
HostDiagnosisFlagset to true when the internet connectivity is restored.
selfResolvableIssuesBoolean If true, one or more of the detected issues can be solved by the end user, and a resolvableIssuesarray is included with the details.resolvableIssuesarray, string A list of detected problems. Each array item consists of: name: a short description of the problem.message: a more detailed description of the problem and what the user could do to solve the problem.
Failed diagnosis request
When the payment terminal or mobile SDK is already processing another request, the diagnosis request fails. You receive a DiagnosisResponse object with:
Response.Result: FailureResponse.ErrorCondition: Busy