> ## 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 redirect checkout

> Use the Epay-compatible submit.php endpoint for browser redirect checkout.

`/epay/submit.php` is the browser-oriented Epay compatibility endpoint. It creates or reuses a Kyren order and returns HTTP `302` to `/epay/redirect/{orderId}` or an upstream payment page.

Use this path when the customer browser is redirected to checkout. It uses `pid + sign`, not `x-api-key`, and end-user browser visits do not require a merchant server IP allowlist.

## Parameters

Required parameters:

| Parameter      | Description                                                                                     |
| -------------- | ----------------------------------------------------------------------------------------------- |
| `pid`          | Kyren-issued merchant Epay-compatible merchant ID.                                              |
| `type`         | Payment type. Supported values include `alipay`, `wxpay`, `creditcard`, `crypto`, and `paynow`. |
| `out_trade_no` | Your merchant order number.                                                                     |
| `notify_url`   | Merchant payment result notification URL.                                                       |
| `return_url`   | Browser return URL after checkout.                                                              |
| `name`         | Order or product name.                                                                          |
| `money`        | Decimal string amount, for example `"9.99"`.                                                    |
| `sign`         | Epay-compatible MD5 signature.                                                                  |
| `sign_type`    | Signature type, usually `MD5`.                                                                  |

Optional parameters:

| Parameter               | Description                                                                  |
| ----------------------- | ---------------------------------------------------------------------------- |
| `money_type`            | Currency or money type if provided by your existing integration.             |
| `display_merchant_name` | Per-payment merchant display name shown on Kyren intermediate payment pages. |
| `param`                 | Passthrough merchant metadata returned in notifications.                     |

## Example form

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

## Notification handling

After payment completes, Kyren sends a GET request to `notify_url` with:

`pid`, `trade_no`, `out_trade_no`, `type`, `name`, `money`, `trade_status`, `param`, `sign`, and `sign_type`.

Verify the signature, process the result idempotently, then return the plain string:

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

See [Epay MD5 signature](/epay-migration/signature) and the [`submit.php` API reference](/api-reference/epay-compatibility/submitphp-redirect-checkout-compatibility-endpoint).
