跳转到主要内容
POST
/
user
/
purchase-topup
购买充值
curl --request POST \
  --url https://api.olostep.com/user/purchase-topup \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "credits": 10000
}
'
{
  "success": true,
  "payment_intent_id": "pi_xxx",
  "credits": 10000
}
credits 必须是以下之一: 100002000080000100000 — 即 10K20K80K100K 积分。
有关指导概述,请参阅余额与账单

授权

Authorization
string
header
必填

Bearer认证头格式为Bearer ,其中是你的认证令牌。

请求体

application/json
credits
enum<integer>
必填

要购买的信用数量。允许的值:10,00020,00080,000100,000

可用选项:
10000,
20000,
80000,
100000

响应

支付成功。

success
enum<boolean>
可用选项:
true
payment_intent_id
string

此次收费的 Stripe PaymentIntent id。

credits
integer

此请求中购买的信用。