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

# 商戶出示碼模式（正掃）(MPM)

<Frame>
  <img src="https://mintcdn.com/qfpay-8e347952/Z1AddYlWO-nm9608/zh-hant/images/in-store/mpm_flow_chin.jpeg?fit=max&auto=format&n=Z1AddYlWO-nm9608&q=85&s=b5d573b52a6f8311ba43b4d8e332950d" alt="MPM Flow" width="1121" height="1126" data-path="zh-hant/images/in-store/mpm_flow_chin.jpeg" />
</Frame>

## 什麼是 MPM？

MPM（Merchant Presented Mode）指**商戶出示付款碼**，由顧客掃描完成付款。

典型流程：

1. 商戶系統產生動態 QR Code
2. 將 QR Code 展示於 POS / 收銀畫面
3. 顧客使用電子錢包掃描
4. 交易完成後系統回傳結果

此模式適用於：

* 線下實體門店
* 線上頁面啟動付款（展示 QR Code 供掃描）

***

## MPM API 請求

* **端點**：`/trade/v1/payment`
* **方法**：`POST`

***

## 支援的支付類型（PayType）

| 編碼     | 說明                 |
| ------ | ------------------ |
| 800101 | 支付寶跨境線下掃碼支付        |
| 801501 | 支付寶線上掃碼支付（香港商戶）    |
| 800201 | 微信掃碼支付             |
| 805801 | PayMe 掃碼支付         |
| 800701 | 銀聯雲閃付掃碼支付          |
| 802001 | 香港轉數快掃碼支付          |
| 803701 | 八達通動態二維碼掃碼支付（香港商戶） |

<Tip>
  簽名生成方式請參考 [簽名生成](/zh-hant/integration/preparation/authentication-and-signature)
</Tip>

***

## 請求範例

```http theme={null}
POST /trade/v1/payment HTTP/1.1
Content-Type: application/x-www-form-urlencoded
X-QF-APPCODE: A6A49A66B4C********94EA95032
X-QF-SIGN: 3b020a6349646684ebeeb0ec2cd3d1fb

expired_time=10&goods_name=qfpay&limit_pay=no_credit&mchid=R1zQrTdJnn&out_trade_no=Native20190722145741431794b8d1&pay_type=800201&txamt=20&txcurrcd=HKD&txdtm=2019-07-22 14:57:42&udid=AA
```

***

## 回應範例

```json theme={null}
{
  "surcharge_fee": 0,
  "qrcode": "https://qr.alipay.com/bax03190uxd47wbekffy6033",
  "pay_type": "800101",
  "surcharge_rate": 0,
  "resperr": "success",
  "txdtm": "2020-04-23 11:09:24",
  "out_trade_no": "364ZK6BAJGYHMU3TUX0X7MGIGQL4O8KI",
  "syssn": "20200423066200020000976054",
  "sysdtm": "2020-04-23 11:09:27",
  "txcurrcd": "EUR",
  "respmsg": "",
  "chnlsn2": "",
  "cardcd": "",
  "udid": "qiantai2",
  "txamt": "1",
  "respcd": "0000",
  "chnlsn": ""
}
```

***

## 請求參數

| 欄位                                                          | 必填 | 類型         | 說明                                                     |
| ----------------------------------------------------------- | -- | ---------- | ------------------------------------------------------ |
| [通用請求參數](/zh-hant/integration/api-reference/request-format) | —  | —          | 通用欄位，例如 `mchid`、`txamt`、`txcurrcd`、`out_trade_no` 等    |
| `pay_tag`                                                   | 否  | String(16) | 錢包標示。預設 `ALIPAYHK`，中國大陸使用者為 `ALIPAYCN`                 |
| `expired_time`                                              | 否  | String(3)  | QR 碼有效時間（單位：分鐘，範圍 5–120）。預設 30 分鐘。僅適用於 Alipay / WeChat |
| `limit_pay`                                                 | 否  | String     | 設為 `no_credit` 可禁用信用卡付款（僅適用於中國大陸錢包）                    |

***

## 回應參數

| 欄位                                                           | 類型          | 說明                                |
| ------------------------------------------------------------ | ----------- | --------------------------------- |
| `qrcode`                                                     | String(512) | 生成的 QR Code 連結                    |
| [通用回應格式](/zh-hant/integration/api-reference/response-format) | —           | 包含 `respcd`、`syssn`、`respmsg` 等欄位 |
