Skip to content

Bedrock Agentcore  >  Operations  >  get_payment_instrument_balance

get_payment_instrument_balance

Operation

get_payment_instrument_balance async

get_payment_instrument_balance(input: GetPaymentInstrumentBalanceInput, plugins: list[Plugin] | None = None) -> GetPaymentInstrumentBalanceOutput

Get the balance of a payment instrument.

Parameters:

Name Type Description Default
input GetPaymentInstrumentBalanceInput

An instance of GetPaymentInstrumentBalanceInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
GetPaymentInstrumentBalanceOutput

An instance of GetPaymentInstrumentBalanceOutput.

Input

GetPaymentInstrumentBalanceInput dataclass

Request structure for getting payment instrument balance.

Attributes

agent_name class-attribute instance-attribute
agent_name: str | None = None

The agent name associated with this request, used for observability.

chain class-attribute instance-attribute
chain: BlockchainChainId | None = None

The specific blockchain chain to query balance on. Required because balances are chain-specific.

payment_connector_id class-attribute instance-attribute
payment_connector_id: str | None = None

The ID of the payment connector associated with this instrument.

payment_instrument_id class-attribute instance-attribute
payment_instrument_id: str | None = None

The ID of the payment instrument to query balance for.

payment_manager_arn class-attribute instance-attribute
payment_manager_arn: str | None = None

The ARN of the payment manager that owns this payment instrument.

token class-attribute instance-attribute
token: InstrumentBalanceToken | None = None

The token to query balance for. Only tokens supported for X402 payments are returned.

user_id class-attribute instance-attribute
user_id: str | None = None

The user ID associated with this payment instrument.

Output

GetPaymentInstrumentBalanceOutput dataclass

Response structure for getting payment instrument balance.

Attributes

payment_instrument_id instance-attribute
payment_instrument_id: str

The ID of the payment instrument.

token_balance instance-attribute
token_balance: TokenBalance

The balance of the supported token on the requested chain.