Skip to content
Closed
2 changes: 1 addition & 1 deletion README.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ docker run --name new-api -d --restart always \

### 💰 Paiement et facturation

- ✅ Recharge en ligne (EPay, Stripe)
- ✅ Recharge en ligne (EPay, Stripe, AllScale)
- ✅ Tarification des modèles de paiement à l'utilisation
- ✅ Prise en charge de la facturation du cache (OpenAI, Azure, DeepSeek, Claude, Qwen et tous les modèles pris en charge)
- ✅ Configuration flexible des politiques de facturation
Expand Down
2 changes: 1 addition & 1 deletion README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ docker run --name new-api -d --restart always \

### 💰 支払いと課金

- ✅ オンライン充電(EPay、Stripe)
- ✅ オンライン充電(EPay、Stripe、AllScale
- ✅ モデルの従量課金
- ✅ キャッシュ課金サポート(OpenAI、Azure、DeepSeek、Claude、Qwenなどすべてのサポートされているモデル)
- ✅ 柔軟な課金ポリシー設定
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ docker run --name new-api -d --restart always \

### 💰 Payment and Billing

- ✅ Online recharge (EPay, Stripe)
- ✅ Online recharge (EPay, Stripe, AllScale)
- ✅ Pay-per-use model pricing
- ✅ Cache billing support (OpenAI, Azure, DeepSeek, Claude, Qwen and all supported models)
- ✅ Flexible billing policy configuration
Expand Down
2 changes: 1 addition & 1 deletion README.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ docker run --name new-api -d --restart always \

### 💰 支付与计费

- ✅ 在线充值(易支付、Stripe)
- ✅ 在线充值(易支付、Stripe、AllScale
- ✅ 模型按次数收费
- ✅ 缓存计费支持(OpenAI、Azure、DeepSeek、Claude、Qwen等所有支持的模型)
- ✅ 灵活的计费策略配置
Expand Down
2 changes: 1 addition & 1 deletion README.zh_TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ docker run --name new-api -d --restart always \

### 💰 支付與計費

- ✅ 在線儲值(易支付、Stripe)
- ✅ 在線儲值(易支付、Stripe、AllScale
- ✅ 模型按次數收費
- ✅ 快取計費支援(OpenAI、Azure、DeepSeek、Claude、Qwen等所有支援的模型)
- ✅ 靈活的計費策略配置
Expand Down
26 changes: 15 additions & 11 deletions controller/topup.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,24 +78,28 @@ func GetTopUpInfo(c *gin.Context) {
}
}

enableAllScale := setting.AllScaleEnabled && setting.AllScaleApiKey != "" && setting.AllScaleApiSecret != ""

data := gin.H{
"enable_online_topup": operation_setting.PayAddress != "" && operation_setting.EpayId != "" && operation_setting.EpayKey != "",
"enable_stripe_topup": setting.StripeApiSecret != "" && setting.StripeWebhookSecret != "" && setting.StripePriceId != "",
"enable_creem_topup": setting.CreemApiKey != "" && setting.CreemProducts != "[]",
"enable_waffo_topup": enableWaffo,
"enable_online_topup": operation_setting.PayAddress != "" && operation_setting.EpayId != "" && operation_setting.EpayKey != "",
"enable_stripe_topup": setting.StripeApiSecret != "" && setting.StripeWebhookSecret != "" && setting.StripePriceId != "",
"enable_creem_topup": setting.CreemApiKey != "" && setting.CreemProducts != "[]",
"enable_waffo_topup": enableWaffo,
"enable_allscale_topup": enableAllScale,
"waffo_pay_methods": func() interface{} {
if enableWaffo {
return setting.GetWaffoPayMethods()
}
return nil
}(),
"creem_products": setting.CreemProducts,
"pay_methods": payMethods,
"min_topup": operation_setting.MinTopUp,
"stripe_min_topup": setting.StripeMinTopUp,
"waffo_min_topup": setting.WaffoMinTopUp,
"amount_options": operation_setting.GetPaymentSetting().AmountOptions,
"discount": operation_setting.GetPaymentSetting().AmountDiscount,
"creem_products": setting.CreemProducts,
"pay_methods": payMethods,
"min_topup": operation_setting.MinTopUp,
"stripe_min_topup": setting.StripeMinTopUp,
"waffo_min_topup": setting.WaffoMinTopUp,
"allscale_min_topup": setting.AllScaleMinTopUp,
"amount_options": operation_setting.GetPaymentSetting().AmountOptions,
"discount": operation_setting.GetPaymentSetting().AmountDiscount,
}
common.ApiSuccess(c, data)
}
Expand Down
Loading