Rako attributes a conversion when an agent recommendation carries AAP context into the merchant checkout or conversion flow.The model is deliberately boring infrastructure:
The agent asks Rako for eligible offers that match the user’s intent.
GET /v1/offers?vertical=sim&data_gb_min=10&contract_months=0
Rako returns active offers and a session identifier. Offers include commercial terms and a signed AAP Code that identifies the merchant, offer, price, currency, and commission basis.
Sessions are bounded. If the user does not reach checkout during the session window, attribution must be restarted or recovered through a lower-confidence fallback path.
When the agent presents an offer, it records the recommendation.
POST /v1/recommendContent-Type: application/json{ "sessionId": "01KN6KV0TWMH8VS6TDS3S7V2EJ", "offerId": "01JQXK1001EXAMPLEOFFER001", "context": "User wanted a no-contract SIM with at least 10GB of data"}
The response includes a recommendationId. This is the attribution handle used at checkout.
When the user chooses the offer, the agent initiates checkout with the session and recommendation.
POST /v1/checkoutContent-Type: application/json{ "sessionId": "01KN6KV0TWMH8VS6TDS3S7V2EJ", "recommendationId": "01KN6KWQDZ6Y5HPW8KFSDPKNSQ"}
For merchants with hosted checkout configured, Rako creates a backend-owned checkout link and can attach AAP context to the checkout or payment record. The returned URL is a handoff for the buyer; it does not prove payment, conversion, commission, or settlement eligibility.
A conversion is recorded when Rako receives platform-side evidence that the payable outcome happened.For instant checkout, that evidence may be an authenticated payment event from a payment processor plus reconciliation against signed AAP metadata. For longer-cycle verticals, the evidence can be a merchant-reported conversion plus milestones such as install_scheduled, service_activated, or first_bill_paid.
The hosted payment-verification path is in beta. Do not treat payment-observed conversions as trustless or production-grade until webhook authentication, AAP Code verification on event receipt, payload matching, amount matching, and payment-status checks are deployed and tested.
A user asks an agent for a cheap UK SIM with no contract and at least 10GB of data.
The agent searches Rako and receives an Example Mobile 30GB rolling monthly offer.
The agent recommends Example Mobile and records why it made the recommendation.
The user says yes; the agent calls checkout and shows the returned checkout URL.
The user completes the hosted checkout journey.
Rako receives platform-side outcome evidence with the AAP metadata.
Rako records a conversion if the evidence validates, then applies validation, refund, dispute, clawback, and settlement rules.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Rako Developer Docs","colors":{"primary":"#5E17EB","light":"#9D6BF5","dark":"#5E17EB"},"logo":{"light":"https://mintcdn.com/rako/yEG74M3UjkQjACaj/logo/light.svg?fit=max\u0026auto=format\u0026n=yEG74M3UjkQjACaj\u0026q=85\u0026s=e5bb53a0792d4a9a2925e3c6e14d1192","dark":"https://mintcdn.com/rako/yEG74M3UjkQjACaj/logo/dark.svg?fit=max\u0026auto=format\u0026n=yEG74M3UjkQjACaj\u0026q=85\u0026s=63eb243498eabe2398766002fd815620","href":"https://rako.sh"},"favicon":"https://mintcdn.com/rako/yEG74M3UjkQjACaj/favicon-32.png?fit=max\u0026auto=format\u0026n=yEG74M3UjkQjACaj\u0026q=85\u0026s=5d408d5854086f65d1146068f56d677e","navbar":{"primary":{"type":"button","label":"Get API key","href":"https://rako.sh/contact"}},"seo":{"metatags":{"og:image":"/og-image.png","theme-color":"#5E17EB"}},"fonts":{"family":"Blogger","weight":400,"source":"fonts/Blogger-Regular.woff2","format":"woff2"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"rako","hasAudioNarration":false,"actualSubdomain":"rako","customDomains":["docs.rako.sh"],"gitSource":{"type":"github","owner":"rakohq","repo":"developer-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a20d9c80ef2d296d8db6499","collectionId":"2b80990f-9b1e-4561-8109-bce8f086e763","schemaVersion":"v2"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae95626021c491c8f58a59b:success","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"default","tag":"API","count":6},{"language":"default","tag":"API Reference","count":5},{"language":"default","tag":"Guides","count":5},{"language":"default","tag":"AAP","count":3},{"language":"default","tag":"Protocol","count":3},{"language":"default","tag":"Start","count":3},{"language":"default","tag":"Overview","count":3},{"language":"default","tag":"Commerce","count":2},{"language":"default","tag":"Examples","count":2},{"language":"default","tag":"MCP","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","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":"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":"turbopuffer-dual-write","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},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"aap/attribution-flow","slug":"/aap/attribution-flow","pageMetadata":{"title":"Attribution Flow","description":"How Rako attributes agent-driven commerce.","href":"/aap/attribution-flow"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"How Rako attributes agent-driven commerce.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`1`,id:`attribution-flow`,children:`Attribution Flow`}),`\n`,_jsx(_components.p,{children:`Rako attributes a conversion when an agent recommendation carries AAP context into the merchant checkout or conversion flow.`}),`\n`,_jsx(_components.p,{children:`The model is deliberately boring infrastructure:`}),`\n`,_jsx(CodeBlock,{filename:``,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:`search → recommend → checkout → convert → settle`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`1-search`,children:`1. Search`}),`\n`,_jsx(_components.p,{children:`The agent asks Rako for eligible offers that match the user’s intent.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,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:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`GET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /v1/offers?vertical=sim\u0026data_gb_min=10\u0026contract_months=0`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Rako returns active offers and a session identifier. Offers include commercial terms and a signed AAP Code that identifies the merchant, offer, price, currency, and commission basis.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`14`,children:[_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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sessionId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"01KN6KV0TWMH8VS6TDS3S7V2EJ\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"offers\"`}),_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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"01JQXK1001EXAMPLEOFFER001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"provider\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Example Mobile\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"30GB Rolling Monthly\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GBP\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"aapCode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"aap://rako.sh/v1/...\"`})]}),`\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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"expiresAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-04-03T08:00:00.000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Sessions are bounded. If the user does not reach checkout during the session window, attribution must be restarted or recovered through a lower-confidence fallback path.`}),`\n`,_jsx(Heading,{level:`2`,id:`2-recommend`,children:`2. Recommend`}),`\n`,_jsx(_components.p,{children:`When the agent presents an offer, it records the recommendation.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`http`,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:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /v1/recommend`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Content-Type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` application/json`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sessionId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"01KN6KV0TWMH8VS6TDS3S7V2EJ\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"offerId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"01JQXK1001EXAMPLEOFFER001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"context\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"User wanted a no-contract SIM with at least 10GB of data\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The response includes a `,_jsx(_components.code,{children:`recommendationId`}),`. This is the attribution handle used at checkout.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"recommendationId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"01KN6KWQDZ6Y5HPW8KFSDPKNSQ\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fallbackUrl\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://aap.link/r/01KN6KWQDZ6Y5HPW8KFSDPKNSQ\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"attributionRecorded\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`3-checkout`,children:`3. Checkout`}),`\n`,_jsx(_components.p,{children:`When the user chooses the offer, the agent initiates checkout with the session and recommendation.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`http`,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:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /v1/checkout`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Content-Type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` application/json`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sessionId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"01KN6KV0TWMH8VS6TDS3S7V2EJ\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"recommendationId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"01KN6KWQDZ6Y5HPW8KFSDPKNSQ\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`For merchants with hosted checkout configured, Rako creates a backend-owned checkout link and can attach AAP context to the checkout or payment record. The returned URL is a handoff for the buyer; it does not prove payment, conversion, commission, or settlement eligibility.`}),`\n`,_jsx(Heading,{level:`2`,id:`4-convert`,children:`4. Convert`}),`\n`,_jsx(_components.p,{children:`A conversion is recorded when Rako receives platform-side evidence that the payable outcome happened.`}),`\n`,_jsxs(_components.p,{children:[`For instant checkout, that evidence may be an authenticated payment event from a payment processor plus reconciliation against signed AAP metadata. For longer-cycle verticals, the evidence can be a merchant-reported conversion plus milestones such as `,_jsx(_components.code,{children:`install_scheduled`}),`, `,_jsx(_components.code,{children:`service_activated`}),`, or `,_jsx(_components.code,{children:`first_bill_paid`}),`.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`The hosted payment-verification path is in beta. Do not treat payment-observed conversions as trustless or production-grade until webhook authentication, AAP Code verification on event receipt, payload matching, amount matching, and payment-status checks are deployed and tested.`})}),`\n`,_jsx(Heading,{level:`2`,id:`5-settle`,children:`5. Settle`}),`\n`,_jsx(_components.p,{children:`Conversions remain in the ledger through validation, refund, dispute, clawback, and settlement states. Once a conversion is eligible, Rako calculates:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`merchant commission owed`}),`\n`,_jsx(_components.li,{children:`Rako network fee`}),`\n`,_jsx(_components.li,{children:`builder payout`}),`\n`,_jsx(_components.li,{children:`invoice and settlement status`}),`\n`]}),`\n`,_jsx(_components.p,{children:`The result is binary attribution: the conversion either flowed through an AAP recommendation that can be reconciled, or it did not.`}),`\n`,_jsx(Heading,{level:`2`,id:`example-agent-recommended-sim-checkout`,children:`Example: agent-recommended SIM checkout`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`A user asks an agent for a cheap UK SIM with no contract and at least 10GB of data.`}),`\n`,_jsx(_components.li,{children:`The agent searches Rako and receives an Example Mobile 30GB rolling monthly offer.`}),`\n`,_jsx(_components.li,{children:`The agent recommends Example Mobile and records why it made the recommendation.`}),`\n`,_jsx(_components.li,{children:`The user says yes; the agent calls checkout and shows the returned checkout URL.`}),`\n`,_jsx(_components.li,{children:`The user completes the hosted checkout journey.`}),`\n`,_jsx(_components.li,{children:`Rako receives platform-side outcome evidence with the AAP metadata.`}),`\n`,_jsx(_components.li,{children:`Rako records a conversion if the evidence validates, then applies validation, refund, dispute, clawback, and settlement rules.`}),`\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":{"config":{},"pageMetadata":{"title":"Attribution Flow","description":"How Rako attributes agent-driven commerce.","href":"/aap/attribution-flow"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Attribution Flow","slug":"attribution-flow","depth":1,"children":[]},{"title":"1. Search","slug":"1-search","depth":2,"children":[]},{"title":"2. Recommend","slug":"2-recommend","depth":2,"children":[]},{"title":"3. Checkout","slug":"3-checkout","depth":2,"children":[]},{"title":"4. Convert","slug":"4-convert","depth":2,"children":[]},{"title":"5. Settle","slug":"5-settle","depth":2,"children":[]},{"title":"Example: agent-recommended SIM checkout","slug":"example-agent-recommended-sim-checkout","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"rako","siteName":"Rako Developer Docs","title":"Attribution Flow - Rako Developer Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-05-01T09:16:58.831Z","originalFileLocation":"aap/attribution-flow.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=\"How Rako attributes agent-driven commerce.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Rako Developer Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/rako/ylD2TURjd4Oyb47J/_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/rako/ylD2TURjd4Oyb47J/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/rako/ylD2TURjd4Oyb47J/_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/rako/ylD2TURjd4Oyb47J/_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/rako/ylD2TURjd4Oyb47J/_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/rako/ylD2TURjd4Oyb47J/_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/rako/ylD2TURjd4Oyb47J/_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/rako/ylD2TURjd4Oyb47J/_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/rako/ylD2TURjd4Oyb47J/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Attribution Flow - Rako Developer Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"How Rako attributes agent-driven commerce.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Rako Developer Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.rako.sh/aap/attribution-flow\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://rako.mintlify.app/og-image.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=\"Attribution Flow - Rako Developer Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"How Rako attributes agent-driven commerce.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://rako.mintlify.app/og-image.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/rako/ylD2TURjd4Oyb47J/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Rako Developer Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5E17EB\">\u003cmeta data-mint-head name=\"theme-color\" content=\"#5E17EB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.rako.sh/aap/attribution-flow\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/aap/attribution-flow.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.rako.sh/#organization\",\"name\":\"Rako Developer Docs\",\"url\":\"https://docs.rako.sh\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/rako/yEG74M3UjkQjACaj/logo/light.svg?fit=max\u0026auto=format\u0026n=yEG74M3UjkQjACaj\u0026q=85\u0026s=e5bb53a0792d4a9a2925e3c6e14d1192\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.rako.sh#website\",\"name\":\"Rako Developer Docs\",\"url\":\"https://docs.rako.sh\",\"publisher\":{\"@id\":\"https://docs.rako.sh/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.rako.sh/aap/attribution-flow#webpage\",\"url\":\"https://docs.rako.sh/aap/attribution-flow\",\"name\":\"Attribution Flow\",\"description\":\"How Rako attributes agent-driven commerce.\",\"dateModified\":\"2026-05-01T09:16:58.831Z\",\"isPartOf\":{\"@id\":\"https://docs.rako.sh#website\"},\"breadcrumb\":{\"@id\":\"https://docs.rako.sh/aap/attribution-flow#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.rako.sh/aap/attribution-flow#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Protocol\",\"item\":\"https://docs.rako.sh/aap/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Attribution Flow\",\"item\":\"https://docs.rako.sh/aap/attribution-flow\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.rako.sh/aap/attribution-flow#article\",\"headline\":\"Attribution Flow\",\"name\":\"Attribution Flow\",\"description\":\"How Rako attributes agent-driven commerce.\",\"url\":\"https://docs.rako.sh/aap/attribution-flow\",\"mainEntityOfPage\":{\"@id\":\"https://docs.rako.sh/aap/attribution-flow#webpage\"},\"image\":\"https://docs.rako.sh/og-image.png\",\"dateModified\":\"2026-05-01T09:16:58.831Z\",\"publisher\":{\"@id\":\"https://docs.rako.sh/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.rako.sh#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Rako Developer Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Rako Developer Docs","nav":{"global":null,"tabs":[{"tab":"Start","pages":[{"title":"Start","href":""}]},{"tab":"MCP","pages":[{"title":"MCP","href":"/mcp/overview"}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks/javascript"}]},{"tab":"AAP","groups":[{"group":"Protocol","pages":[{"title":"AAP Overview","description":"Agent Attribution Protocol concepts.","href":"/aap/overview"},{"title":"Attribution Flow","href":"/aap/attribution-flow"},{"title":"Conversions","description":"Conversion events, webhooks, reconciliation, and payable milestones.","href":"/aap/conversions"}]}]},{"tab":"API","pages":[{"title":"API","href":"/api/authentication"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/commission-flow"}]}]},"basePath":"","title":"Attribution Flow - Rako Developer Docs","buildId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","deploymentId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","dynamics":[],"chunks":[]}