订阅扣款后台

订单数{{ dashboard.orders || 0 }}
有效订阅{{ dashboard.activeSubscriptions || 0 }}
逾期订阅{{ dashboard.pastDueSubscriptions || 0 }}
失败扣款{{ dashboard.failedCharges || 0 }}
月经常收入{{ dashboard.monthlyRevenue || '0' }}
后台自定义金额不能突破用户钱包 approve 额度;超过额度时链上扣款会失败。
暂无订阅记录
ID 用户钱包 商品 代币 月扣款 最大授权 下次扣款 状态 操作
{{ item.id }} {{ short(item.wallet) }} {{ item.product }}
{{ item.spec }}
{{ item.token }} {{ item.monthlyAmount }} {{ item.maxChargeAmount }} {{ item.nextChargeAt }} {{ item.status }}
暂无商品
SKU商品展示价月扣款状态更新时间操作
{{ item.sku }} {{ item.name }}
{{ item.spec }}
¥{{ item.displayPriceCny }} {{ item.monthlyPriceUsdt }} {{ item.token }} {{ item.active ? 'active' : 'disabled' }} {{ item.updatedAt }}

链上配置

保存后前端 `/api/config` 会立即读取新配置,不需要重启服务。扣款 worker 也会读取这里的 RPC 和订阅合约地址。

手动扣款

说明:后台会创建扣款队列。若服务器配置了 CHARGER_PRIVATE_KEY,会自动发起链上 charge;否则只记录 queued,等待你配置私钥后 worker 处理。

暂无订单记录
订单号钱包商品订阅收货人状态时间
{{ item.orderNo }} {{ short(item.wallet) }}
{{ item.walletProvider }}
{{ item.product }}
{{ item.spec }}
{{ item.monthlyAmount }} {{ item.token }} / 月
授权 {{ item.allowanceAmount }} · {{ item.months }} 月
{{ item.shipName }}
{{ item.shipPhone }}
{{ item.status }} {{ item.createdAt }}
暂无扣款日志
ID订阅状态交易消息时间
{{ item.id }} #{{ item.subscriptionId }} {{ item.status }} {{ short(item.txHash) }} {{ item.message }} {{ item.createdAt }}
暂无审计日志
ID动作目标内容时间
{{ item.id }} {{ item.action }} {{ item.targetType }} #{{ item.targetId }} {{ item.payload }} {{ item.createdAt }}

编辑订阅 #{{ current.id }}

商用规则:后台只能在用户最初授权额度内调整月扣款,不能提高用户授权上限。需要涨价超过上限时,让用户重新授权。

编辑商品价格

这里修改后,前端商品展示价格和订阅弹窗月扣款会从后端同步读取。