ToAPIsToAPIs
Account QueriesBilling

Get top-up order

Read your account data with a system access token

GET
/api/v1/account/billing/topups/%7Btrade_no%7D

Note for users in mainland China: Please use https://toapis.cn as the API endpoint (Base URL). Replace https://toapis.com with https://toapis.cn in the examples in this document.

See Getting started for authentication, pagination, and errors.

Behavior

Only a main account can read its own billing. Subaccounts receive HTTP 403. A main account cannot read member billing through this endpoint.

Defaults to 31 days, allows up to 366 days, and sorts by creation time and order ID descending. recorded_payment_amount/payment_currency preserve the original payment currency and do not determine credits. planned_credits is planned, credited_credits is confirmed, and refunded_credits is recorded separately without reducing original credited amounts. Non-successful orders have credited_credits="0"; unverifiable historical amounts are null with reasons in meta. Only TopUp orders are included, not manual gifts or standalone offline refunds. refund=null does not rule out other refunds. A local refund snapshot does not prove card receipt. GET does not query or repair payment-provider orders.

Authentication

Authorizationstringheaderrequired

Use Bearer YOUR_SYSTEM_ACCESS_TOKEN. Model API keys are not accepted. X-User-Id is not required.

Parameters

trade_nostringpathrequired

Platform top-up order number, not an external payment-provider order ID.

Constraints: minLength=1; maxLength=255.

requestExample

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

response = requests.get(
    "https://toapis.com/api/v1/account/billing/topups/trade_example_01",
    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/topups/trade_example_01");

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());

Response fields

Examples use fictional data and assume credits_per_usd="100". Use the conversion rate returned by the API.

codeinteger

Numeric result code; 0 means success.

messagestring

Response message; empty on success. Error messages are localized.

dataobject

Result object for this query.

data.idstring

Internal top-up order ID. Use trade_no for the detail endpoint. Returned as a decimal ID string.

data.trade_nostring

Platform top-up order number used for details, not an external payment order ID.

data.providerstring

Payment service provider.

data.statusstring

Top-up order status. Only successful orders represent confirmed crediting.

data.trigger_typestring | null

Top-up trigger, such as manual or automatic. Historical values can be null.

data.created_atstring | null

Creation time. RFC 3339 timestamp with a timezone. null when unknown or inapplicable.

data.completed_atstring | null

Order completion time. RFC 3339 timestamp with a timezone. null when unknown or inapplicable.

data.recorded_payment_amountstring | null

Original-currency payment amount recorded locally. See payment_currency; do not infer credits from it. Returned as a decimal string to preserve precision. null when unknown or inapplicable.

data.payment_currencystring | null

Original payment currency recorded on the order. null when unknown or inapplicable.

data.planned_creditsstring | null

Planned credits, not the confirmed credited amount. Returned as a decimal string to preserve precision. null when unknown or inapplicable.

data.credited_creditsstring | null

Confirmed credited amount. Non-successful orders use "0"; unverifiable historical amounts are null. Returned as a decimal string to preserve precision.

data.refunded_creditsstring | null

Refunded credits recorded on the order, shown separately without reducing the original credited amount. Returned as a decimal string to preserve precision. null when unknown or inapplicable.

data.refundobject | null

Local order refund snapshot. null does not rule out standalone offline refunds or prove card receipt.

data.refund.statusstring

Refund state recorded on the order.

data.refund.recorded_amountstring | null

Original-currency refund amount recorded locally; currency is in currency. Returned as a decimal string to preserve precision. null when unknown or inapplicable.

data.refund.currencystring | null

Original currency used by the amounts. null when unknown or inapplicable.

data.refund.recorded_atstring | null

Time recorded for the local refund. RFC 3339 timestamp with a timezone. null when unknown or inapplicable.

data.metaobject

Metadata describing the source, query scope, and accounting basis.

data.meta.sourcestring

Data source. Local configuration or ledger snapshots do not imply live Stripe state. Fixed value: "local_ledger".

data.meta.refund_coveragestring

Refund coverage, limited to the order refund snapshot. Fixed value: "order_snapshot_only".

data.meta.standalone_offline_refunds_includedboolean

Whether standalone offline refunds are included. Currently false.

data.meta.payment_amount_basisstring

Basis for payment amounts: the local order snapshot. Fixed value: "local_order_snapshot".

data.meta.consistencystring

Consistency model. eventual means records can be updated later.

data.meta.payment_amount_sourcestring

Record source used to confirm the payment amount.

data.meta.credit_amount_sourcestring

Record source used to confirm credited funds.

responseExample

{
  "code": 0,
  "message": "",
  "data": {
    "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"
    }
  }
}