BarkerEngine contract. The iframe handles wallet connection, gas, transaction confirmations, and APY display.
If you’d rather build your own UI on top of the REST API and call the engine contract directly, see Headless API integration. Both modes share the same engines, the same key, the same fee split — only the UI surface differs. See Choosing an integration mode if you’re undecided.
One-line integration
your-product-slug with the slug of the product you have provisioned (visible in Portal → Products — there’s a copy-embed button on each card).
That’s it. No API key in the iframe URL — slugs are public, the embed authenticates against the on-chain engine, not the API.
Sizing
| Mode | Recommended height |
|---|---|
| Desktop card on a dashboard | 640px |
| Mobile full-screen | 100vh (mind the browser toolbar) |
| Tight modal | 560px minimum — under that, the deposit form scrolls |
min-height: 640px and height: 100%. We don’t auto-resize via postMessage today — the iframe content fits whatever height you give it.
Theming (Portal-configured, recommended)
Theme is configured per-product, in the Portal, not via the URL. Open Portal → Theme and pick the product — color, logo, and brand text are saved on our side and applied to every render. Same iframe URL renders consistently across hosts.Theming (URL override, for testing)
For ad-hoc preview or A/B testing, these query params take precedence over the saved theme:| Param | Type | Example |
|---|---|---|
primaryColor | CSS color (hex / rgb() / named) | ?primaryColor=%23FF6600 |
partnerName | Display name shown in the header | ?partnerName=Acme%20Pay |
logo | URL to your logo (https only) | ?logo=https%3A%2F%2Fcdn.acme.com%2Flogo.svg |
#FF6600 becomes %23FF6600.
Sandbox vs production
- Sandbox: any product slug from your sandbox tier in the Portal. Wired to a testnet
BarkerEnginewith mintable mock USDC — point the iframe at it during development. - Production: production-tier slug. Real chain, real USDC.
Wallet UX
The embed uses Reown AppKit (formerly WalletConnect). End users:- See your branding (logo, color, name)
- Click “Connect Wallet” → standard WalletConnect modal
- Connect MetaMask / Rabby / Coinbase Wallet / mobile via QR
- Approve USDC spend → deposit → receive engine shares
- APY accrues passively in the same view
- Withdraw any time — burn shares, receive USDC + accrued yield
Production checklist
- Product status is
active(notpending_deploy) in Portal → Products - Theme configured in Portal → Theme
- Your CSP allows
frame-src https://app.barker.money(orframe-src *while you’re testing) - Mobile viewport tested — the deposit form scrolls under 560px height
When iframe is the wrong choice
Build with headless API instead if:- The flow needs to be inline in a multi-step form (KYC → deposit → confirmation)
- You want native mobile UI (iframe works in WebView but loses native feel)
- You want one screen to choose among several Barker products with custom comparison UI (one iframe = one product, so 3 tiers = 3 iframes)
- You need server-side rendering with zero client JS