import Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const ledgerAccount = await client.ledgerAccounts.retrieve('ldgr_xxxxxxxxxxxxx');
console.log(ledgerAccount.id);{
"id": "ldgr_xxxxxxxxxxxxx",
"balances": [
{
"balance": 6.9,
"currency": "usd",
"pending_balance": 6.9,
"reserve_balance": 6.9
}
],
"transfer_fee": 6.9,
"payout_account_details": {
"id": "poact_xxxxxxxxxxxx",
"business_name": "<string>",
"phone": "<string>",
"email": "<string>",
"business_representative": {
"date_of_birth": "<string>",
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>"
},
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "<string>",
"country": "<string>"
},
"latest_verification": {
"id": "verf_xxxxxxxxxxxxx",
"status": "requires_input",
"last_error_code": "abandoned",
"last_error_reason": "Document image was too blurry to read."
}
},
"payments_approval_status": "pending",
"ledger_type": "primary",
"owner": {
"typename": "<string>",
"id": "user_xxxxxxxxxxxxx",
"name": "John Doe",
"username": "johndoe42"
}
}Retrieves the details of an existing ledger account.
Required permissions:
company:balance:readpayout:account:readimport Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const ledgerAccount = await client.ledgerAccounts.retrieve('ldgr_xxxxxxxxxxxxx');
console.log(ledgerAccount.id);{
"id": "ldgr_xxxxxxxxxxxxx",
"balances": [
{
"balance": 6.9,
"currency": "usd",
"pending_balance": 6.9,
"reserve_balance": 6.9
}
],
"transfer_fee": 6.9,
"payout_account_details": {
"id": "poact_xxxxxxxxxxxx",
"business_name": "<string>",
"phone": "<string>",
"email": "<string>",
"business_representative": {
"date_of_birth": "<string>",
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>"
},
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "<string>",
"country": "<string>"
},
"latest_verification": {
"id": "verf_xxxxxxxxxxxxx",
"status": "requires_input",
"last_error_code": "abandoned",
"last_error_reason": "Document image was too blurry to read."
}
},
"payments_approval_status": "pending",
"ledger_type": "primary",
"owner": {
"typename": "<string>",
"id": "user_xxxxxxxxxxxxx",
"name": "John Doe",
"username": "johndoe42"
}
}A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************
The identifier to look up the ledger account. Accepts a user ID ('user_xxx'), company ID ('biz_xxx'), or ledger account ID ('ldgr_xxx').
"ldgr_xxxxxxxxxxxxx"
A successful response
A ledger account represents a financial account on Whop that can hold many balances.
The unique identifier for the ledger account.
"ldgr_xxxxxxxxxxxxx"
The balances associated with the account.
Show child attributes
The fee for transfers, if applicable.
6.9
The payout account associated with the LedgerAccount, if any.
Show child attributes
The status of payments approval for the ledger account.
pending, approved, monitoring, rejected The type of ledger account.
primary, pool A user account on Whop. Contains profile information, identity details, and social connections.
Show child attributes
Was this page helpful?