PaymentService

创建充值订单

创建充值订单并返回支付跳转地址。

post/v1/console/payment/topup

Request body

amountMicrosstring

amount_micros 法币进路径:用户应付法币 micros(>0),按 internal_credit_rates 基础单价换算积分。与 credits/package_id 互斥。

creditsstring

credits 自定义路径:用户想要的积分数(>0)。与 amount_micros/package_id 互斥。

currencystring
packageIdstring

package_id 套餐路径:选定的充值套餐 id(>0)。与 amount_micros/credits 互斥。

providerstring

provider 支付渠道:alipay/wechat/stripe

returnUrlstring

return_url 用户支付完成/取消后浏览器回跳的前端页面地址(绝对 URL)。 Stripe Checkout 强制要求 success_url:前端应传本字段;为空时后端按 public_base_url 兜底。

Response

OK

payModestring

pay_mode 支付交互方式:redirect=跳转 pay_url(支付宝网页/Stripe Checkout) qrcode=pay_url 是二维码内容(微信 Native 的 weixin://wxpay/...),前端渲染二维码扫码支付。

payUrlstring

pay_url 支付载荷:pay_mode=redirect 时前端跳转;pay_mode=qrcode 时前端渲染二维码。

Changes

No recorded changes to this endpoint across all 1 revision of this API.