チャージ注文一覧の取得
システムアクセストークンで自身のアカウントデータを取得
中国本土のユーザー向け: 中国本土のユーザーは https://toapis.cn を API エンドポイント (Base URL)としてご利用ください. 本ドキュメント内の例では https://toapis.com を https://toapis.cn に置き換えてください.
認証, ページ分割, エラーは利用ガイドを参照してください.
動作
メインアカウント自身の請求情報のみ取得できます. サブアカウントは HTTP 403 になります. メンバーの請求情報は取得できません.
既定は 31 日, 最大 366 日, 作成時刻と注文 ID の降順です. recorded_payment_amount/payment_currency は元の決済通貨で, credits の算出には使いません. planned_credits は予定, credited_credits は確定で, refunded_credits は元の入金額を減らさず別記録です. 未成功注文は credited_credits="0". 不明な過去の金額は null で理由は meta にあります. 手動付与や独立したオフライン返金は対象外. refund=null は返金なしを保証せず, ローカル記録はカード着金を証明しません. 決済サービスの注文照会や修復は行いません.
認証
Authorizationstringヘッダー必須Bearer YOUR_SYSTEM_ACCESS_TOKEN を使用します. モデル API キーは使用できません. X-User-Id は不要です.
パラメータ
fromstringクエリタイムゾーン付き RFC 3339 の開始時刻. この時刻を含みます. to と一緒に指定します.
制約: date-time.
tostringクエリタイムゾーン付き RFC 3339 の終了時刻. この時刻を含まず, from より後である必要があります.
制約: date-time.
cursorstringクエリ前の next_cursor を変更せずに渡します. フィルターを維持し, 変更時は最初から取得します.
制約: maxLength=2048.
limitintegerクエリデフォルト: 201 ページの最大件数.
制約: minimum=1; maximum=100; 既定値: 20.
providerstringクエリ決済サービス.
制約: stripe, wechat, alipay, creem, nowpayments, offline.
statusstringクエリ請求: pending, success, superseded, expired, failed, partially_paid.
制約: pending, success, superseded, expired, failed, partially_paid.
リクエスト例
curl --request GET \
--url 'https://toapis.com/api/v1/account/billing/topups?from=2026-11-01T00:00:00Z&to=2026-11-02T00:00:00Z&provider=stripe&limit=20' \
--header 'Authorization: Bearer YOUR_SYSTEM_ACCESS_TOKEN'import requests
response = requests.get(
"https://toapis.com/api/v1/account/billing/topups",
headers={"Authorization": "Bearer YOUR_SYSTEM_ACCESS_TOKEN"},
params={
"from": "2026-11-01T00:00:00Z",
"to": "2026-11-02T00:00:00Z",
"provider": "stripe",
"limit": "20"
},
timeout=30,
)
response.raise_for_status()
print(response.json())const url = new URL("https://toapis.com/api/v1/account/billing/topups");
url.search = new URLSearchParams({
"from": "2026-11-01T00:00:00Z",
"to": "2026-11-02T00:00:00Z",
"provider": "stripe",
"limit": "20"
}).toString();
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" を仮定しています. 実際の換算にはレスポンスの値を使用してください.
結果は data.items にあります. has_more と next_cursor で次のページを取得します. 最終カーソルは null です. 総件数は返しません.
codeinteger結果コード. 0 は成功です.
messagestring成功時は空文字列です. エラーメッセージは翻訳されます.
dataobject今回の照会結果オブジェクトです.
data.itemsobject[]現在のページのレコード一覧. 空の場合は [] です.
data.items[].idstringチャージ注文の内部 ID. 詳細の照会には trade_no を使います. 10 進 ID 文字列で返します.
data.items[].trade_nostring詳細取得用のプラットフォーム注文番号で, 外部決済の注文 ID ではありません.
data.items[].providerstring決済サービスの提供元です.
data.items[].statusstringチャージ注文の状態. 成功注文のみ確定入金を表します.
data.items[].trigger_typestring | null手動や自動などのチャージ起動方法. 過去の値は null の場合があります.
data.items[].created_atstring | null作成時刻です. タイムゾーン付き RFC 3339 形式です. 不明または対象外の場合は null です.
data.items[].completed_atstring | null注文の完了時刻です. タイムゾーン付き RFC 3339 形式です. 不明または対象外の場合は null です.
data.items[].recorded_payment_amountstring | nullローカル注文の原通貨決済額. 通貨は payment_currency で, credits の推定には使いません. 精度を保持するため 10 進文字列で返します. 不明または対象外の場合は null です.
data.items[].payment_currencystring | null注文に記録された元の決済通貨です. 不明または対象外の場合は null です.
data.items[].planned_creditsstring | null予定入金 credits で, 確定入金とは異なります. 精度を保持するため 10 進文字列で返します. 不明または対象外の場合は null です.
data.items[].credited_creditsstring | null確定入金 credits. 未成功注文は "0", 過去の額が未確認なら null です. 精度を保持するため 10 進文字列で返します.
data.items[].refunded_creditsstring | null注文の返金 credits を別表示します. 元の確定入金額からは減算しません. 精度を保持するため 10 進文字列で返します. 不明または対象外の場合は null です.
data.items[].refundobject | null注文のローカル返金情報です. null は独立したオフライン返金の不在やカード着金を保証しません.
data.items[].refund.statusstring注文に記録された返金状態です.
data.items[].refund.recorded_amountstring | nullローカル返金記録の原通貨額. 通貨は currency です. 精度を保持するため 10 進文字列で返します. 不明または対象外の場合は null です.
data.items[].refund.currencystring | null金額の元通貨です. 不明または対象外の場合は null です.
data.items[].refund.recorded_atstring | nullローカル返金の記録時刻です. タイムゾーン付き RFC 3339 形式です. 不明または対象外の場合は null です.
data.items[].metaobjectデータソース, 照会範囲, 集計基準などのメタデータです.
data.items[].meta.sourcestringデータソースです. ローカル設定や台帳の値は Stripe のリアルタイム状態を意味しません. 固定値: "local_ledger".
data.items[].meta.refund_coveragestring返金情報の対象範囲で, 注文の返金記録のみです. 固定値: "order_snapshot_only".
data.items[].meta.standalone_offline_refunds_includedboolean独立したオフライン返金を含むかを示し, 現在は false です.
data.items[].meta.payment_amount_basisstring決済額の基準で, ローカル注文のスナップショットです. 固定値: "local_order_snapshot".
data.items[].meta.consistencystringeventual は結果整合性で, レコードは後で更新される場合があります.
data.items[].meta.payment_amount_sourcestring決済額の確認に使用した記録のソースです.
data.items[].meta.credit_amount_sourcestring入金 credits の確認に使用した記録のソースです.
data.has_moreboolean次のページがあるかを示します.
data.next_cursorstring | null同じ条件で cursor にそのまま渡します. 最終ページは null です.
data.metaobjectデータソース, 照会範囲, 集計基準などのメタデータです.
data.meta.sourcestringデータソースです. ローカル設定や台帳の値は Stripe のリアルタイム状態を意味しません.
data.meta.scopestring照会対象の所有範囲で, 認証された自身のアカウントです.
data.meta.fromstring照会時間範囲の開始時刻を含みます.
data.meta.tostring照会時間範囲の終了時刻は含みません.
data.meta.consistencystringeventual は結果整合性で, レコードは後で更新される場合があります.
data.meta.refund_coveragestring返金情報の対象範囲で, 注文の返金記録のみです.
data.meta.standalone_offline_refunds_includedboolean独立したオフライン返金を含むかを示し, 現在は false です.
レスポンス例
{
"code": 0,
"message": "",
"data": {
"items": [
{
"id": "501",
"trade_no": "trade_example_01",
"provider": "stripe",
"status": "success",
"trigger_type": "manual",
"created_at": "2026-11-01T08:00:00Z",
"completed_at": "2026-11-01T08:01:00Z",
"recorded_payment_amount": "10",
"payment_currency": "USD",
"planned_credits": "1000",
"credited_credits": "1000",
"refunded_credits": "0",
"refund": null,
"meta": {
"source": "local_ledger",
"consistency": "eventual",
"payment_amount_basis": "local_order_snapshot",
"refund_coverage": "order_snapshot_only",
"standalone_offline_refunds_included": false,
"payment_amount_source": "paid_amount",
"credit_amount_source": "credited_credits"
}
}
],
"has_more": false,
"next_cursor": null,
"meta": {
"source": "local_ledger",
"scope": "self",
"from": "2026-11-01T00:00:00Z",
"to": "2026-11-02T00:00:00Z",
"consistency": "eventual",
"refund_coverage": "order_snapshot_only",
"standalone_offline_refunds_included": false
}
}
}