Framing url produces a blank box and one console line
(frame-ancestors 'none'), with no request reaching us and nothing in your
logs. If an embed is blank, check which of the two you used first.
Embedding keeps the payer on your site. Doing that alone works fine — the page
can connect its own wallet.To match the page to your brand, pass theme parameters on the
URL — colours, font, and corner radius, no CSS.
Bridging a connected wallet
If your app has already connected a wallet, making the payer connect a
second time inside the iframe is a real drop-off point. The parent bridge lends
your existing connection to the frame: the iframe asks for signatures, your
provider produces them, and the payer never reconnects.
import { createParentBridge } from "@hypermid/sdk";// The iframe must be pointed at `embedUrl`. The bridge cannot help a frame// that was refused before it loaded.const bridge = createParentBridge({ iframe: document.getElementById("hypermid") as HTMLIFrameElement, provider: walletClient.transport, // any EIP-1193 provider address: connectedAddress, chainId: currentChainId, onReady: () => setFrameReady(true), onPaymentComplete: (paymentId, txHash, paidAmount) => { // The payer's transaction is in. Show a confirmation — but treat your // webhook as the trigger to release goods. showPending(txHash); }, onError: (paymentId, reason) => showError(reason),});bridge.start();
The iframe bridge is enabled only when the session’s server response contains
the merchant page origin. Add that exact origin when creating a publishable
key in the partner portal; sessions for a partner/environment with no allowed
origin keep the hosted widget working but disable parent-wallet bridging.Call bridge.stop() when the iframe unmounts, or the listener outlives it.
onPaymentComplete means the payer submitted a transaction — not that
funds have settled. Cross-chain routes still have a bridge leg to finish.
Release goods on the webhook plus a session read, never on
this callback. It is a UI signal, not a settlement signal.
Keeping the bridge in sync
The bridge is constructed with an address and a chain id. If your user switches
either, tear the bridge down and start a new one — otherwise the frame keeps
signing against the wallet state you handed it at mount:
Messages are origin-checked in both directions — the parent validates the
frame’s origin against an allowlist before acting on anything it says, and the
iframe does the same for the parent. The bridge always fetches signable data
from https://server.hypermid.io; it has no caller-supplied API host.Never pass a secret key here. The bridge is browser code; sessions are created
on your server.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Hypermid","description":"Accept crypto payments and move funds across chains. Checkout, deposit, withdrawal and swap orchestration through one API.","colors":{"primary":"#2157FF","light":"#5B8CFF","dark":"#2157FF"},"logo":{"light":"https://mintcdn.com/hypermid/ZgoQ9v7kwZNXAi8T/branding/wordmark-light.svg?fit=max\u0026auto=format\u0026n=ZgoQ9v7kwZNXAi8T\u0026q=85\u0026s=3d6e533d402b8e8877972a1e467eeb8b","dark":"https://mintcdn.com/hypermid/ZgoQ9v7kwZNXAi8T/branding/wordmark-dark.svg?fit=max\u0026auto=format\u0026n=ZgoQ9v7kwZNXAi8T\u0026q=85\u0026s=58f4c0b9df5610df24e8a9e6cb9793da","href":"https://hypermid.io"},"favicon":"https://mintcdn.com/hypermid/AmEN-tehvpi6yz0-/branding/favicon.svg?fit=max\u0026auto=format\u0026n=AmEN-tehvpi6yz0-\u0026q=85\u0026s=c22b526f09d8dde79ad633cb984d7ede","api":{"playground":{"display":"interactive"},"examples":{"languages":["curl","javascript","python"]}},"appearance":{"default":"system"},"background":{"color":{"light":"#f9f8f5","dark":"#0a0a0a"}},"navbar":{"links":[{"href":"mailto:support@hypermid.io","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://partner.hypermid.io"}},"footer":{"socials":{"website":"https://hypermid.io","x":"https://x.com/hypermid"}},"seo":{"indexing":"navigable"},"fonts":{"family":"Geist","weight":400,"source":"fonts/GeistVF.woff","format":"woff"},"styling":{"codeblocks":"system","latex":false},"contextual":{"options":["copy","view","chatgpt","claude","grok","cursor","vscode","add-mcp","mcp","download-spec"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"hypermid","hasAudioNarration":false,"actualSubdomain":"hypermid","customDomains":["docs.hypermid.io"],"gitSource":{"type":"github","owner":"hypermid-io","repo":"offchain-agents","deployBranch":"main","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":"","_id":"6b10dd149ffae5051c40fdaf"},"entitlements":{},"buildId":"6b12eafe30343046f0ec4eb2","clientVersion":"0.0.4453","searchFilterCounts":[{"language":"default","tag":"API Reference","count":52},{"language":"default","tag":"Endpoints","count":42},{"language":"default","tag":"Documentation","count":18},{"language":"default","tag":"payments","count":14},{"language":"default","tag":"Webhooks","count":10},{"language":"default","tag":"catalog","count":8},{"language":"default","tag":"SDK","count":7},{"language":"default","tag":"@hypermid/sdk","count":7},{"language":"default","tag":"Payments","count":6},{"language":"default","tag":"onramp","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--hm-bg: #f9f8f5;--hm-surface: #ffffff;--hm-text: #0a0a0a;--hm-muted: #6b6b6b;--hm-hint: #5a5a58;--hm-border: rgba(0, 0, 0, 0.08);--hm-border-strong: rgba(0, 0, 0, 0.14);--hm-accent: #2157ff;--hm-accent-wash: rgba(33, 87, 255, 0.12)}.dark{--hm-bg: #0a0a0a;--hm-surface: #161616;--hm-text: #f0f0ee;--hm-muted: #a0a09e;--hm-hint: #aeaead;--hm-border: rgba(255, 255, 255, 0.08);--hm-border-strong: rgba(255, 255, 255, 0.14);--hm-accent: #5b8cff;--hm-accent-wash: rgba(91, 140, 255, 0.16)}:root,.dark{--radius: 0px;--radius-sm: 0px;--radius-md: 0px;--radius-lg: 0px;--radius-xl: 0px;--radius-2xl: 0px;--radius-3xl: 0px;--radius-full: 0px}*,*::before,*::after{border-radius:0!important}html,body,button,input,textarea,select,code,pre,kbd,samp{font-family:\"Geist\", system-ui, sans-serif}.prose p,.prose ul,.prose ol,.prose li,.prose table,.mdx-content p,.mdx-content ul,.mdx-content ol,.mdx-content li{font-size:14px;line-height:1.65}.prose h1,.mdx-content h1{font-size:1.875rem;letter-spacing:-0.02em}.prose h2,.mdx-content h2{font-size:1.5rem;letter-spacing:-0.015em}.prose h3,.mdx-content h3{font-size:1.125rem;letter-spacing:-0.01em}.prose pre code,.mdx-content pre code{font-size:13px;line-height:1.6}.prose code,.mdx-content code{font-size:0.875em}.prose :not(pre)>code,.mdx-content :not(pre)>code{background:var(--hm-accent-wash);border:1px solid var(--hm-border);padding:0.1em 0.35em}.prose table,.mdx-content table{border:1px solid var(--hm-border);overflow:hidden}.prose thead,.mdx-content thead{background:var(--hm-accent-wash)}.prose th,.mdx-content th{font-weight:600;letter-spacing:0.01em}.prose td,.prose th,.mdx-content td,.mdx-content th{border-color:var(--hm-border)}.param-field-description{font-size:13px;color:var(--hm-muted)}.eyebrow{font-size:0.75rem;font-weight:500;text-transform:uppercase;letter-spacing:0.1em;color:var(--hm-muted)}"}]}
{"page":{"pagePath":"sdk/widget","slug":"/sdk/widget","pageMetadata":{"title":"Widget","description":"Embed the hosted payment page, and optionally lend it the wallet your user already connected.","href":"/sdk/widget"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Embed the hosted payment page, and optionally lend it the wallet your user already connected.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`A session comes back with `,_jsx(_components.strong,{children:`two`}),` URLs, and they are not interchangeable:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Route`}),_jsx(_components.th,{children:`Use it to`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`url`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`/pay/:id`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Redirect`}),` the payer. Deliberately NOT framable — it answers `,_jsx(_components.code,{children:`X-Frame-Options: DENY`}),` as anti-clickjacking.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`embedUrl`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`/embed?paymentId=…`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Embed`}),` in an iframe. Served with no framing headers.`]})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`redirect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`session`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// redirect`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`iframe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` src`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{session.embedUrl!} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`/>`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // embed`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Framing `,_jsx(_components.code,{children:`url`}),` produces a blank box and one console line\n(`,_jsx(_components.code,{children:`frame-ancestors 'none'`}),`), with no request reaching us and nothing in your\nlogs. If an embed is blank, check which of the two you used first.`]})}),`\n`,_jsx(_components.p,{children:`Embedding keeps the payer on your site. Doing that alone works fine — the page\ncan connect its own wallet.`}),`\n`,_jsxs(_components.p,{children:[`To match the page to your brand, pass `,_jsx(_components.a,{href:`/sdk/theming`,children:`theme parameters`}),` on the\nURL — colours, font, and corner radius, no CSS.`]}),`\n`,_jsx(Heading,{level:`2`,id:`bridging-a-connected-wallet`,children:`Bridging a connected wallet`}),`\n`,_jsxs(_components.p,{children:[`If your app has `,_jsx(_components.strong,{children:`already`}),` connected a wallet, making the payer connect a\nsecond time inside the iframe is a real drop-off point. The parent bridge lends\nyour existing connection to the frame: the iframe asks for signatures, your\nprovider produces them, and the payer never reconnects.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`20`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`20`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createParentBridge`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@hypermid/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:\"// The iframe must be pointed at `embedUrl`. The bridge cannot help a frame\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// that was refused before it loaded.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` bridge`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createParentBridge`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` iframe:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` document`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getElementById`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"hypermid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` HTMLIFrameElement`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` provider:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` walletClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`transport`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// any EIP-1193 provider`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` address:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` connectedAddress`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` chainId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` currentChainId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` onReady`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` setFrameReady`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` onPaymentComplete`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`paymentId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`txHash`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`paidAmount`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // The payer's transaction is in. Show a confirmation — but treat your`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // webhook as the trigger to release goods.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` showPending`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`txHash`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` onError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`paymentId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`reason`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` showError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`reason`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bridge`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`start`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The iframe bridge is enabled only when the session’s server response contains\nthe merchant page origin. Add that exact origin when creating a `,_jsx(_components.code,{children:`publishable`}),`\nkey in the partner portal; sessions for a partner/environment with no allowed\norigin keep the hosted widget working but disable parent-wallet bridging.`]}),`\n`,_jsxs(_components.p,{children:[`Call `,_jsx(_components.code,{children:`bridge.stop()`}),` when the iframe unmounts, or the listener outlives it.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`onPaymentComplete`}),` means the payer `,_jsx(_components.strong,{children:`submitted`}),` a transaction — not that\nfunds have settled. Cross-chain routes still have a bridge leg to finish.\nRelease goods on the `,_jsx(_components.a,{href:`/guides/webhooks`,children:`webhook`}),` plus a session read, never on\nthis callback. It is a UI signal, not a settlement signal.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`keeping-the-bridge-in-sync`,children:`Keeping the bridge in sync`}),`\n`,_jsx(_components.p,{children:`The bridge is constructed with an address and a chain id. If your user switches\neither, tear the bridge down and start a new one — otherwise the frame keeps\nsigning against the wallet state you handed it at mount:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`useEffect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` bridge`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createParentBridge`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`iframe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`provider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`address`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`chainId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, … });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` bridge`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`start`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` bridge`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}, [`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`address`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`chainId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`security`,children:`Security`}),`\n`,_jsxs(_components.p,{children:[`Messages are origin-checked in both directions — the parent validates the\nframe’s origin against an allowlist before acting on anything it says, and the\niframe does the same for the parent. The bridge always fetches signable data\nfrom `,_jsx(_components.code,{children:`https://server.hypermid.io`}),`; it has no caller-supplied API host.`]}),`\n`,_jsxs(_components.p,{children:[`Never pass a secret key here. The bridge is browser code; sessions are created\non your `,_jsx(_components.a,{href:`/sdk/payments`,children:`server`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Widget","description":"Embed the hosted payment page, and optionally lend it the wallet your user already connected.","href":"/sdk/widget"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Bridging a connected wallet","slug":"bridging-a-connected-wallet","depth":2,"children":[]},{"title":"Keeping the bridge in sync","slug":"keeping-the-bridge-in-sync","depth":2,"children":[]},{"title":"Security","slug":"security","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"hypermid","siteName":"Hypermid","title":"Widget - Hypermid","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-29T09:42:56.541Z","originalFileLocation":"sdk/widget.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Embed the hosted payment page, and optionally lend it the wallet your user already connected.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Hypermid\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/hypermid/qyyB5eOK2Rv0IBDo/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/hypermid/qyyB5eOK2Rv0IBDo/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/hypermid/qyyB5eOK2Rv0IBDo/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/hypermid/qyyB5eOK2Rv0IBDo/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/hypermid/qyyB5eOK2Rv0IBDo/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/hypermid/qyyB5eOK2Rv0IBDo/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/hypermid/qyyB5eOK2Rv0IBDo/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/hypermid/qyyB5eOK2Rv0IBDo/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/hypermid/qyyB5eOK2Rv0IBDo/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Widget - Hypermid\">\u003cmeta data-mint-head property=\"og:description\" content=\"Embed the hosted payment page, and optionally lend it the wallet your user already connected.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Hypermid\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.hypermid.io/sdk/widget\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://hypermid.mintlify.site/_mintlify/api/og/v2?division=%40hypermid%2Fsdk\u0026amp;title=Widget\u0026amp;description=Embed+the+hosted+payment+page%2C+and+optionally+lend+it+the+wallet+your+user+already+connected.\u0026amp;theme=7f6a3e58a9c5ff5d60958e15\u0026amp;signature=8661c8e54182b4bf9a0d3afa9c0d71ecc5a98d2da8d7343363fdf0453f848396\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Widget - Hypermid\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Embed the hosted payment page, and optionally lend it the wallet your user already connected.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://hypermid.mintlify.site/_mintlify/api/og/v2?division=%40hypermid%2Fsdk\u0026amp;title=Widget\u0026amp;description=Embed+the+hosted+payment+page%2C+and+optionally+lend+it+the+wallet+your+user+already+connected.\u0026amp;theme=7f6a3e58a9c5ff5d60958e15\u0026amp;signature=8661c8e54182b4bf9a0d3afa9c0d71ecc5a98d2da8d7343363fdf0453f848396\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/hypermid/qyyB5eOK2Rv0IBDo/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Hypermid\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2157FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.hypermid.io/sdk/widget\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/sdk/widget.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.hypermid.io/#organization\",\"name\":\"Hypermid\",\"url\":\"https://docs.hypermid.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/hypermid/ZgoQ9v7kwZNXAi8T/branding/wordmark-light.svg?fit=max\u0026auto=format\u0026n=ZgoQ9v7kwZNXAi8T\u0026q=85\u0026s=3d6e533d402b8e8877972a1e467eeb8b\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.hypermid.io#website\",\"name\":\"Hypermid\",\"url\":\"https://docs.hypermid.io\",\"publisher\":{\"@id\":\"https://docs.hypermid.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.hypermid.io/sdk/widget#webpage\",\"url\":\"https://docs.hypermid.io/sdk/widget\",\"name\":\"Widget\",\"description\":\"Embed the hosted payment page, and optionally lend it the wallet your user already connected.\",\"dateModified\":\"2026-09-29T09:42:56.541Z\",\"isPartOf\":{\"@id\":\"https://docs.hypermid.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.hypermid.io/sdk/widget#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.hypermid.io/sdk/widget#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"@hypermid/sdk\",\"item\":\"https://docs.hypermid.io/sdk/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Widget\",\"item\":\"https://docs.hypermid.io/sdk/widget\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.hypermid.io/sdk/widget#article\",\"headline\":\"Widget\",\"name\":\"Widget\",\"description\":\"Embed the hosted payment page, and optionally lend it the wallet your user already connected.\",\"url\":\"https://docs.hypermid.io/sdk/widget\",\"mainEntityOfPage\":{\"@id\":\"https://docs.hypermid.io/sdk/widget#webpage\"},\"dateModified\":\"2026-09-29T09:42:56.541Z\",\"publisher\":{\"@id\":\"https://docs.hypermid.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.hypermid.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Hypermid\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Hypermid\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/sdk/widget.md","siteName":"Hypermid","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"API Reference","icon":"square-terminal","pages":[{"title":"API Reference","href":"/api-reference/overview"}]},{"tab":"SDK","icon":"code","groups":[{"group":"@hypermid/sdk","pages":[{"title":"SDK overview","href":"/sdk/overview"},{"title":"Payments","description":"Create and read sessions from your server.","href":"/sdk/payments"},{"title":"Widget","href":"/sdk/widget"},{"title":"Theming","description":"Match the hosted payment page to your brand with URL parameters — no CSS, no build step.","href":"/sdk/theming"},{"title":"Customization","href":"/sdk/customization"},{"title":"Swap","href":"/sdk/swap"},{"title":"Read client","href":"/sdk/read-client"}]}]}]},"basePath":"","title":"Widget - Hypermid","deploymentId":"dpl_BLZw3QngerHodH9E8mGgC4v752y3","buildId":"dpl_BLZw3QngerHodH9E8mGgC4v752y3","dynamics":[],"chunks":[]}