> ## Documentation Index
> Fetch the complete documentation index at: https://devzone.nayax.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 显示屏

> 控制终端的视觉界面，向客户显示自定义消息。

`displayScreen` 方法允许客户端应用程序(POS/FCC)控制终端的显示屏。通过显示不属于标准支付流程的状态更新、操作说明或自定义提醒,帮助引导客户完成加油流程。

使用此方法可以：

* 向顾客提供工作流程说明，例如“请提起把手”或“插入加油枪”。
* 告知用户系统状态更新，例如“4号泵已授权”或“水箱已满”。
* 如果泵端出现问题，则显示本地化或自定义错误消息。
* 在空闲时间显示自定义欢迎信息或促销文字，以强化品牌形象。

Nayax 设备上的显示提示示例：

![](https://mintcdn.com/nayax-44d6e37b/yeBOHTTwlm5bRLCx/images/start-fueling.png?fit=max\&auto=format\&n=yeBOHTTwlm5bRLCx\&q=85\&s=60907e34530fb78bc47c50724386475e)

![](https://mintcdn.com/nayax-44d6e37b/yeBOHTTwlm5bRLCx/images/fueling-in-progress.png?fit=max\&auto=format\&n=yeBOHTTwlm5bRLCx\&q=85\&s=6781a86df52f816e2bd66d32512509e9)

![](https://mintcdn.com/nayax-44d6e37b/Eugt9jmKRTFJAUVK/images/approved.png?fit=max\&auto=format\&n=Eugt9jmKRTFJAUVK\&q=85\&s=e305c638c2fdcfa906a263946d5405ac)

![](https://mintcdn.com/nayax-44d6e37b/Eugt9jmKRTFJAUVK/images/declined.png?fit=max\&auto=format\&n=Eugt9jmKRTFJAUVK\&q=85\&s=0ac78a8cb31e0fd86b3d5aa716002ec9)

## 请求

所有请求都必须包含 `command`、`requestId` 以及您希望显示的具体文本内容。

以下示例展示了一个典型的请求：

```json theme={null}
{
"command": "displayScreen",
"requestId": "req-007",
"data": {
"title": "Welcome",
"line1": "Ready to Process Payment",
"line2": "Please select payment method",
"textColor": "WHITE",
"alignmentHor": "CENTER",
"alignmentVer": "TOP",
"mediaId": "idle",
"fitImage": "FULL",
"loop": false
}
}
```

### 参数定义

下表描述了此请求可用的参数：

| 姓名 | 类型 | 必需的 | 描述 |
| :- | :- | :- | :- |
| 命令 | string | 是的 | 设置为`"displayScreen"`。 |
| 请求 ID | string | 是的 | 用于跟踪响应的唯一标识符。 |
| 文本 | string | 是的 | 终端屏幕上将显示的消息。 |
| 暂停 | 整数 | 不 | 消息在返回默认屏幕之前应保持可见的持续时间（以秒为单位）。 |

## 回应

终端在屏幕更新为请求的文本后，会返回一个简单的确认信息。

以下示例展示了一个典型的响应：

```json theme={null}
{
"requestId": "req-007"
}
```

### 响应参数

该响应确认终端已处理视觉更新：

| 姓名 | 类型 | 描述 |
| :- | :- | :- |
| 请求 ID | string | 返回原始请求的唯一标识符。 |
| **status** | string | 如果消息成功显示在屏幕上,则返回 `SUCCESS`。 |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.