Collects the buyer’s email and passes it to payments.createConfirmationToken() while mounted. Explicit billingDetails.email wins. A matching Whop account shows optional sign-in with code verification. Successful sign-in unlocks saved payment methods in the payment element. Buyers can continue as guests.
Mounts inside Payments. Pass props and callbacks through the create options or React props.
Mounts inside a WhopPayments scope. Collects the buyer’s email, which every confirmation token requires, and the controller reads it for the mint whether or not you bind it.
Mount inside <Payments>, which owns the charge and the confirmation token. <Payments> itself mounts inside <WhopElements>. It collects the buyer’s email and publishes it to the provider, so createConfirmationToken sends it without being passed anything.
Fires when the email changes. complete is true when plausible. Sign-in fires it with the signed-in email, which also feeds createConfirmationToken().Signature:((payload: { email: string; complete: boolean; }) => void)
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.Signature:((e: { message: string; code?: string | undefined; sourceKey?: string | undefined; }) => void)
Removes the element and releases its frame and subscriptions. You can call it more than once. React removes the element automatically.Signature:() => void
Style these parts through appearance.classes. Use camel case or kebab case for property names and include units. Page stylesheets can’t reach the element’s frame. The framework validates each declaration before injecting it.
Without it, pass billingDetails.email to createConfirmationToken yourself. The mint refuses a token with no email.
An explicit billingDetails.email at mint time wins over what this element collected.
A plausible address is probed against the account directory, debounced and again on blur. A recognized one offers a sign-in, and the element presents the six-digit code sheet itself.
A verified sign-in unlocks the buyer’s saved payment methods in WhopPaymentElement. Read payments.buyer for who they are, and payments.signOut() to forget them.
The scoped token lasts an hour and does not refresh. When it lapses the saved lane comes back empty and the buyer pays with a fresh method, the same path a guest takes.
Mount it inside a WhopPayments(accountID:charge:) scope, which creates the controller and hands it to its content. payments.buyer is the signed-in buyer once an email sign-in has proven one. WhopBrandingElement has to be on screen too, because Whop is merchant of record on these sales and createConfirmationToken refuses without it. Style with .whopElementsAppearance(_:). The module is Elements, not the wallet SDK’s WhopElements. See Getting started and Appearance.
Applied to the element’s outer View. For theming, prefer appearance.parts on the provider, which covers every element on this surface. Note the React Native part names are their own set today, not the web’s whop-* class names, so a web appearance object does not port across unchanged.
The published email is what the confirmation token carries as billing_details.email. Passing billingDetails.email to createConfirmationToken overrides it.
Set label={false} when your form supplies its own label. The input keeps its accessibility label either way.
Wrap your app in <WhopElements getToken={…}> once, then mount <Payments> around the elements. See Getting started and Appearance.
Assistant
Responses are generated using AI and may contain mistakes.