React app

Install Plandalf in a React app with checkout attributes, the browser SDK, or the React provider and hooks.

React apps can use Plandalf two ways. For simple checkout buttons, load the browser SDK once and render data-plandalf-present in JSX. For app-wide state, gates, and hooks, use the React package.

Start with attributes, graduate to hooks

The Numi share-code generator recommends attributes for the first install because the SDK auto-discovers elements even when React renders them after page load.

The path

  1. Add the organization SDK to your shell document, or let PlandalfProvider manage the SDK instance.

  2. Use data-plandalf-present for a trigger button or data-plandalf-mount for inline checkout.

  3. Call identify() or pass per-call user when checkout must know the logged-in customer.

  4. Use FlowHandle events when the React app needs to update UI after checkout state changes.

Choose an integration style

Attribute-first

export function UpgradeButton() {
  return (
    <button
      data-plandalf-present="pro-plan"
      data-plandalf-frame="modal"
      data-plandalf-mode="test"
    >
      Upgrade
    </button>
  );
}

For inline checkout, mount into a stable container.

export function CheckoutPanel() {
  return (
    <div
      data-plandalf-mount="pro-plan"
      data-plandalf-apply-promo="early-bird"
      style={{ minHeight: 480 }}
    />
  );
}

React package

React provider and hook

import { PlandalfProvider } from "@plandalf/react";

export function Root() {
  return (
    <PlandalfProvider publicKey="pk_live_..." apiBase="https://acme.plandalf.com">
      <App />
    </PlandalfProvider>
  );
}
import { usePresent } from "@plandalf/react";

export function UpgradeButton() {
  const { present, presenting } = usePresent();

  return (
    <button disabled={presenting} onClick={() => present("pro-plan")}>
      Upgrade
    </button>
  );
}
import { useEffect } from "react";
import { usePlandalf } from "@plandalf/react";

export function IdentifyUser({ userJwt }: { userJwt: string }) {
  const sdk = usePlandalf();

  useEffect(() => {
    sdk.identify(userJwt);
    return () => sdk.reset();
  }, [sdk, userJwt]);

  return null;
}

Builder context

Connect platform setup to the full stack.

Platform docs explain where an external system fits. The related surfaces show how integrations, offers, payments, invoices, and automation stay visible in Plandalf.

The Numi platform settings screen showing connected stack configuration.
Integrations keep external systems visible to the operator.
The Numi integrations settings page showing Stripe, PayPal, Stripe test mode, TaxJar, and Avalara connection options.
Payment processors and tax services are configured before checkout traffic goes live.
The Numi offer editor automation tab showing sequence controls beside the checkout canvas.
Automations decide what happens after the connected platform sends or receives purchase context.

Feature detail