---
title: "Create Payment"
method: POST
path: "/api/v1/payment/create"
tags: ["payment"]
---

# Create Payment

`POST /api/v1/payment/create`

## Request

- Base URL: `https://api.ticktest.cn` (the document declares no server; this is the origin it was published from)
- URL: `https://api.ticktest.cn/api/v1/payment/create`
- Auth: none declared

创建支付宝 AI 收支付订单（电脑网站支付）。
返回支付 HTML 表单，前端需渲染并自动提交。

支付宝注册地址: https://api.ticktest.cn/v1/backtest
支付完成后通过 notify_url 自动回调充值。

## Request body

- PaymentRequest: 支付创建请求 — 需绑定回测参数
  - `symbol` string, required: 股票代码，如 sz000001
  - `strategy` string, required: 策略描述，如 MA5上穿MA20买入
  - `start_date` string: 回测开始日期
  - `end_date` string: 回测结束日期
  - `out_trade_no` string, nullable: 商户订单号（自动生成）
  - `total_amount` string: 订单金额
  - `subject` string, nullable: 订单标题

## Response `200`

Successful Response

- CreatePaymentResponse
  - `status` string, required
  - `out_trade_no` string, nullable
  - `amount` string, nullable
  - `payment_form` string, nullable: 支付宝支付 HTML 表单
  - `message` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/ticktest/apis/ticktest-api.md) · [All operations](https://skmtc.dev/ticktest/apis/ticktest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ticktest/apis/ticktest-api/revisions/3e6d69d0eb1e?raw)
