List payment options
Lists the payment options available for a transaction for the user's wallet based on their balance across chains and tokens and the required transaction amount.
Import
import { listPaymentOptions } from "@paywithglide/glide-js";
Usage
Parameters
The EIP-155 chain ID of the chain where the transaction will be executed.
The wallet address that will be used to pay for the transaction. If set, only the payment options for which the user has a balance will be returned.
The contract's address, or the recipient's address if the transaction is not a contract call.
The contract's ABI.
The name of the function to be called on the contract.
Arguments to be passed when calling the function.
Value in the smallest unit (ex. wei) to be sent with the transaction.
The approval object, required if the transaction requires spending of an ERC-20 token.
The token's contract address that needs to be approved for spending.
The amount to approve, in the token's smallest unit.
List of payment currencies in the CAIP-19 format that should be considered for the transaction. Cannot be used with paymentChainIds.
List of EIP-155 chain IDs that should be considered for the transaction. Cannot be used with paymentCurrencies.
The commission amount in USD that will be added on top of the transaction cost and will be paid out to the developer.
Return Type
The EIP-155 chain ID of the chain where the transaction will be executed.
The name of the chain where the transaction will be executed.
The URL of the chain's logo.
The estimated payment amount required for the transaction in the payment currency.
The currency in which the user pays in CAIP-19 format.
The name of the payment currency.
The symbol of the payment currency.
The URL of the payment currency's logo.
The user's current balance of the payment currency. Only set if the account parameter is provided.
The user's current balance of the payment currency in USD. Only set if the account parameter is provided.
The estimated amount required to complete the transaction in the transaction currency.
The currency required by the transaction to be executed, in CAIP-19 format.
The name of the transaction currency. Ex. "Ethereum".
The symbol of the transaction currency. Ex. "ETH".
The URL of the transaction currency's logo.