自動チャージ
Updated:
残高の自動補充:残高が閾値を下回った場合、設定された金額が登録済みの決済方法から引き落とされます。利用可能な地域:API v2のみ — v1に相当するものは存在しません。
サーバー側でこの機能が有効になっている必要があります。無効になっている場合、両方のエンドポイントからAuto top-up is not available.
エンドポイント:
このリクエストは、現在の自動チャージ設定と、直近のトリガー結果を返します。
パスパラメータ
名前 | 値 | 説明 |
|---|---|---|
承認 |
| お客様の個人用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.
パスパラメータ
名前 | 値 | 説明 |
|---|---|---|
承認 |
| お客様の個人用APIキー(入手方法) |
リクエスト本文
名前 | 種類 | 説明 |
|---|---|---|
有効 | ブール値 | 自動チャージのオン/オフを切り替える |
閾値 | 番号 | 残高がこの値を下回ったときに課金する。最低額 |
金額 | 番号 | 1回のチャージ額。最低額 |
subscriptionId | 文字列 | 請求先の支払い方法(出典:) |
dailyCountCap | 番号 | 24時間あたりのチャージ回数について、ご自身でより厳しい制限を設定できます。最低値 |
月間上限額 | 番号 | 30日あたりの合計金額に関するご自身の限度額。以下の金額以上である必要があります。 |
例
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」を設定した場合も、有効な上限値が適用されます:
524時間あたりのチャージ回数および500直近30日間ごとに。