ToAPIsToAPIs
アカウント照会請求

自動チャージ設定の取得

システムアクセストークンで自身のアカウントデータを取得

GET
/api/v1/account/billing/auto-topup

中国本土のユーザー向け: 中国本土のユーザーは https://toapis.cn を API エンドポイント (Base URL)としてご利用ください. 本ドキュメント内の例では https://toapis.com を https://toapis.cn に置き換えてください.

認証, ページ分割, エラーは利用ガイドを参照してください.

動作

メインアカウント自身の請求情報のみ取得できます. サブアカウントは HTTP 403 になります. メンバーの請求情報は取得できません.

enabled は設定スイッチで, status は停止, カード不足, 認証, 再試行も表します. threshold_credits は起動閾値, configured_amount_usd は設定 USD 額で, 実際の決済や入金額を保証しません. 不明な時刻は null. reason は card_unbound, charge_failed, verification_required, failure_limit, missing_payment_method, billing_not_linked, configuration_review_required, または null. action_required は対話操作が必要であることを示し, GET は課金しません.

認証

Authorizationstringヘッダー必須

Bearer YOUR_SYSTEM_ACCESS_TOKEN を使用します. モデル API キーは使用できません. X-User-Id は不要です.

パラメータ

パスパラメータ, クエリパラメータ, リクエストボディは使用しません.

リクエスト例

curl --request GET \
  --url 'https://toapis.com/api/v1/account/billing/auto-topup' \
  --header 'Authorization: Bearer YOUR_SYSTEM_ACCESS_TOKEN'
import requests

response = requests.get(
    "https://toapis.com/api/v1/account/billing/auto-topup",
    headers={"Authorization": "Bearer YOUR_SYSTEM_ACCESS_TOKEN"},
    timeout=30,
)
response.raise_for_status()
print(response.json())
const url = new URL("https://toapis.com/api/v1/account/billing/auto-topup");

const response = await fetch(url, {
  headers: { Authorization: "Bearer YOUR_SYSTEM_ACCESS_TOKEN" },
  signal: AbortSignal.timeout(30_000),
});

if (!response.ok) {
  throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}
console.log(await response.json());

レスポンスフィールド

例は架空のデータで, credits_per_usd="100" を仮定しています. 実際の換算にはレスポンスの値を使用してください.

codeinteger

結果コード. 0 は成功です.

messagestring

成功時は空文字列です. エラーメッセージは翻訳されます.

dataobject

今回の照会結果オブジェクトです.

data.enabledboolean

自動チャージ設定のスイッチで, 稼働状態 status とは別です.

data.statusstring

自動チャージの稼働状態で, 有効, 停止, 認証, カード不足, 再試行待ちを表します. 値: active, paused, requires_action, missing_payment_method, retry_wait.

data.threshold_creditsstring

自動チャージを起動する残高閾値で, 単位は credits です. 精度を保持するため 10 進文字列で返します.

data.configured_amount_usdstring

設定された自動チャージ USD 額で, 最終決済額や入金額を保証しません. 精度を保持するため 10 進文字列で返します.

data.last_attempt_atstring | null

直近の自動チャージ試行時刻です. タイムゾーン付き RFC 3339 形式です. 不明または対象外の場合は null です.

data.last_success_atstring | null

直近の自動チャージ成功時刻です. タイムゾーン付き RFC 3339 形式です. 不明または対象外の場合は null です.

data.next_retry_atstring | null

次の自動チャージ再試行時刻です. タイムゾーン付き RFC 3339 形式です. 不明または対象外の場合は null です.

data.action_requiredboolean

ユーザー操作が必要かを示します. この GET は決済を開始しません.

data.reasonstring | null

自動チャージ状態の理由コード. 追加理由なしは null です.

data.sourcestring

データソースです. ローカル設定や台帳の値は Stripe のリアルタイム状態を意味しません. 固定値: "local_configuration".

レスポンス例

{
  "code": 0,
  "message": "",
  "data": {
    "enabled": true,
    "status": "active",
    "threshold_credits": "100",
    "configured_amount_usd": "10",
    "last_attempt_at": "2026-11-01T08:00:00Z",
    "last_success_at": "2026-11-01T08:01:00Z",
    "next_retry_at": null,
    "action_required": false,
    "reason": null,
    "source": "local_configuration"
  }
}