This page documents
@whop/elements@1.10.0 and @whop/elements-react@1.10.0.v1.0.0.
Mounts inside Wallet. accountId and accessToken come from there. Pass props and callbacks through the create options or React props. Keep the created handle, or React ref, to call refresh().
You can mount this element inline (
create) or open it as a modal overlay (createOverlay).Example data. Open the Playground.
Props
A scoped token for listing payout methods and creating the payout — needs
payout:withdraw_funds, payout:destination:read, and payout:create_destination to add a bank. Omitted, the calls carry the viewer’s own session, which only answers same-origin.Payout methods available to add in the selected country, including required fields. Defaults to
[].Live standard and instant payout limits. Defaults to
{"standard":{"maxAmount":0},"instant":{"maxAmount":0}}.Whether this payout must use an exact provider-backed quote before confirmation. Defaults to
false.The exact short-lived payout quote for confirmation. Include serverTime so the quote is timed by its remaining lifetime rather than the device clock. Include recommendedMethod to offer a cheaper method through the connection flow without changing the selected method. Defaults to
null.Whether the last quote request was inconclusive and must be retried with the same request ID. Defaults to
false.Whether the last payout result was inconclusive and must be retried exactly. Defaults to
false.The exact unresolved payout request to retry after the element remounts. Defaults to
null.True when the last payout was refused because the bank could not confirm the account holder name. Shows a fix-or-confirm choice; confirming re-emits withdrawalRequested with acknowledgeBankWarning set. Set this back to false when handling each withdrawalRequested — the choice appears on the change to true, so a flag left true hides every later refusal. Defaults to
false.Set when the payer backed out of Plaid Link or it failed to open. Unlocks manual entry on a rail that otherwise requires linking. Defaults to
false.Whether a bank link is in progress — the Plaid session is open, or the linked method is being saved. Defaults to
false.Events
Pass callbacks in the create options or React props.onAmountChanged
The amount changed and should be repriced.
onCountryChanged
The add-method country changed and supported methods should be refreshed.
onSupportedMethodChanged
A supported payout method was selected and its exact required fields should be loaded.
onAddMethodRequested
The payer submitted the dynamic add-payout-method form.
onPlaidLinkRequested
The payer chose to link their bank through Plaid instead of typing details. Open Plaid Link on receipt.
onMethodVerificationCompleted
The newly added payout method finished its verification step.
onRenameMethodRequested
The payer requested to rename a saved payout method.
onRemoveMethodRequested
The payer requested to remove a saved payout method.
onPayoutQuoteRequested
The payer requested an exact short-lived quote before confirming a payout.
onWithdrawalRequested
The payer confirmed the payout. When the host is driving the flow, create the payout on receipt. When the element created it, this fires after success so the host can refresh balances — do not create a second payout.
onDone
The payer finished reviewing a successful payout.
onLoaderStart
Runs after the loading skeleton first paints and before onReady.
onReady
Runs after the element’s first complete paint.
onError
Runs when the element fails to load or crashes. The fallback remains visible. Use code for programmatic handling. sourceKey identifies a failed host-state source.
Methods
Call these on the handle returned bycreate, or through a React ref.
refresh
Re-fetch saved payout methods and limits. Call it after anything on your side changes what the account can pay out to.
Returns Promise<void>
mount
Mounts the element in target and starts loading. React components mount themselves.
Parameters
destroy
Removes the element and releases its frame and subscriptions. You can call it more than once. React removes the element automatically.
update
Merges new props into the mounted element. In React, change the component props instead.
Parameters
Styling
This element doesn’t expose class names for styling. Useappearance (theme, accent color, variables) to restyle it.
