Payments
Create and read sessions. Server only — carries your secret key.
Webhooks
verifyWebhook — constant-time signature check over the raw body, with the
rotation overlap handled. Node only.Widget
Embed the hosted payment page, optionally bridging a connected wallet.
Swap
Quote a route and get back what the user should execute.
Read client
Chains, tokens, balances, status. Safe anywhere.
Customization
Every knob — theming, the widget bridge, client options, webhook verification.
Import paths
Import from@hypermid/sdk. Everything is re-exported there, and it is
what every example in these docs uses.
The subpaths exist for tree-shaking and for making the runtime boundary visible
at the import site — @hypermid/sdk/payments is the server-only half — but
they resolve to the same functions:
The one rule
payments.* sends your secret key. It throws immediately if window
exists:
quoteSwap, the read client — is designed
for the browser and takes a publishable key or none at all.
Types
The package ships TypeScript types generated from the same OpenAPI document that produces this documentation, so the types and these pages cannot disagree.QuoteResponse is exported as ApiQuoteResponse. The name collided: the
API’s route quote and the SDK’s own swap result are different shapes, and the
established SwapQuote kept the plain name.