跳转到主要内容
POST
开通月票

授权

Authorization
string
header
必填

通过 Authorization 请求头传入合作方 API Key:Authorization: Bearer ak_live_... (云端沙箱使用 ak_test_...,局域网本地直连使用 ak_local_...)。

请求头

Idempotency-Key
string<uuid>

所有写接口强烈建议传入的唯一 UUID,用于在网络超时场景下安全重试而不重复执行。

示例:

"550e8400-e29b-41d4-a716-446655440000"

请求体

application/json
facilityId
string
必填

合作方授权范围下的唯一停车场对外编码标识。

示例:

"MY-KL-001"

planId
string
必填
credentials
object[]
必填
Minimum array length: 1
holder
object
必填
startDate
string<date>
必填
endDate
string<date>
必填
allocatedBays
integer
默认值:1

该月票允许同时停在场内的最大并发车辆数。

必填范围: x >= 1
assignedBayNumbers
string[]
paidAmount
object
paymentMethod
enum<string>

泛化资金支付方式枚举;具体钱包或支付渠道名称请通过可选字段 paymentProvider(如 stripe、apple_pay、tng)透传。

可用选项:
CARD,
DIGITAL_WALLET,
BANK_TRANSFER,
CASH,
STORED_VALUE,
OTHER
externalOrderId
string
metadata
object

扁平键值对合作方业务关联元数据(最多 10 个 Key,值仅限字符串)。

响应

月票开通成功。

subscription
object
必填