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

# submit.php 跳转收银台

> 使用 Epay 兼容 submit.php 端点完成浏览器跳转收银台。

`/epay/submit.php` 是面向浏览器的 Epay 兼容端点。它会创建或复用 Kyren 订单，并返回 HTTP `302` 到 `/epay/redirect/{orderId}` 或上游支付页面。

当客户浏览器需要跳转到收银台时使用此路径。该端点使用 `pid + sign`，不使用 `x-api-key`，终端用户浏览器访问不需要商户服务器 IP 白名单。

## 参数

必填参数：

| 参数             | 说明                                                          |
| -------------- | ----------------------------------------------------------- |
| `pid`          | Kyren 发放的商户 Epay 兼容商户 ID。                                   |
| `type`         | 支付类型。支持值包括 `alipay`、`wxpay`、`creditcard`、`crypto`、`paynow`。 |
| `out_trade_no` | 你的商户订单号。                                                    |
| `notify_url`   | 商户支付结果通知 URL。                                               |
| `return_url`   | 收银台结束后的浏览器返回 URL。                                           |
| `name`         | 订单或商品名称。                                                    |
| `money`        | 十进制字符串金额，例如 `"9.99"`。                                       |
| `sign`         | Epay 兼容 MD5 签名。                                             |
| `sign_type`    | 签名类型，通常为 `MD5`。                                             |

可选参数：

| 参数                      | 说明                      |
| ----------------------- | ----------------------- |
| `money_type`            | 你的现有集成传入的币种或金额类型。       |
| `display_merchant_name` | 本次支付在 Kyren 中间页展示的商户名称。 |
| `param`                 | 商户透传元数据，会在通知中返回。        |

## 表单示例

```html theme={null}
<form method="post" action="https://api.kyren.top/epay/submit.php">
  <input type="hidden" name="pid" value="10001" />
  <input type="hidden" name="type" value="alipay" />
  <input type="hidden" name="out_trade_no" value="ORDER_10001" />
  <input type="hidden" name="notify_url" value="https://merchant.example.com/notify" />
  <input type="hidden" name="return_url" value="https://merchant.example.com/return" />
  <input type="hidden" name="name" value="AI credits" />
  <input type="hidden" name="money" value="9.99" />
  <input type="hidden" name="display_merchant_name" value="Campaign Store" />
  <input type="hidden" name="param" value="account_123" />
  <input type="hidden" name="sign" value="lowercase_md5_signature" />
  <input type="hidden" name="sign_type" value="MD5" />
  <button type="submit">Pay</button>
</form>
```

## 通知处理

付款完成后，Kyren 会向 `notify_url` 发起 GET 请求，包含：

`pid`、`trade_no`、`out_trade_no`、`type`、`name`、`money`、`trade_status`、`param`、`sign`、`sign_type`。

校验签名，幂等处理结果，然后返回纯文本：

```text theme={null}
success
```

查看 [Epay MD5 签名](/zh/epay-migration/signature)和 [`submit.php` API 参考](/api-reference/epay-compatibility/submitphp-redirect-checkout-compatibility-endpoint)。
