Proxy-seller

自动充值

Updated:

自动充值:当余额低于阈值时,系统将从已保存的支付方式中扣除配置的金额。支持以下地区:仅限 API v2 — 没有 v1 版本。

需要在服务器上启用此功能。如果该功能处于关闭状态,两个端点都会返回Auto top-up is not available.

终点:

此请求将返回当前的自动充值配置以及最近一次触发结果。

GEThttps://proxy-seller.com/personal/api/v2/{YourApiKey}/balance/autotopup/get

路径参数

姓名

值

描述

授权

<Your_API_Key>

您的个人 API 密钥 (如何获取)

示例

https://proxy-seller.com/personal/api/v2/fj4948ffhg58gh843gh/balance/autotopup/get

回复

{
    "status": "success",
    "data": {
        "configured": true,
        "enabled": true,
        "state": "ACTIVE",
        "threshold": 10,
        "amount": 25,
        "subscriptionId": "sub_01hx9k2m4p",
        "paymentMethod": {
            "id": "sub_01hx9k2m4p",
            "status": "active",
            "paymentMethod": "card",
            "brand": "visa",
            "last4": "1234",
            "exp": "05/2027"
        },
        "dailyCountCap": 5,
        "monthlyAmountCap": 500,
        "failCount": 0,
        "lastAttemptAt": "2026-08-14T09:12:44.000+00:00",
        "lastEvent": {
            "status": "SUCCEEDED",
            "amount": 25,
            "at": "2026-08-14T09:12:46.000+00:00",
            "reason": null
        }
    },
    "errors": []
}
{
    "status": "error",
    "data": null,
    "errors": [
        {
            "message": "Auto top-up is not available",
            "code": 49,
            "customData": null
        }
    ]
}
{
    "status": "error",
    "data": null,
    "errors": [
        {
            "message": "Error api key",
            "code": 503,
            "customData": null
        },
        {
            "message": "IP not allowed",
            "code": 503,
            "customData": null
        },
        {
            "message": "Request limit reached",
            "code": 503,
            "customData": null
        }
    ]
}

更改设置

终点:

此请求用于更新自动充值配置。部分更新: 您省略的任何字段都会保留其存储的值,因此若要仅更改阈值,只需发送threshold.

POSThttps://proxy-seller.com/personal/api/v2/{YourApiKey}/balance/autotopup/set

路径参数

姓名

值

描述

授权

<Your_API_Key>

您的个人 API 密钥 (如何获取)

请求正文

姓名

类型

描述

已启用

布尔

开启或关闭自动充值功能

阈值

数字

当余额低于此数值时进行充值。最低金额1

金额

数字

单次充值金额。最低5,且必须大于或等于threshold

订阅ID

字符串

用于扣款的支付方式,来源为paymentMethod.id. 仅有一张卡片可用时为可选

dailyCountCap

数字

您自己设定的每24小时充值次数上限(更严格)。最低1

monthlyAmountCap

数字

您自己设定的每30天总金额限额。该限额必须大于或等于amount

示例

https://proxy-seller.com/personal/api/v2/fj4948ffhg58gh843gh/balance/autotopup/set

回复

{
    "status": "success",
    "data": {
        "configured": true,
        "enabled": true,
        "state": "ACTIVE",
        "threshold": 10,
        "amount": 25,
        "subscriptionId": "sub_01hx9k2m4p",
        "paymentMethod": {
            "id": "sub_01hx9k2m4p",
            "status": "active",
            "paymentMethod": "card",
            "brand": "visa",
            "last4": "4242",
            "exp": "05/2027"
        },
        "dailyCountCap": 5,
        "monthlyAmountCap": 500,
        "failCount": 0,
        "lastAttemptAt": null,
        "lastEvent": {
            "status": "SETTINGS_SAVED",
            "amount": null,
            "at": "2026-08-14T10:03:11.000+00:00",
            "reason": "enabled: false -> true"
        }
    },
    "errors": []
}
{
    "status": "error",
    "data": null,
    "errors": [
        {
            "message": "Top-up amount must be #min_amount# or more",
            "code": 51,
            "customData": {
                "minAmount": 5
            }
        }
    ]
}
{
    "status": "error",
    "data": null,
    "errors": [
        {
            "message": "Top-up amount must cover the threshold, otherwise it will trigger again",
            "code": 52,
            "customData": null
        }
    ]
}
{
    "status": "error",
    "data": null,
    "errors": [
        {
            "message": "Auto top-up requires a saved payment method",
            "code": 53,
            "customData": null
        }
    ]
}
{
    "status": "error",
    "data": null,
    "errors": [
        {
            "message": "Your saved card has expired — update it to enable auto top-up",
            "code": 56,
            "customData": null
        }
    ]
}
{
    "status": "error",
    "data": null,
    "errors": [
        {
            "message": "Threshold must be #min_threshold# or more",
            "code": 50,
            "customData": {
                "minThreshold": 1
            }
        }
    ]
}
  • 针对该的验证运行已合并 结果,而不仅仅是对该请求本身。发送threshold 如果存储的amount 最终结果低于新的阈值。

  • 只有在以下情况下,连续多次冲锋失败后的暂停才会结束:enabled: true 是显式发送的。在已暂停的配置上编辑其他字段时,暂停状态将保持不变。

  • 即使用户设置为“none”,有效上限依然适用:5 每24小时的充值次数以及500 按每30天计算。

On this page