跳转到主要内容
POST
/
billing
/
checkout
Create a billing checkout session
curl --request POST \
  --url https://api.youka.io/api/v1/billing/checkout \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "productType": "subscription",
  "quantity": 123,
  "platform": "api",
  "cycle": "monthly"
}
'
{
  "url": "<string>",
  "sessionId": "<string>"
}

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求头

Idempotency-Key
string

请求体

application/json
productType
enum<string>
必填
可用选项:
subscription,
topup
quantity
integer
必填
必填范围: x <= 9007199254740991
platform
enum<string>
默认值:api
必填
可用选项:
web,
desktop,
cli,
sdk,
api
cycle
enum<string>
可用选项:
monthly,
yearly

响应

200 - application/json

Checkout session

url
string<uri>
必填
sessionId
string
必填