A button and a hook that open the checkout over your app. Built on @ketapay/checkout, which does the work; this package fits it to React. React 18 or later. Source on GitHub.
Your server creates the checkout session and gives your app its url, as in How it works.

The button

Anything else a <button> takes (className, style, disabled, id) is passed through. The button has no styles of its own, and its default label is “Pay with KetaPay”.
onSuccess can’t prove a payment. Wait for the escrow.funded webhook or fetch the session before you ship anything.

The hook

For your own button, a menu item, or opening the checkout after something else happens:
open takes the same options as KetaPay.open and returns the same { close, result }. A checkout still showing when the component unmounts is closed for you.

Next.js and server rendering

Both are client components (the package is marked 'use client'), and nothing touches the browser until the checkout opens, so they render on the server without errors. Call open from an event handler or an effect, never during render.

Errors and everything else

Errors (KetaPayCheckoutError with code invalid_url, not_in_browser or load_failed), branding, Content Security Policy, the sandbox and supported browsers are the same as in JavaScript. KetaPayCheckoutError and the types are re-exported from @ketapay/react.