Documentation
This SDK syncs your Supabase tables, analytics Edge Function, and Clarity revenue splits into a single integration surface. Select an asset rail below and drop the component anywhere React renders.
SDK Quickstart
Install the SDK and import the Paywall primitives.
pnpm add @x402pay/sdk
Register content + assets in Supabase or via Edge Functions.
x402pay.register({ contentId, asset, price })Drop the PaywallButton or use the REST hooks for agents.
<PaywallButton contentId="pro-pack" asset="STX" />
sBTC Rail
Bitcoin security, L2 speed
import { PaywallButton } from '@x402pay/sdk'
<PaywallButton
contentId="sbtc-drop"
asset="sBTC"
price={0.001}
/>End-to-end flow
Signal
User or AI agent signs a Hiro wallet intent.
Contract
Revenue-split Clarity contract settles + logs analytics event.
Access
Supabase grants access, SDK unlocks premium content instantly.