The @arcenpay/react package is the browser-side SDK for ArcenPay. It provides a context provider for initialization, a drop-in billing component, and hooks for feature gating and entitlements. Payment link creation and management is a server-side concern — do it with @arcenpay/node (ArcenClient) or @arcenpay/agent, then use the returned checkoutUrl in your React UI.
Installation
Exports
Payment links
The React SDK does not create payment links — that is a backend job that
requires an API key. Create and manage them with:
@arcenpay/node — client.createPaymentLink(), listPaymentLinks(), getPaymentLink(), updatePaymentLink() (server-side).
@arcenpay/agent — agent.createPaymentLink() for autonomous AI merchant links.
- Dashboard — Catalog → Payment Links.
Each created link returns a checkoutUrl (e.g. https://app.arcenpay.com/pay/…). Use that URL for human redirects, or render ArcenEmbed for in-app checkout. Never construct checkoutUrls by hand in the browser — always use the URL returned by the backend.
Quick example
Environmental variables
Client-only
All components and hooks in @arcenpay/react require the browser. In Next.js App Router, add "use client" to any file that imports from @arcenpay/react.
ArcenPay integrates ERC-7579 smart accounts for gas sponsorship. The SDK fetches the configured bundler and paymaster endpoints automatically, so your customers don’t need gas tokens for on-chain actions.
Optional: RainbowKit / wagmi
If your app uses RainbowKit or wagmi, wrap ArcenPayProvider inside your existing wallet provider. ArcenPay builds on wagmi and shares the wallet connection.
Next steps
Last modified on October 4, 2026