get_payment_instrument_balance¶
Operation¶
get_payment_instrument_balance
¶
get_payment_instrument_balance(request: GetPaymentInstrumentBalanceInput | GetPaymentInstrumentBalanceInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetPaymentInstrumentBalanceInputDict]) -> GetPaymentInstrumentBalanceOutput
Get the balance of a payment instrument.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
GetPaymentInstrumentBalanceInput | GetPaymentInstrumentBalanceInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[GetPaymentInstrumentBalanceInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
GetPaymentInstrumentBalanceOutput
|
An instance of |
get_payment_instrument_balance
async
¶
get_payment_instrument_balance(request: GetPaymentInstrumentBalanceInput | GetPaymentInstrumentBalanceInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetPaymentInstrumentBalanceInputDict]) -> GetPaymentInstrumentBalanceOutput
Get the balance of a payment instrument.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
GetPaymentInstrumentBalanceInput | GetPaymentInstrumentBalanceInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[GetPaymentInstrumentBalanceInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
GetPaymentInstrumentBalanceOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
GetPaymentInstrumentBalanceInputDict
¶
Bases: TypedDict
Dictionary form of GetPaymentInstrumentBalanceInput.
Attributes¶
agent_name
instance-attribute
¶
agent_name: str | None
The agent name associated with this request, used for observability.
chain
instance-attribute
¶
The specific blockchain chain to query balance on. Required because balances are chain-specific.
payment_connector_id
instance-attribute
¶
The ID of the payment connector associated with this instrument.
payment_instrument_id
instance-attribute
¶
The ID of the payment instrument to query balance for.
payment_manager_arn
instance-attribute
¶
The ARN of the payment manager that owns this payment instrument.
token
instance-attribute
¶
The token to query balance for. Only tokens supported for X402 payments are returned.
GetPaymentInstrumentBalanceInput
dataclass
¶
Bases: _SerdeShape
Request structure for getting payment instrument balance.
Attributes¶
agent_name
class-attribute
instance-attribute
¶
agent_name: str | None = ...
The agent name associated with this request, used for observability.
chain
class-attribute
instance-attribute
¶
chain: str | 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 = ...
The ID of the payment connector associated with this instrument.
payment_instrument_id
class-attribute
instance-attribute
¶
payment_instrument_id: str | None = ...
The ID of the payment instrument to query balance for.
payment_manager_arn
class-attribute
instance-attribute
¶
payment_manager_arn: str | None = ...
The ARN of the payment manager that owns this payment instrument.
Output¶
GetPaymentInstrumentBalanceOutput
dataclass
¶
Bases: _SerdeShape
Response structure for getting payment instrument balance.
Attributes¶
payment_instrument_id
instance-attribute
¶
payment_instrument_id: str
The ID of the payment instrument.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.
token_balance
instance-attribute
¶
token_balance: TokenBalance
The balance of the supported token on the requested chain.