List wallets
/v1/organization/billing/wallets// Use a delegated user OAuth token with org:billing:read in its issuing region.
const bird = new BirdClient({ apiKey: process.env.BIRD_OAUTH_ACCESS_TOKEN!, region: "eu1" });
await bird.billingWallets.list();import os
# Use a delegated user OAuth token with org:billing:read in its issuing region.
client = Bird(api_key=os.environ["BIRD_OAUTH_ACCESS_TOKEN"], region="eu1")
client.billing_wallets.list()// Use a delegated user OAuth token with org:billing:read in its issuing region.
client, err := bird.NewClient(option.WithAPIKey(os.Getenv("BIRD_OAUTH_ACCESS_TOKEN")), option.WithRegion("eu1"))
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
result, err := client.BillingWallets.List(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Println(result)// Use a delegated user OAuth token with org:billing:read in its issuing region.
$bird = new Bird(getenv('BIRD_OAUTH_ACCESS_TOKEN') ?: '', region: 'eu1');
$bird->billingWallets->list();curl -X GET "https://us1.platform.bird.com/v1/organization/billing/wallets" \
-H "Authorization: Bearer $TOKEN"{
"data": [
{
"id": "wal_01krdgeqcxet5s7t44vh8rt9mg",
"currency_code": "USD",
"balance": "118.00",
"settled_balance": "150.00",
"renewal_reserved": "25.00",
"renewal_required": "30.00",
"collection_status": "none",
"collection_renewal": "30.004",
"collection_required": "42.00",
"collection_usage_buffer": "10.00",
"collection_deficit": "2.00",
"credit_limit": "0.00"
}
]
}
Returns all wallets for the organization. A wallet is created automatically with the organization and pays usage charges. Amounts are decimal strings in currency_code; balance is the amount currently available to spend, excluding additional credit_limit headroom. Requires a delegated user OAuth token with org:billing:read; workspace and organization master API keys are refused with 403.
Antwort-Payload
dataUntergeordnete Attribute anzeigen
data.iddata.currency_codeISO 4217 currency code.
data.balanceBalance you can spend, in currency units. Usage is charged as it happens, so this drops within seconds of sending and can be lower than the balance the wallet transactions add up to, which only reflects charges that have settled. Funds held for upcoming renewals are also excluded. Credit headroom is reported separately in credit_limit, and postpaid accounts can keep spending past a zero balance up to that limit.
data.settled_balanceSettled wallet balance in currency units, before active reservations are deducted.
data.renewal_reservedAmount currently held for prepared subscription renewals and scheduled plan changes, in currency units.
data.renewal_requiredTotal amount required for prepared subscription renewals and scheduled plan changes, including tax, in currency units.
data.collection_statusAutomatic collection state:
none: No retained collection run.in_progress: Collection is active, though payment may still require customer action.exhausted: Automatic retries have stopped and customer action is needed.
Possible values: none, in_progress, exhausted
data.collection_renewalPart of collection_required needed for unfunded renewal fees, in exact currency units.
data.collection_requiredTotal wallet funding still required by the current automatic collection run, in exact currency units.
data.collection_usage_bufferPart of collection_required needed for the configured auto-topup amount, in currency units.
data.collection_deficitPart of collection_required needed to cover the wallet shortfall after reservations and approved credit, in currency units.
data.credit_limitCredit limit in currency units. 0.00 for prepaid wallets.
data.provisionalWhen true, the wallet currency has not yet been committed and can be changed once. When false, the currency is permanent.
data.created_atdata.updated_atVerwandte Ressourcen
Weiter mit der Dokumentation, Anleitungen und Beispielen zu diesem Thema.