Skip to main content
The React SDK provides hooks for reading feature flags, checking entitlements, consuming metered usage, and tracking events. All hooks require ArcenPayProvider to be mounted.

useFlag

Returns true or false for a single feature flag.

Signature

Returns false while the session is loading. Once the session resolves, returns the flag’s resolved value for the current company.

useFlags

Checks multiple flags at once and returns a record of results.

Signature

useEntitlement

Returns subscription state plus the resolved feature map for a wallet. Pass featureKey to filter the resolved feature map to a single feature.

Signature

Use this hook when you need on-chain subscription status or a feature map derived from dashboard entitlements, compatibility endpoints, and configured fallback feature values.

useConsumeEntitlement

Returns a consume function that decrements a metered entitlement.

Signature

Use client.consumeEntitlement() from the Node SDK when you need server-controlled idempotency keys or authoritative metered enforcement.

useTrack

Returns a track function for emitting usage events.

Signature

Events tracked via useTrack are sent to the ArcenPay backend and can be used for event-based feature flags and analytics.

FeatureFlagGuard

A component that conditionally renders children based on a flag:

Props

TemplateRenderer

Renders billing templates from JSON blocks created in the dashboard template library:
Block types: heading, text, price, feature-list, and cta. Payment links are created and managed server-side — the React SDK has no payment-link creation API (browser code can’t hold API keys).
  • Create / manage: ArcenClient.createPaymentLink(), listPaymentLinks(), getPaymentLink(), updatePaymentLink() from @arcenpay/node (see ArcenClient reference).
  • Agentic links: agent.createPaymentLink() from @arcenpay/agent for autonomous AI merchant flows (see ArcenAgent client).
  • Redirect humans: use the checkoutUrl the backend returns — it points to the hosted checkout page at /pay/:slug.

Next steps

Last modified on September 9, 2026