import type * as Whop from "../index.js"; /** * A ledger account represents a financial account on Whop that can hold many balances. */ export interface LedgerAccount { /** The balances associated with the account. */ balances: LedgerAccount.Balances.Item[]; /** The unique identifier for the ledger account. */ id: string; /** The type of ledger account. */ ledger_type: Whop.LedgerTypes; /** The owner of the ledger account. */ owner: Whop.LedgerAccountOwner; /** The status of payments approval for the ledger account. */ payments_approval_status: Whop.PaymentsApprovalStatuses | null; /** The payout account associated with the LedgerAccount, if any. */ payout_account_details: LedgerAccount.PayoutAccountDetails | null; /** Whether a payout from this account must be confirmed against a provider-backed quote first. When true, create a quote with POST /payouts/quotes and send its quote_token when creating the payout. */ payout_quote_required: boolean; /** The settlement batch most recently posted to this account's available balance, at midnight UTC. Every payment settling in that batch carries the same `settlement_time_at`. */ settlement_time_at: string | null; /** The fee for transfers, if applicable. */ transfer_fee: number | null; /** The balance cache associated with the account by currency. */ treasury_balance: LedgerAccount.TreasuryBalance | null; } export declare namespace LedgerAccount { type Balances = Balances.Item[]; namespace Balances { /** * A cached balance for a LedgerAccount in respect to a currency. */ interface Item { /** The amount of the balance. */ balance: number; /** The currency of the balance. */ currency: Whop.Currencies; /** The amount of the balance that is pending. */ pending_balance: number; /** The amount of the balance that is reserved. */ reserve_balance: number; } } /** * The payout account associated with the LedgerAccount, if any. */ interface PayoutAccountDetails { /** The physical address associated with this payout account */ address: PayoutAccountDetails.Address | null; /** The company's legal name */ business_name: string | null; /** The business representative for this payout account */ business_representative: PayoutAccountDetails.BusinessRepresentative | null; /** The email address of the representative */ email: string | null; /** The unique identifier for the payout account. */ id: string; /** The latest verification for the connected account. */ latest_verification: PayoutAccountDetails.LatestVerification | null; /** The business representative's phone */ phone: string | null; /** The granular calculated status of the payout account reflecting its current KYC and payout readiness state. */ status: Whop.PayoutAccountCalculatedStatuses | null; } namespace PayoutAccountDetails { /** * The physical address associated with this payout account */ interface Address { /** The city of the address. */ city: string | null; /** The country of the address. */ country: string | null; /** The line 1 of the address. */ line1: string | null; /** The line 2 of the address. */ line2: string | null; /** The postal code of the address. */ postal_code: string | null; /** The state of the address. */ state: string | null; } /** * The business representative for this payout account */ interface BusinessRepresentative { /** The date of birth of the business representative in ISO 8601 format (YYYY-MM-DD). */ date_of_birth: string | null; /** The first name of the business representative. */ first_name: string | null; /** The last name of the business representative. */ last_name: string | null; /** The middle name of the business representative. */ middle_name: string | null; } /** * The latest verification for the connected account. */ interface LatestVerification { /** The numeric id of the verification record. */ id: string; /** The most recent error code returned during verification. Null if no error has occurred. */ last_error_code: Whop.VerificationErrorCodes | null; /** A human-readable explanation of the most recent verification error. Null if no error has occurred. */ last_error_reason: string | null; /** The current status of this verification session. */ status: Whop.VerificationStatuses; } } /** * The balance cache associated with the account by currency. */ interface TreasuryBalance { /** The amount of the balance. */ balance: number; /** The balance converted to USD. */ balance_usd: number; /** The currency of the balance. */ currency: Whop.Currencies; /** The amount of the balance that is pending. */ pending_balance: number; /** The amount of the balance that is reserved. */ reserve_balance: number; /** The amount of the balance that is withdrawable. */ total_withdrawable_balance: number; } }