PayFanout API reference
    Preparing search index...

    Function usePay

    • 's engine as a hook, for hosts whose design system brings its own button. Everything does — confirm the mounted fields, branch tokenize-first completions through onServerCompletion, normalize errors — in three lines:

      const { pay, paying } = usePay({ onServerCompletion }); <MyDesignSystemButton loading={paying} onClick={async () => show(await pay())} />

      Parameters

      Returns UsePayResult