> ## 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.

# Merchant Present Mode (MPM)

> API guide for Merchant Present Mode (MPM) dynamic QR payments.

<Frame>
  <img src="https://mintcdn.com/qfpay-8e347952/nhPCT07_mu66i7Fi/images/in-store/mpm_flow_en.jpeg?fit=max&auto=format&n=nhPCT07_mu66i7Fi&q=85&s=f9847b24d279acdfe69f3fcf3325ef72" alt="MPM process-flow" width="1181" height="1363" data-path="images/in-store/mpm_flow_en.jpeg" />
</Frame>

## MPM API Request

**Endpoint** : `/trade/v1/payment`\
**Method** : `POST`

***

### Supported PayTypes

| PayType | Description                            |
| ------- | -------------------------------------- |
| 800101  | Alipay MPM (Overseas Merchants)        |
| 801501  | Alipay MPM (HK Merchants)              |
| 800201  | WeChat MPM (Overseas & HK Merchants)   |
| 805801  | PayMe MPM (HK Merchants)               |
| 800701  | UNIONPAY Quick Pass MPM                |
| 802001  | FPS MPM (HK Merchants)                 |
| 803701  | Octopus Dynamic QRC MPM (HK Merchants) |

***

### Scenario

The merchant generates a dynamic QR code based on Alipay or WeChat Pay protocol and displays it for the customer to scan. Customers complete the payment by scanning the QR code using their wallets.

This applies to:

* Offline POS environments
* Online browser-initiated flows

<Tip>
  Refer to [Signature Generation](/integration/preparation/authentication-and-signature) for signing instructions.
</Tip>

***

## Example Request

```http 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
```

***

## Example Response

```json 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": ""
}
```

***

## Request Parameters

| Field                                                          | Required | Type       | Description                                                              |
| -------------------------------------------------------------- | -------- | ---------- | ------------------------------------------------------------------------ |
| [Common Parameters](/integration/api-reference/request-format) | —        | —          | Common fields like `mchid`, `txamt`, etc.                                |
| `pay_tag`                                                      | No       | String(16) | Wallet specifier. Default: `ALIPAYHK`. Mainland Alipay: `ALIPAYCN`       |
| `expired_time`                                                 | No       | String(3)  | QR code expiry in minutes (5–120). Default is 30. Only for WeChat/Alipay |
| `limit_pay`                                                    | No       | String     | Use `no_credit` to disable credit cards. Applicable to CN wallets only   |

***

## Response Parameters

| Field                                                           | Type        | Description                                |
| --------------------------------------------------------------- | ----------- | ------------------------------------------ |
| `qrcode`                                                        | String(512) | Generated QR code URL                      |
| [Common Parameters](/integration/api-reference/response-format) | —           | Common fields like `respcd`, `syssn`, etc. |
