Referral programs are proven growth drivers because they leverage trust. People are 4x more likely to try something recommended by a friend versus discovering it through ads. PayPal’s $20/$20 referral program produced 7-10% daily growth, while Dropbox’s free storage rewards drove 3900% growth in 15 months.
Create server-side invite pages that work across all platforms:
// pages/invite.tsxexport default function InvitePage({ code }: { code: string }) { useEffect(() => { // Redirect to mini app window.location.href = `https://world.org/mini-app?app_id=${YOUR_APP_ID}&path=/invite?code=${code}` }, [code]) return <div>Redirecting to mini app...</div>}
Universal-link formathttps://world.org/mini-app?app_id={app_id}&path={path}Deep-link (opens World App directly if installed)worldapp://mini-app?app_id={app_id}&path={path}To force opening in the device browser instead of the native webview, append open_out_of_window=true to the URL (works for both universal and deep links).Note: path should be URL encoded.
Add share buttons at key moments in your user journey:
import { MiniKit } from "@worldcoin/minikit-js";async function shareInvite() { const inviteLink = generateInviteLink(currentUser.id); try { await MiniKit.share({ title: "Join me on [Your App Name]!", text: `I'm using this amazing mini app. Join me and we both get rewards! 🎁`, url: inviteLink, }); // Track the share event trackEvent("invite_link_created", { user_id: currentUser.id, share_method: "native", }); } catch (error) { console.error("Share failed:", error); }}
World app universal links will forward the og:image from your integration url.Eg. world.org/mini-app?app_id=1234&path=/invite?code=abcd will forward the og:image from [your-miniapp-url]/invite?code=abcd.
Set up two-sided rewards with World ID verification
Track invite metrics and run small A/B tests
Scale successful invite mechanics across more touchpoints
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"World Documentation","colors":{"primary":"#007CFB","light":"#4B5563","dark":"#000000"},"logo":{"light":"https://mintcdn.com/tfh/qWu-FiJulvyUF2-J/logo/world-developers.svg?fit=max\u0026auto=format\u0026n=qWu-FiJulvyUF2-J\u0026q=85\u0026s=4019b92f6b5143abe368c7e608bac5e2","dark":"https://mintcdn.com/tfh/qWu-FiJulvyUF2-J/logo/world-developers-white.svg?fit=max\u0026auto=format\u0026n=qWu-FiJulvyUF2-J\u0026q=85\u0026s=12c968192e5d61404ba02e494368cee7"},"favicon":"https://mintcdn.com/tfh/QgV5KXRTJlR7G1Sc/favicon.ico?fit=max\u0026auto=format\u0026n=QgV5KXRTJlR7G1Sc\u0026q=85\u0026s=35ec0697e348f319bf61974f6ab09777","api":{"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","javascript"],"prefill":true}},"background":{"color":{"light":"#F9F9F8"}},"footer":{"socials":{"x":"https://x.com/worldnetwork","github":"https://github.com/worldcoin","discord":"https://world.org/discord"},"links":[{"items":[{"label":"About World","href":"https://world.org"},{"label":"Developers","href":"https://world.org/developers"},{"label":"Whitepaper","href":"https://whitepaper.world.org"},{"label":"Open Source","href":"https://github.com/worldcoin"},{"label":"Ecosystem","href":"https://world.org/ecosystem"},{"label":"Careers","href":"https://world.org/careers"}]}]},"seo":{"metatags":{"canonical":"https://docs.world.org","description":"Developer documentation for building with World ID, Mini Apps, and World Chain.","og:title":"World Developer Docs","og:description":"Build with World ID, Mini Apps, and World Chain.","og:image":"https://raw.githubusercontent.com/worldcoin/developer-docs/main/images/docs/docs-meta.png","og:image:type":"image/png","og:type":"website","og:site_name":"World Documentation","og:locale":"en_US","twitter:card":"summary_large_image","twitter:image":"https://raw.githubusercontent.com/worldcoin/developer-docs/main/images/docs/docs-meta.png","twitter:site":"@worldcoin","theme-color":"#000000","referrer":"origin-when-cross-origin"},"indexing":"all"},"fonts":{"heading":{"family":"World Pro MVP","weight":600,"source":"fonts/WorldProMVPVF-v2.woff2","format":"woff2"},"body":{"family":"World Pro MVP","weight":300,"source":"fonts/WorldProMVPVF-v2.woff2","format":"woff2"}},"styling":{"codeblocks":"system","latex":true},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"tfh","hasAudioNarration":false,"actualSubdomain":"tfh","customDomains":["docs.world.org"],"gitSource":{"type":"github","owner":"worldcoin","repo":"developer-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae33678217e82a3b924a10b","collectionId":"f78d09f8-b652-4996-a5fa-23f2dda8b45b","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae33678217e82a3b924a10b"},"feedback":{"thumbs":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae33678217e82a3b924a10b","clientVersion":"0.0.4021","searchFilterCounts":[{"language":"default","tag":"Mini Apps","count":49},{"language":"default","tag":"API Reference","count":31},{"language":"default","tag":"World ID","count":28},{"language":"default","tag":"World Chain","count":27},{"language":"default","tag":"Technical Reference","count":16},{"language":"default","tag":"IDKit","count":16},{"language":"default","tag":"Commands","count":15},{"language":"default","tag":"Developer Portal","count":12},{"language":"default","tag":"World ID Gateway","count":11},{"language":"default","tag":"Further Reading","count":10}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"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":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","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":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"tailwind.css","content":"@tailwind base;@tailwind components;@tailwind utilities;@layer base{html{font-family:\"World Pro MVP\",ui-sans-serif,system-ui,-apple-system,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,\"Noto Sans\",\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\"}}@layer components{#sidebar-content li[data-active=true]>a{background-color:#f3f2f0!important;color:#181818!important;border-radius:6px!important;text-shadow:none!important}.dark #sidebar-content li[data-active=true]>a{background-color:rgba(255,255,255,.08)!important;color:#f3f2f0!important}.dark img[src*=\"/icons/credentials/human-emblem.svg\"]{filter:invert(1)}.prose a:not([class]),.prose a:not([class]):focus,.prose a:not([class]):hover{color:#1989fb!important;text-decoration:none!important;background-image:none!important;border-bottom:none!important;box-shadow:none!important}.img-miniapps-template{width:220px!important;max-width:220px!important;height:auto!important}select,select option{color:inherit}:root select option{background-color:#fff;color:#0f172a}.dark select option{background-color:#0b1220;color:#e5e7eb}#navbar .nav-tabs{align-items:center;gap:0!important}#navbar .nav-tabs-item{height:32px!important;padding:6px 10px;border-radius:42px;color:#181818!important;transition:background-color .15s ease}#navbar .nav-tabs-item:hover{color:#181818!important;background-color:#f3f2f0}#navbar .nav-tabs-item[data-active=true]{padding:6px 14px;text-shadow:none}#navbar .nav-tabs-item[data-active=true],#navbar .nav-tabs-item[data-active=true]:hover{color:#f9f9f8!important;background-color:#181818}#navbar .nav-tabs-item>div.absolute{display:none}#navbar .nav-tabs>button.nav-tabs-item:first-of-type{margin-left:17px}#navbar .nav-tabs>button.nav-tabs-item:first-of-type::before{content:\"\";position:absolute;left:-9px;top:50%;transform:translateY(-50%);width:1px;height:24px;background-color:#e1dfda}.dark #navbar .nav-tabs>button.nav-tabs-item:first-of-type::before{background-color:rgba(255,255,255,.15)}.dark #navbar .nav-tabs-item{color:#f3f2f0!important}.dark #navbar .nav-tabs-item:hover{color:#f3f2f0!important;background-color:rgba(255,255,255,.08)}.dark #navbar .nav-tabs-item[data-active=true],.dark #navbar .nav-tabs-item[data-active=true]:hover{background-color:#f3f2f0;color:#181818!important}#navbar #search-bar-entry{border-radius:20px;background-color:#f9f9f8;box-shadow:none;--tw-ring-color:#E1DFDA;color:#181818}.dark #navbar #search-bar-entry{background-color:#18191b;--tw-ring-color:rgba(255, 255, 255, 0.15);color:#f3f2f0}#topbar-cta-button a>span.absolute{border-radius:20px}#navbar{container-type:inline-size}div:has(>#navbar){container-type:inline-size}@container (min-width: 1440px){#navbar #navbar-transition,#navbar #search-bar-entry span.text-xs{display:none}#navbar{margin-top:24px}#navbar>div.max-w-8xl{display:flex;align-items:center;column-gap:16px;width:calc(100% - 7.3cqw);max-width:1602px!important;height:84px;margin:0 auto;padding:0 25px 0 33px;background-color:#fff;border:1px solid #e1dfda;border-radius:18px;box-shadow:0 15px 20px -5px rgba(0,0,0,.03)}.dark #navbar>div.max-w-8xl{background-color:#18191b;border-color:rgba(255,255,255,.12)}#navbar div.lg\\:px-12,#navbar div.lg\\:px-12>div,#navbar>div.max-w-8xl>div,#navbar>div.max-w-8xl>div>div.relative{display:contents!important}#navbar div.lg\\:px-12>div>div.flex-1:first-child{order:1;flex:0 0 auto!important}#navbar .nav-tabs-item{white-space:nowrap}#navbar .max-w-8xl>div>div.px-12{order:2;position:static;width:max-content;flex-shrink:0;height:auto!important;padding:0!important;margin-left:auto}#navbar div.lg\\:px-12 div.z-20{order:3;flex:0 0 auto!important;margin-left:auto}#navbar div.lg\\:px-12 .nav-logo{height:17.5px!important}#navbar #search-bar-entry{width:auto!important;height:34px!important;padding:6px 14px!important;border-radius:20px;box-shadow:none}#navbar #assistant-entry{height:34px!important;padding:6px 14px!important;border-radius:20px!important;background-color:#f9f9f8!important;border:1px solid #e1dfda!important;box-shadow:none!important;color:#181818!important}#navbar #assistant-entry .text-xs,#navbar #assistant-entry kbd,#navbar div.lg\\:px-12>div>div.justify-end{display:none!important}.dark #navbar #assistant-entry{background-color:#18191b!important;border-color:rgba(255,255,255,.15)!important;color:#f3f2f0!important}}.quickstart-code .code-block{margin-top:.5rem!important;margin-bottom:.75rem!important}.quickstart-code .code-block .code-block-background,.quickstart-code .code-block .code-block-background pre.shiki{background:0 0!important;background-color:transparent!important}#footer.advanced-footer .nav-logo,#footer.advanced-footer div[class*=\"min-w-[140px]\"],#navbar #theme-preference-menu-trigger,.quickstart-code .code-block [data-fade-overlay=true],body>div.z-999.cursor-grab.touch-none[role=status],div[data-assistant-bar]{display:none!important}a.product-card{display:flex;align-items:flex-start;gap:24px;text-decoration:none}.product-card-tile{display:flex;align-items:center;justify-content:center;width:105px;height:112px;border-radius:24px;background-color:#f3f2f0;flex-shrink:0;transition:background-color .15s ease}.product-card:hover .product-card-tile{background-color:#edece9}.dark .product-card-tile{background-color:#18191b}.dark .landing-carousel-arrow:hover,.dark .product-card:hover .product-card-tile{background-color:#202124}.product-card-title{color:#181818}.dark .product-card-title{color:#fff}.product-card-desc{color:#75726f}.dark .product-card-desc{color:#9ea2a6}.dark .product-card-icon{filter:invert(1)}.landing-section-title{font-size:48px;line-height:1.15;letter-spacing:-.96px;font-weight:300;color:#181818}.dark .landing-section-title{color:#f3f2f0}.landing-section-sub{margin-top:12px;font-size:18px;line-height:1.4;font-weight:300;color:#75726f}.dark .landing-section-sub{color:#9ea2a6}@media (max-width:600px){.landing-section-title{font-size:32px;letter-spacing:-.64px}}.landing-story-card{width:calc((100% - 96px)/2 - 12px);aspect-ratio:4/3}@media (min-width:901px){.landing-stories-track{margin-right:-96px}}@media (max-width:900px){.landing-story-card{width:85%}}.landing-stories-track{scrollbar-width:none}.landing-stories-track::-webkit-scrollbar{display:none}.landing-carousel-arrow{background-color:#fff;border:1px solid #e1dfda;color:#181818;transition:background-color .15s ease}.landing-carousel-arrow:hover{background-color:#f3f2f0}.dark .landing-carousel-arrow{background-color:#18191b;border-color:rgba(255,255,255,.15);color:#f3f2f0}.landing-update{display:block;padding:40px 0;border-top:1px solid #e1dfda;text-decoration:none}.landing-update:last-child{border-bottom:1px solid #e1dfda}.dark .landing-update{border-color:rgba(255,255,255,.12)}.landing-update-title{font-size:24px;line-height:1.3;letter-spacing:-.24px;font-weight:300;color:#181818}.landing-update:hover .landing-update-title{text-decoration:underline;text-underline-offset:4px}.dark .landing-update-title{color:#f3f2f0}.landing-update-desc{margin:12px 0 0;max-width:886px;font-size:16px;line-height:1.5;font-weight:300;color:#75726f}.dark .landing-update-desc{color:#9ea2a6}.landing-hero{color:#2d2c2c}.dark .landing-hero,.dark .landing-link{color:#f3f2f0}.landing-link{color:#181818}.landing-link svg{fill:#181818}.dark .landing-link svg{fill:#f3f2f0}.landing-footer{padding:0}.landing-footer-inner{max-width:1728px;margin:0 auto;padding:0 96px 64px;display:flex;flex-direction:column;gap:64px}.landing-newsletter{background-color:#f3f2f0;border-radius:16px;padding:128px 40px}.dark .landing-newsletter{background-color:#161618}.landing-newsletter-title{color:#181818}.dark .landing-newsletter-title{color:#f3f2f0}.landing-email-field{background-color:#fff}.dark .landing-email-field{background-color:#2d2c2c}.landing-email-input{color:#2d2c2c}.landing-email-input::placeholder{color:#9d9b96}.dark .landing-email-input{color:#f3f2f0}.dark .landing-email-input::placeholder{color:#75726f}.landing-privacy-link{color:#2d2c2c!important}.dark .landing-privacy-link{color:#f3f2f0!important}.landing-footer-link{color:#181818;text-decoration:none}.landing-footer-link:hover{text-decoration:underline}.dark #footer.advanced-footer a.select-none::after,.dark .landing-footer-link,.dark .landing-footer-links,.dark .landing-hero-title{color:#f3f2f0}.landing-footer-links{color:#181818}#footer.advanced-footer{border-top:none!important}#footer.advanced-footer>div{max-width:1728px!important}@media (min-width:1024px){#footer.advanced-footer>div{padding:96px 96px 48px!important}}#footer.advanced-footer a.select-none::after{content:\"™ 2026 World\";font-size:16px;line-height:1.4;font-weight:300;color:#181818;white-space:nowrap}@media (min-width:768px){#footer.advanced-footer .md\\:justify-center{justify-content:flex-end!important;gap:40px!important}}#footer.advanced-footer a[class*=max-w-36]{max-width:none!important;font-size:16px!important;line-height:1.4;font-weight:300;color:#181818!important}#footer.advanced-footer a[class*=max-w-36]:hover{color:#181818!important;text-decoration:underline;text-underline-offset:4px}.dark #footer.advanced-footer a[class*=max-w-36],.dark #footer.advanced-footer a[class*=max-w-36]:hover{color:#f3f2f0!important}#footer.advanced-footer>div>div.h-px,#footer.advanced-footer>div>div:last-child{display:none!important}@media (max-width:900px){.landing-footer-inner{padding:0 24px 48px;gap:48px}.landing-newsletter{padding:64px 24px}.landing-footer-links{gap:16px 40px!important}}@media (max-width:600px){.landing-footer-inner{padding:0 16px 40px}.landing-newsletter{padding:40px 20px}.landing-newsletter-title{font-size:24px!important;letter-spacing:-.48px!important}.landing-email-field{padding:6px 6px 6px 20px!important}.landing-email-input{font-size:18px!important}.landing-footer-links{gap:12px 32px!important}}.landing-hero-title{font-size:64px;line-height:1.1;letter-spacing:-1.28px;font-weight:300;color:#181818}.landing-hero-sub{margin-top:24px;max-width:487px;font-size:24px;line-height:1.35;letter-spacing:-.24px;font-weight:300;color:#75726f}.dark .landing-hero-sub{color:#9ea2a6}@media (max-width:600px){.landing-hero-title{font-size:40px;letter-spacing:-.8px}.landing-hero-sub{font-size:18px}}.landing-card-grid{display:grid;grid-template-columns:repeat(2,1fr);column-gap:80px;row-gap:113px}@media (max-width:900px){.landing-card-grid{grid-template-columns:1fr;row-gap:40px}.product-card-tile{width:84px;height:90px}.product-card .product-card-title{font-size:24px!important}}.landing-container{max-width:1728px;margin:0 auto;padding:60px 96px 0;width:100%;box-sizing:border-box}@media (max-width:900px){.landing-container{padding:40px 24px 0}}@media (max-width:600px){.landing-container{padding:32px 16px 0}}@media (min-width:1024px){#navbar [class~=max-w-8xl],body:has(#navbar.is-not-custom) [class*=max-w-8xl]{max-width:1728px!important}#navbar .lg\\:px-12,#navbar .px-12{padding-left:96px!important;padding-right:96px!important}body:has(#navbar.is-not-custom) div[class*=\"is-not-custom]:px-4\"]{padding-left:80px!important;padding-right:80px!important}}}"}],"page":{"pagePath":"mini-apps/growth/invites-viral","slug":"/mini-apps/growth/invites-viral","pageMetadata":{"title":"Invites \u0026 Viral Loops","og:image":"https://raw.githubusercontent.com/worldcoin/developer-docs/main/images/docs/docs-meta.png","twitter:image":"https://raw.githubusercontent.com/worldcoin/developer-docs/main/images/docs/docs-meta.png","description":null,"href":"/mini-apps/growth/invites-viral"},"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={code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,OptimizedImage,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`why-it-works`,children:`Why It Works`}),`\n`,_jsxs(_components.p,{children:[`Referral programs are proven growth drivers because they leverage trust. People are 4x more likely to try something recommended by a friend versus discovering it through ads. PayPal’s `,`$20/$`,`20 referral program produced 7-10% daily growth, while Dropbox’s free storage rewards drove 3900% growth in 15 months.`]}),`\n`,_jsx(Heading,{level:`2`,id:`step-by-step-implementation`,children:`Step-by-Step Implementation`}),`\n`,_jsx(Heading,{level:`3`,id:`1-set-up-universal-links`,children:`1. Set Up Universal Links`}),`\n`,_jsx(_components.p,{children:`Create server-side invite pages that work across all platforms:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,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:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// pages/invite.tsx`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` default`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` InvitePage`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`code`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:` }`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`code`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},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:`\tuseEffect`}),_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:`\t\t// Redirect to mini app`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\twindow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`location`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`href`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `https://world.org/mini-app?app_id=\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`YOUR_APP_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u0026path=/invite?code=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`code`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t}, [`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`code`}),_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:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`\treturn`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`div`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Redirecting`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` to`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` mini`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` app`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...\u003c/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`div`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Universal-link format`}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`https://world.org/mini-app?app_id={app_id}\u0026path={path}`})}),`\n`,_jsx(_components.p,{children:`Deep-link (opens World App directly if installed)`}),`\n`,_jsx(_components.p,{children:_jsx(_components.code,{children:`worldapp://mini-app?app_id={app_id}\u0026path={path}`})}),`\n`,_jsxs(_components.p,{children:[`To force opening in the device browser instead of the native webview, append `,_jsx(_components.code,{children:`open_out_of_window=true`}),` to the URL (works for both universal and deep links).`]}),`\n`,_jsx(_components.p,{children:`Note: path should be URL encoded.`}),`\n`,_jsx(Heading,{level:`3`,id:`2-generate-share-links`,children:`2. Generate Share Links`}),`\n`,_jsx(_components.p,{children:`Create a shareable link that includes the referral information:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,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:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` generateInviteLink`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`userId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_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:` baseUrl`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://world.org/mini-app\"`}),_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:` appId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"your_app_id\"`}),_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:` path`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` encodeURIComponent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`/invite?code=\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`userId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},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:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`baseUrl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`?app_id=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`appId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u0026path=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`path`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_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`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`3-implement-share-functionality`,children:`3. Implement Share Functionality`}),`\n`,_jsx(_components.p,{children:`Add share buttons at key moments in your user journey:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`21`,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:`21`,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:`MiniKit`}),_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:` \"@worldcoin/minikit-js\"`}),_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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` shareInvite`}),_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:` inviteLink`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` generateInviteLink`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`currentUser`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_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:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_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:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` MiniKit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`share`}),_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:` title:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Join me on [Your App Name]!\"`}),_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:` text:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `I'm using this amazing mini app. Join me and we both get rewards! 🎁`\"}),_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:` url:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` inviteLink`}),_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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Track the share event`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` trackEvent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"invite_link_created\"`}),_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:` user_id:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` currentUser`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_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:` share_method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"native\"`}),_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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_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:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Share failed:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_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`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`4-handle-incoming-referrals`,children:`4. Handle Incoming Referrals`}),`\n`,_jsx(_components.p,{children:`Process referral codes when new users sign up:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,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:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// On app initialization`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` handleReferral`}),_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:` urlParams`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` URLSearchParams`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`location`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`search`}),_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:` refCode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` urlParams`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ref\"`}),_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:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`refCode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`currentUser`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`referredBy`}),_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:` // Credit the referrer`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/api/process-referral\"`}),_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:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_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:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_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:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_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:` newUserId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` currentUser`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_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:` referrerCode:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` refCode`}),_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`,children:_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`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`5-reward-system`,children:`5. Reward System`}),`\n`,_jsx(_components.p,{children:`Implement two-sided rewards that benefit both parties:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`26`,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:`26`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// api/process-referral.ts`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` processReferral`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` newUserId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` referrerCode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` referrer`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getUserByCode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`referrerCode`}),_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:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`referrer`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`success:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` false`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"invalid_referrer\"`}),_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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Credit both users`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Promise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`all`}),_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:` creditUser`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`referrer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_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:` type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"referral_bonus\"`}),_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:` amount:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 100`}),_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:` reason:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Friend joined via your invite\"`}),_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:` creditUser`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`newUserId`}),_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:` type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"signup_bonus\"`}),_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:` amount:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 50`}),_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:` reason:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Welcome bonus for joining via invite\"`}),_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`,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:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`success:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_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`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`6-support-deferred-deep-links-android`,children:`6. Support Deferred Deep Links (Android)`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,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:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`https://play.google.com/store/apps/details?id=com.worldcoin\u0026referrer=app_id%3D{app_id}%26path%3D{path}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`World App prompts the install and then automatically forwards the user to your specified path.`}),`\n`,_jsx(Heading,{level:`3`,id:`optimising-social-share-previews`,children:`Optimising Social-Share Previews`}),`\n`,_jsx(_components.p,{children:`World app universal links will forward the og:image from your integration url.`}),`\n`,_jsxs(_components.p,{children:[`Eg. `,_jsx(_components.code,{children:`world.org/mini-app?app_id=1234\u0026path=/invite?code=abcd`}),` will forward the og:image from `,_jsx(_components.code,{children:`[your-miniapp-url]/invite?code=abcd`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`inside-world-app-discovery`,children:`Inside World App Discovery`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Quick Actions`}),`: Mini apps can hand off context to one another. Split distinct flows into focused apps that trigger each other with Quick Actions.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Widget`}),`: Your mini app can live on the phone’s home screen. Prompt the user to add the mini app as a widget in the home screen.`]}),`\n`]}),`\n`]}),`\n`,_jsx(`div`,{className:`mint-flex mint-justify-center`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/tfh/vNgKkjbn9HQ46Vw7/images/docs/mini-apps/virality/widget.jpg?fit=max\u0026auto=format\u0026n=vNgKkjbn9HQ46Vw7\u0026q=85\u0026s=a218caf7c3c56916ace928e9d83fe564`,alt:`Widget`,className:`mint-m-auto mint-block`,width:`260`,style:{maxWidth:`260px`,height:`auto`},\"data-og-width\":`1179`,\"data-og-height\":`2556`,\"data-path\":`images/docs/mini-apps/virality/widget.jpg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/tfh/vNgKkjbn9HQ46Vw7/images/docs/mini-apps/virality/widget.jpg?w=280\u0026fit=max\u0026auto=format\u0026n=vNgKkjbn9HQ46Vw7\u0026q=85\u0026s=73905781faac3d04769f80f84005962b 280w, https://mintcdn.com/tfh/vNgKkjbn9HQ46Vw7/images/docs/mini-apps/virality/widget.jpg?w=560\u0026fit=max\u0026auto=format\u0026n=vNgKkjbn9HQ46Vw7\u0026q=85\u0026s=5e18889924dd43e82c1f7cf58cdac076 560w, https://mintcdn.com/tfh/vNgKkjbn9HQ46Vw7/images/docs/mini-apps/virality/widget.jpg?w=840\u0026fit=max\u0026auto=format\u0026n=vNgKkjbn9HQ46Vw7\u0026q=85\u0026s=c2b15da2a3ae2b71e5d98ee17a2c5da1 840w, https://mintcdn.com/tfh/vNgKkjbn9HQ46Vw7/images/docs/mini-apps/virality/widget.jpg?w=1100\u0026fit=max\u0026auto=format\u0026n=vNgKkjbn9HQ46Vw7\u0026q=85\u0026s=13211441c327893c84f446beb214359a 1100w, https://mintcdn.com/tfh/vNgKkjbn9HQ46Vw7/images/docs/mini-apps/virality/widget.jpg?w=1650\u0026fit=max\u0026auto=format\u0026n=vNgKkjbn9HQ46Vw7\u0026q=85\u0026s=d2ce8450c6e414881f7998091fca2a4a 1650w, https://mintcdn.com/tfh/vNgKkjbn9HQ46Vw7/images/docs/mini-apps/virality/widget.jpg?w=2500\u0026fit=max\u0026auto=format\u0026n=vNgKkjbn9HQ46Vw7\u0026q=85\u0026s=46d1e6a09906707fb43a25180c986037 2500w`})}),`\n`,_jsx(_components.p,{children:`Widget on iOS`}),`\n`,_jsx(Heading,{level:`2`,id:`design-best-practices`,children:`Design Best Practices`}),`\n`,_jsx(Heading,{level:`3`,id:`placement-strategy`,children:`Placement Strategy`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`After first value delivery`}),`: When user completes their first meaningful action`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Post-achievement`}),`: Right after earning a badge, completing a level, or winning`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Onboarding finale`}),`: As the last step of user setup`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`copy-that-converts`,children:`Copy That Converts`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Personal benefit first`}),`: “Get 100 coins for each friend who joins”`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Mutual benefit`}),`: “You both get rewards when they sign up”`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Social proof`}),`: “Join 10,000+ users already earning rewards”`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`visual-design`,children:`Visual Design`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Use prominent, action-oriented buttons (“Invite Friends”, “Share \u0026 Earn”)`}),`\n`,_jsx(_components.li,{children:`Show potential rewards clearly with icons or progress bars`}),`\n`,_jsx(_components.li,{children:`Include preview of what the shared content looks like`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`metrics-to-track`,children:`Metrics to Track`}),`\n`,_jsx(_components.p,{children:`Monitor these key events to measure your viral loop performance:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,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:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Essential tracking events`})}),`\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:` events`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_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:` invite_link_created:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`user_id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`share_method`}),_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:` invite_link_clicked:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ref_code`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`source`}),_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:` signup_source_invite:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ref_code`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`new_user_id`}),_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:` referral_reward_granted:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`referrer_id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`new_user_id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`reward_amount`}),_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`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`key-metrics-dashboard`,children:`Key Metrics Dashboard`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Invite Conversion Rate`}),`: (Signups from invites) / (Total invite links clicked)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`K-Factor`}),`: (New users from invites) / (Total active users)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Viral Cycle Time`}),`: Average time from invite sent to new user activated`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Reward Cost per Acquisition`}),`: Total rewards paid / New users acquired`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`quick-a/b-test-ideas`,children:`Quick A/B Test Ideas`}),`\n`,_jsx(_components.p,{children:`Test these variables to optimize your viral loop:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Reward Amount`}),`: Test 50 vs 100 vs 200 coin rewards`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Timing`}),`: Share prompt after first win vs after onboarding`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Copy`}),`: Personal benefit vs mutual benefit messaging`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Incentive Type`}),`: Coins vs premium features vs exclusive content`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Start with small reward amounts and scale up based on unit economics. Cap\ntotal lifetime rewards per user to control costs.`})}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next Steps`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Implement universal links for your invite flow`}),`\n`,_jsx(_components.li,{children:`Add share buttons after key user achievements`}),`\n`,_jsx(_components.li,{children:`Set up two-sided rewards with World ID verification`}),`\n`,_jsx(_components.li,{children:`Track invite metrics and run small A/B tests`}),`\n`,_jsx(_components.li,{children:`Scale successful invite mechanics across more touchpoints`}),`\n`]})]})}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":"Invites \u0026 Viral Loops","og:image":"https://raw.githubusercontent.com/worldcoin/developer-docs/main/images/docs/docs-meta.png","twitter:image":"https://raw.githubusercontent.com/worldcoin/developer-docs/main/images/docs/docs-meta.png","description":null,"href":"/mini-apps/growth/invites-viral"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Why It Works","slug":"why-it-works","depth":2,"children":[]},{"title":"Step-by-Step Implementation","slug":"step-by-step-implementation","depth":2,"children":[{"title":"1. Set Up Universal Links","slug":"1-set-up-universal-links","depth":3,"children":[]},{"title":"2. Generate Share Links","slug":"2-generate-share-links","depth":3,"children":[]},{"title":"3. Implement Share Functionality","slug":"3-implement-share-functionality","depth":3,"children":[]},{"title":"4. Handle Incoming Referrals","slug":"4-handle-incoming-referrals","depth":3,"children":[]},{"title":"5. Reward System","slug":"5-reward-system","depth":3,"children":[]},{"title":"6. Support Deferred Deep Links (Android)","slug":"6-support-deferred-deep-links-android","depth":3,"children":[]},{"title":"Optimising Social-Share Previews","slug":"optimising-social-share-previews","depth":3,"children":[]},{"title":"Inside World App Discovery","slug":"inside-world-app-discovery","depth":3,"children":[]}]},{"title":"Design Best Practices","slug":"design-best-practices","depth":2,"children":[{"title":"Placement Strategy","slug":"placement-strategy","depth":3,"children":[]},{"title":"Copy That Converts","slug":"copy-that-converts","depth":3,"children":[]},{"title":"Visual Design","slug":"visual-design","depth":3,"children":[]}]},{"title":"Metrics to Track","slug":"metrics-to-track","depth":2,"children":[{"title":"Key Metrics Dashboard","slug":"key-metrics-dashboard","depth":3,"children":[]}]},{"title":"Quick A/B Test Ideas","slug":"quick-a/b-test-ideas","depth":2,"children":[]},{"title":"Next Steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"dynamicCss":".mint-m-auto {\n margin: auto\n}\n.mint-block {\n display: block\n}\n.mint-flex {\n display: flex\n}\n.mint-justify-center {\n justify-content: center\n}","subdomain":"tfh","siteName":"World Documentation","title":"World Developer Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-29T12:05:35.868Z","originalFileLocation":"mini-apps/growth/invites-viral.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=\"Developer documentation for building with World ID, Mini Apps, and World Chain.\">\u003cmeta data-mint-head name=\"application-name\" content=\"World Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/tfh/SP2ajHCQBmwCHsCV/_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/tfh/SP2ajHCQBmwCHsCV/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/tfh/SP2ajHCQBmwCHsCV/_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/tfh/SP2ajHCQBmwCHsCV/_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/tfh/SP2ajHCQBmwCHsCV/_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/tfh/SP2ajHCQBmwCHsCV/_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/tfh/SP2ajHCQBmwCHsCV/_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/tfh/SP2ajHCQBmwCHsCV/_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/tfh/SP2ajHCQBmwCHsCV/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"World Developer Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Build with World ID, Mini Apps, and World Chain.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"World Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.world.org/mini-apps/growth/invites-viral\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://raw.githubusercontent.com/worldcoin/developer-docs/main/images/docs/docs-meta.png\">\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=\"World Developer Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Build with World ID, Mini Apps, and World Chain.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://raw.githubusercontent.com/worldcoin/developer-docs/main/images/docs/docs-meta.png\">\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/tfh/SP2ajHCQBmwCHsCV/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"World Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#007CFB\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003cmeta data-mint-head name=\"og:image:type\" content=\"image/png\">\u003cmeta data-mint-head name=\"theme-color\" content=\"#000000\">\u003cmeta data-mint-head name=\"referrer\" content=\"origin-when-cross-origin\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.world.org/mini-apps/growth/invites-viral\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/mini-apps/growth/invites-viral.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.world.org/#organization\",\"name\":\"World Documentation\",\"url\":\"https://docs.world.org\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/tfh/qWu-FiJulvyUF2-J/logo/world-developers.svg?fit=max\u0026auto=format\u0026n=qWu-FiJulvyUF2-J\u0026q=85\u0026s=4019b92f6b5143abe368c7e608bac5e2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.world.org#website\",\"name\":\"World Documentation\",\"url\":\"https://docs.world.org\",\"publisher\":{\"@id\":\"https://docs.world.org/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.world.org/mini-apps/growth/invites-viral#webpage\",\"url\":\"https://docs.world.org/mini-apps/growth/invites-viral\",\"name\":\"Invites \u0026 Viral Loops\",\"dateModified\":\"2026-10-29T12:05:35.868Z\",\"isPartOf\":{\"@id\":\"https://docs.world.org#website\"},\"breadcrumb\":{\"@id\":\"https://docs.world.org/mini-apps/growth/invites-viral#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.world.org/mini-apps/growth/invites-viral#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Further Reading\",\"item\":\"https://docs.world.org/mini-apps/more/webview-spec\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Growth Playbook\",\"item\":\"https://docs.world.org/mini-apps/growth/index\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Invites \u0026 Viral Loops\",\"item\":\"https://docs.world.org/mini-apps/growth/invites-viral\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.world.org/mini-apps/growth/invites-viral#article\",\"headline\":\"Invites \u0026 Viral Loops\",\"name\":\"Invites \u0026 Viral Loops\",\"url\":\"https://docs.world.org/mini-apps/growth/invites-viral\",\"mainEntityOfPage\":{\"@id\":\"https://docs.world.org/mini-apps/growth/invites-viral#webpage\"},\"image\":\"https://raw.githubusercontent.com/worldcoin/developer-docs/main/images/docs/docs-meta.png\",\"dateModified\":\"2026-10-29T12:05:35.868Z\",\"publisher\":{\"@id\":\"https://docs.world.org/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.world.org#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"World Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"World Documentation","nav":{"global":null,"tabs":[{"tab":"Home","pages":[{"title":"Home","href":""}]},{"tab":"World ID","pages":[{"title":"World ID","href":"/world-id/overview"}]},{"tab":"Mini Apps","groups":[{"group":"Introduction","pages":[{"title":"What are Mini Apps?","href":"/mini-apps"}]},{"group":"Integrate","pages":[{"title":"Getting Started","href":"/mini-apps/quick-start/installing"},{"title":"Initialization","href":"/mini-apps/quick-start/init"},{"title":"Commands","href":"/mini-apps/quick-start/commands"},{"title":"Responses","href":"/mini-apps/quick-start/responses"},{"title":"Testing your mini app","href":"/mini-apps/quick-start/testing"},{"title":"Mini App Store","href":"/mini-apps/quick-start/app-store"},{"group":"Guidelines","pages":[{"title":"App Guidelines","href":"/mini-apps/guidelines/app-guidelines"},{"title":"Design Guidelines","href":"/mini-apps/guidelines/design-guidelines"},{"title":"App Review Guidelines","href":"/mini-apps/guidelines/policy"},{"title":"Notification Guidelines","href":"/mini-apps/guidelines/features-and-guidelines"}]}]},{"group":"Commands","pages":[{"title":"World ID","href":"/mini-apps/commands/verify"},{"title":"Pay","href":"/mini-apps/commands/pay"},{"title":"Wallet Authentication","href":"/mini-apps/commands/wallet-auth"},{"title":"Send Transaction","href":"/mini-apps/commands/send-transaction"},{"title":"World Chat","href":"/mini-apps/commands/chat"},{"title":"Sign Message","href":"/mini-apps/commands/sign-message"},{"title":"Sign Typed Data","href":"/mini-apps/commands/sign-typed-data"},{"title":"Share Contacts","href":"/mini-apps/commands/share-contacts"},{"title":"Request Permission","href":"/mini-apps/commands/request-permission"},{"title":"Get Permissions","href":"/mini-apps/commands/get-permissions"},{"title":"Send Notifications","href":"/mini-apps/commands/how-to-send-notifications"},{"title":"Send Haptic Feedback","href":"/mini-apps/commands/send-haptic-feedback"},{"title":"Share","href":"/mini-apps/commands/share"},{"title":"Attestation","href":"/mini-apps/commands/attestation"},{"title":"Close Mini App","href":"/mini-apps/commands/close-miniapp"}]},{"group":"Technical Reference","pages":[{"title":"Address Book","href":"/mini-apps/reference/address-book"},{"title":"Usernames","href":"/mini-apps/reference/usernames"},{"title":"Status Page","href":"/mini-apps/reference/status-page"},{"title":"Payment Methods","href":"/mini-apps/reference/payment-methods"},{"title":"Microphone","href":"/mini-apps/reference/microphone"},{"group":"Quick Actions","pages":[{"title":"Link to your Mini App","href":"/mini-apps/sharing/quick-actions"},{"title":"Add Money","href":"/mini-apps/sharing/add-money-qa"},{"title":"Swap","href":"/mini-apps/sharing/swap-qa"},{"title":"Earn WLD Pool","href":"/mini-apps/sharing/earn-wld-qa"},{"title":"DNA Send \u0026 Swap","href":"/mini-apps/sharing/dna-qa"},{"title":"Sage Support","href":"/mini-apps/sharing/sage-qa"}]}]},{"group":"Migration","pages":[{"title":"Migrate a Web App to Mini App","href":"/mini-apps/migration/web-to-miniapp"},{"title":"Upgrade to a Standalone Web App","href":"/mini-apps/migration/standalone-dapp"},{"title":"MiniKit 2.0 Migration","href":"/mini-apps/migration/minikit-v2"}]},{"group":"Further Reading","pages":[{"title":"Webview Specifications","href":"/mini-apps/more/webview-spec"},{"title":"Ecosystem Tools","href":"/mini-apps/ecosystem/ecosystem"},{"title":"Community Perks","href":"/mini-apps/more/community-tools-perks"},{"title":"FAQ","href":"/mini-apps/more/faq"},{"group":"Growth Playbook","pages":[{"title":"Overview","description":null,"href":"/mini-apps/growth/index"},{"title":"Invites \u0026 Viral Loops","href":"/mini-apps/growth/invites-viral"},{"title":"Gamification","description":null,"href":"/mini-apps/growth/gamification"},{"title":"Retention via Notifications","href":"/mini-apps/growth/notifications"},{"title":"Data \u0026 Analytics","href":"/mini-apps/growth/analytics"}]}]}]},{"tab":"Agents","pages":[{"title":"Agents","href":"/agents/agent-kit/integrate"}]},{"tab":"World Chain","pages":[{"title":"World Chain","href":"/world-chain"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/developer-portal/verify"}]},{"tab":"MCP","pages":[{"title":"MCP","href":"/model-context-protocol"}]},{"tab":"Resources","menu":[{"item":"Developer Portal","href":"https://developer.worldcoin.org"},{"item":"World Tech Blog","href":"https://world.org/blog?blog_type=world-tech"},{"item":"Open Source","href":"https://github.com/worldcoin"},{"item":"Whitepaper","href":"https://whitepaper.world.org"},{"item":"Ecosystem","href":"https://world.org/ecosystem"}]},{"tab":"Support","menu":[{"item":"Telegram Support Channel","href":"https://t.me/worlddevelopersupport"},{"item":"Email Support","href":"mailto:developers@toolsforhumanity.com"},{"item":"Mini Apps FAQ","href":"/mini-apps/more/faq"}]}]},"title":"World Developer Docs","buildId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","deploymentId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-CVZVK4hN.js","lightbox-handle-r17bVUz3.js"]}