Hook
usePaymentQuote
Requests a normalized ExactIn or ExactOut token conversion quote through a replaceable payment provider adapter.
Installation
terminal
$npx shadcn@latest add https://uxdotsol.xyz/r/use-payment-quote.jsonUsage
use-payment-quote.tsx
import { usePaymentQuote } from "@/hooks/uxdotsol/use-payment-quote"; const quote = usePaymentQuote({ inputMint, outputMint, amount: atomicAmount, swapMode: "ExactOut",});Options
| Name | Type | Default | Description |
|---|---|---|---|
| input | PaymentQuoteInput | null | required | Token mints, atomic amount, slippage, and ExactIn or ExactOut mode. |
| options | { adapter?, endpoint?, enabled? } | {} | Provider override, route, and request control. |
Returns
| Name | Type | Default | Description |
|---|---|---|---|
| resource | { status, data, error, updatedAt, refetch } | — | Normalized resource state plus explicit status flags and a manual refresh action. |

