Chuyển đến nội dung chính
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>"
}

Ủy quyền

Authorization
string
header
bắt buộc

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

Tiêu đề

Idempotency-Key
string

Nội dung

application/json
productType
enum<string>
bắt buộc
Tùy chọn có sẵn:
subscription,
topup
quantity
integer
bắt buộc
Phạm vi bắt buộc: x <= 9007199254740991
platform
enum<string>
mặc định:api
bắt buộc
Tùy chọn có sẵn:
web,
desktop,
cli,
sdk,
api
cycle
enum<string>
Tùy chọn có sẵn:
monthly,
yearly

Phản hồi

200 - application/json

Checkout session

url
string<uri>
bắt buộc
sessionId
string
bắt buộc