Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.trustware.io/llms.txt

Use this file to discover all available pages before exploring further.

When you embed the deposit widget for a specific purchase flow — a subscription top-up, a fixed-price checkout, a one-click refill — you may want users to confirm a predetermined amount rather than choose their own. Setting fixedFromAmount locks the widget’s amount input to a single USD value.

The fixedFromAmount option

fixedFromAmount lives inside routes.options in your TrustwareConfigOptions. When it is set, the amount input in the widget becomes read-only and displays the value you provide.
import { type TrustwareConfigOptions } from "@trustware/sdk";

const fixedAmountConfig = {
  ...trustwareConfig,
  routes: {
    ...trustwareConfig.routes,
    options: {
      fixedFromAmount: "25",
    },
  },
} satisfies TrustwareConfigOptions;
Pass this config to TrustwareProvider:
<TrustwareProvider config={fixedAmountConfig}>
  <TrustwareWidget />
</TrustwareProvider>

Value format

fixedFromAmount accepts a string or a number representing a USD amount:
fixedFromAmount: "25"   // string — "25 USD"
fixedFromAmount: 25     // number — equivalent
The value is interpreted as a USD amount. Do not include a currency symbol or unit suffix.
When fixedFromAmount is set, the widget amount input is locked. Users can still select their source token, but they cannot modify the deposit amount.