Copy-paste prompts for AI coding assistants to integrate Partnero into your application. Works with Cursor, GitHub Copilot, ChatGPT, Claude, and other AI tools.
These are ready-to-use prompts you can paste into AI coding assistants like Cursor, GitHub Copilot, ChatGPT, or Claude. Each prompt includes the API context the AI needs to generate correct, working code for your Partnero integration.
How to use
Pick the prompt that matches your integration scenario
Copy it and paste it into your AI coding assistant
Replace YOUR_API_KEY and YOUR_PROGRAM_ID with your actual values from the Partnero dashboard
Add a line describing your tech stack (e.g., “I’m using Next.js 14 with App Router, Prisma, and NextAuth”)
If possible, point the AI to your existing sign-up or payment code so it knows where to add the integration
Affiliate program
Full affiliate tracking
Prompt: Add affiliate tracking to my app
Integrate Partnero affiliate tracking into my application.My tech stack: [DESCRIBE YOUR STACK HERE]Context about Partnero:- Partnero is an affiliate/partner management platform- API base URL: https://api.partnero.com/v1/- Authentication: Bearer token in Authorization header- API key: YOUR_API_KEY- Program ID: YOUR_PROGRAM_IDWhat needs to happen:1. FRONTEND — Add this PartneroJS snippet before </head> on all pages:<script> (function(p,t,n,e,r,o){ p['__partnerObject']=r;function f(){ var c={ a:arguments,q:[]};var r=this.push(c);return "number"!=typeof r?r:f.bind(c.q);} f.q=f.q||[];p[r]=p[r]||f.bind(f.q);p[r].q=p[r].q||f.q;o=t.createElement(n); var _=t.getElementsByTagName(n)[0];o.async=1;o.src=e+'?v'+(~~(new Date().getTime()/1e6)); _.parentNode.insertBefore(o,_);})(window, document, 'script', 'https://app.partnero.com/js/universal.js', 'po'); po('settings', 'assets_host', 'https://assets.partnero.com'); po('program', 'YOUR_PROGRAM_ID', 'load');</script>This script reads the partner key from referral URLs (e.g., ?ref=PARTNER_KEY)and stores it in a "partnero_partner" first-party cookie.2. BACKEND — In my existing sign-up/registration handler, read the"partnero_partner" cookie from the HTTP request and call:POST https://api.partnero.com/v1/customersHeaders: Authorization: Bearer YOUR_API_KEY, Content-Type: application/jsonBody:{ "partner": { "key": "VALUE_FROM_COOKIE" }, "key": "unique_customer_id", "email": "[email protected]", "name": "Customer Name"}3. BACKEND — In my existing payment/checkout handler, after a successfulpayment call:POST https://api.partnero.com/v1/transactionsHeaders: Authorization: Bearer YOUR_API_KEY, Content-Type: application/jsonBody:{ "customer": { "key": "unique_customer_id" }, "key": "unique_transaction_id", "amount": 99.99, "action": "sale"}Important rules:- Only create a customer when the "partnero_partner" cookie is present. In an affiliate program a customer belongs to a partner, so the API rejects a customer with no partner attached.- Send transactions for ALL purchases. Ones for customers that were never referred are rejected, which is expected and harmless.- Make Partnero API calls non-blocking. If the API is down, the sign-up or purchase should still succeed. Use try/catch and log errors.- The customer "key" must be the same value in both the sign-up and transaction calls — this is how Partnero links them.- Use the invoice/order ID as the transaction "key" so refunds can be handled by deleting the transaction later.Please find my existing sign-up and payment handlers and add the Partnerointegration to them.
Sign-up tracking with Stripe/Paddle
Use this if your payment processor (Stripe, Paddle, Chargebee) is already connected to Partnero and handles transactions automatically. You only need to track sign-ups.
Add Partnero affiliate sign-up tracking to my registration flow. I alreadyhave Stripe/Paddle connected to Partnero for transaction tracking, so I onlyneed to track customer sign-ups.My tech stack: [DESCRIBE YOUR STACK HERE]When a user signs up in my app, read the "partnero_partner" cookie from theHTTP request and send it to Partnero's API.API call:POST https://api.partnero.com/v1/customersHeaders: Authorization: Bearer YOUR_API_KEY, Content-Type: application/jsonBody:{ "partner": { "key": "VALUE_FROM_PARTNERO_PARTNER_COOKIE" }, "key": "unique_customer_id_or_email", "email": "[email protected]", "name": "First Name", "surname": "Last Name"}Important rules:- The "partnero_partner" cookie is a first-party cookie set by a frontend JavaScript snippet when users arrive via referral links- Only send this when the "partnero_partner" cookie is present. In an affiliate program the API rejects a customer with no partner attached.- Use the user's internal ID or email as the "key" — this is what Stripe/Paddle uses to match transactions to customers- Make this call non-blocking with try/catch. If Partnero API is down, the sign-up should still succeed.The PartneroJS snippet is already installed on my frontend. Please find mysign-up handler and add the Partnero API call.
Transaction tracking only
Prompt: Track sales for affiliate commissions
Add Partnero transaction tracking to my payment/checkout flow.My tech stack: [DESCRIBE YOUR STACK HERE]After a successful payment, send the transaction to Partnero so the referringpartner earns their commission.API call:POST https://api.partnero.com/v1/transactionsHeaders: Authorization: Bearer YOUR_API_KEY, Content-Type: application/jsonBody:{ "customer": { "key": "the_customer_id_used_during_signup" }, "key": "unique_order_or_invoice_id", "amount": 99.99, "action": "sale"}Important rules:- customer.key must match the key used when the customer was created in Partnero- Use invoice/order ID as the transaction key so you can delete it for refunds- Send for ALL purchases — Partnero ignores transactions for non-referred customers- Optional fields: "product_id" and "product_type" for advanced commission rules- Make this non-blocking with try/catchFor refunds, delete the transaction:DELETE https://api.partnero.com/v1/transactions/{transaction_key}Headers: Authorization: Bearer YOUR_API_KEYPlease find my payment success handler and add the Partnero call.
Refer-a-friend program
Full referral tracking
Prompt: Add refer-a-friend tracking to my app
Integrate Partnero refer-a-friend tracking into my application.My tech stack: [DESCRIBE YOUR STACK HERE]Context about Partnero:- Partnero is a referral program platform- API base URL: https://api.partnero.com/v1/- Authentication: Bearer token in Authorization header- API key: YOUR_API_KEY- Program ID: YOUR_PROGRAM_IDWhat needs to happen:1. FRONTEND — Add this PartneroJS snippet before </head> on all pages:<script> (function(p,t,n,e,r,o){ p['__partnerObject']=r;function f(){ var c={ a:arguments,q:[]};var r=this.push(c);return "number"!=typeof r?r:f.bind(c.q);} f.q=f.q||[];p[r]=p[r]||f.bind(f.q);p[r].q=p[r].q||f.q;o=t.createElement(n); var _=t.getElementsByTagName(n)[0];o.async=1;o.src=e+'?v'+(~~(new Date().getTime()/1e6)); _.parentNode.insertBefore(o,_);})(window, document, 'script', 'https://app.partnero.com/js/universal.js', 'po'); po('settings', 'assets_host', 'https://assets.partnero.com'); po('program', 'YOUR_PROGRAM_ID', 'load');</script>This script reads the referral key from URLs (e.g., ?ref=REFERRAL_KEY)and stores it in a "partnero_referral" first-party cookie.2. BACKEND — In my existing sign-up handler, create a customer in Partnerofor EVERY sign-up:POST https://api.partnero.com/v1/customersHeaders: Authorization: Bearer YOUR_API_KEY, Content-Type: application/jsonIf the "partnero_referral" cookie exists (referred user):{ "referring_customer": { "key": "VALUE_FROM_COOKIE" }, "key": "unique_customer_id", "email": "[email protected]", "name": "Customer Name"}If NO cookie exists (organic sign-up, becomes a potential referrer):{ "key": "unique_customer_id", "email": "[email protected]", "name": "Customer Name"}The response includes a "referral_link" field — save it for the user.3. BACKEND — In my payment handler, track purchases by referred customers:POST https://api.partnero.com/v1/transactionsHeaders: Authorization: Bearer YOUR_API_KEY, Content-Type: application/json{ "customer": { "key": "unique_customer_id" }, "key": "unique_transaction_id", "amount": 99.99, "action": "sale"}Important rules:- Create ALL customers in Partnero, not just referred ones (everyone can refer)- Make all Partnero API calls non-blocking with try/catch- The customer "key" must be consistent across sign-up and transaction calls- Store the referral_link from the sign-up response for the user's dashboardPlease find my sign-up and payment handlers and add the integration.
Referral dashboard
Prompt: Build an in-app referral dashboard
Create a referral dashboard page where users can see their referral link,stats, and rewards from Partnero.My tech stack: [DESCRIBE YOUR STACK HERE]The backend needs to call these Partnero API endpoints (all GET requestswith header "Authorization: Bearer YOUR_API_KEY"):1. Customer details + referral link: GET https://api.partnero.com/v1/customers/{customer_id} Returns: referral_link, referrals_count, email, name2. Referral statistics: GET https://api.partnero.com/v1/customers/{customer_id}/stats Returns: click counts, referral counts, social sharing links3. Reward balance: GET https://api.partnero.com/v1/customers/{customer_id}/balance Returns: balance amounts by currency4. Referred friends: GET https://api.partnero.com/v1/customers/{customer_id}/referrals Returns: array of referred customers with name, email, status, created_atThe dashboard UI should include:- The user's referral link with a "Copy link" button- Social share buttons (use links from the stats response)- Total referrals count and reward balance- A table of referred friends with their name and statusFetch all 4 endpoints in parallel from the backend. Never call the PartneroAPI from the frontend — keep the API key server-side.
Webhooks
Prompt: Handle Partnero webhook events
Set up a webhook endpoint to receive real-time events from Partnero.My tech stack: [DESCRIBE YOUR STACK HERE]Partnero sends POST requests with JSON body to your webhook URL.Event types:- partner.created, partner.updated, partner.deleted, partner.approved, partner.rejected, partner.archived- customer.created, customer.updated, customer.deleted- transaction.created, transaction.deletedExample payload:{ "event": "transaction.created", "data": { "id": "txn_123", "amount": 99.99, "customer": { "key": "customer_123" } }, "timestamp": "2025-05-07T10:30:00.000000Z"}Requirements:- Create a POST endpoint at /webhooks/partnero (or similar)- Parse the JSON body and route events by the "event" field- Return a 200 status within 5 seconds- Process heavy logic asynchronously (queue, background job)- Make the handler idempotent — Partnero retries failed webhooks, so you may receive the same event twice- Log all incoming webhook events for debuggingPlease implement this endpoint and add handlers for the event types listed.
Mobile apps
Prompt: Add referral tracking to my mobile app
Integrate Partnero referral tracking into my mobile app.My tech stack: [DESCRIBE YOUR STACK HERE, e.g. Swift/iOS, Kotlin/Android,React Native, Flutter]Context: Partnero normally tracks referrals via browser cookies. In mobileapps, there are no cookies, so we extract the referral key from deep linksand pass it to the backend.What needs to happen:1. DEEP LINK HANDLING: When the app opens from a URL like "yoursite.com?ref=PARTNER_KEY": - Extract the "ref" query parameter value - Store it persistently (UserDefaults on iOS, SharedPreferences on Android, AsyncStorage on React Native, SharedPreferences on Flutter) - The key should survive app restarts2. ON SIGN-UP: Include the stored referral key in the sign-up request to my backend. My backend then calls: POST https://api.partnero.com/v1/customers Headers: Authorization: Bearer YOUR_API_KEY, Content-Type: application/json Body (for affiliate programs): { "partner": { "key": "STORED_REFERRAL_KEY" }, "key": "unique_user_id", "email": "[email protected]", "name": "User Name" } Body (for refer-a-friend programs): { "referring_customer": { "key": "STORED_REFERRAL_KEY" }, "key": "unique_user_id", "email": "[email protected]", "name": "User Name" } After successful creation, clear the stored referral key.3. ON PURCHASE: My backend calls: POST https://api.partnero.com/v1/transactions Headers: Authorization: Bearer YOUR_API_KEY, Content-Type: application/json { "customer": { "key": "unique_user_id" }, "key": "order_id", "amount": 49.99, "action": "sale" }Important: NEVER call the Partnero API from the mobile app directly.Always route through the backend to keep the API key secure.Please implement the deep link handler in the app and the API calls inthe backend.
Refund handling
Prompt: Reverse commissions on refund
When a refund happens in my app, delete the corresponding transaction inPartnero so the partner's commission is reversed.My tech stack: [DESCRIBE YOUR STACK HERE]API call:DELETE https://api.partnero.com/v1/transactions/{transaction_key}Headers: Authorization: Bearer YOUR_API_KEYThe transaction_key is the unique key used when the transaction was created(e.g., the invoice or order ID).Add this to my existing refund handler. After the refund is processed withthe payment provider, call the Partnero API to delete the transaction. Makeit non-blocking with try/catch — the refund should succeed even if Partnerois unreachable.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Partnero","colors":{"primary":"#134E4A","light":"#134E4A","dark":"#0D9488"},"logo":{"light":"https://mintcdn.com/partnero/gINf_F3u_8GmW16y/images/partnero-black.svg?fit=max\u0026auto=format\u0026n=gINf_F3u_8GmW16y\u0026q=85\u0026s=a61ae64c8a722513b3eb0564bc371392","dark":"https://mintcdn.com/partnero/7W6berVyUt7cGwZs/images/partnero-white.png?fit=max\u0026auto=format\u0026n=7W6berVyUt7cGwZs\u0026q=85\u0026s=ad0f2c11e5d97e1a44089c942b90c6af"},"favicon":"https://mintcdn.com/partnero/gINf_F3u_8GmW16y/images/partnero-symbol.svg?fit=max\u0026auto=format\u0026n=gINf_F3u_8GmW16y\u0026q=85\u0026s=15596439022c16abf73457f39e239e85","api":{},"navbar":{"links":[{"href":"mailto:[email protected]","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.partnero.com"}},"footer":{"socials":{}},"styling":{"codeblocks":"system","latex":true},"contextual":{"options":["copy","chatgpt","claude","cursor","vscode"],"display":"header"},"metadata":{"timestamp":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"partnero","hasAudioNarration":false,"actualSubdomain":"partnero","customDomains":["docs.partnero.com"],"gitSource":{"type":"github","owner":"partnero","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"agentFeedback":true,"thumbs":true},"entitlements":{},"buildId":"6aedc496e0f593fc3df2b346","clientVersion":"0.0.4167","searchFilterCounts":[{"language":"default","tag":"Knowledge Base","count":236},{"language":"default","tag":"API reference","count":73},{"language":"default","tag":"Guides","count":59},{"language":"default","tag":"Partner portal","count":41},{"language":"default","tag":"Documentation","count":30},{"language":"default","tag":"Newsletter referral","count":27},{"language":"default","tag":"Refer-a-Friend","count":21},{"language":"default","tag":"Getting started","count":19},{"language":"default","tag":"Partner management","count":19},{"language":"default","tag":"Payout management","count":17}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"guides/ai-integration","slug":"/guides/ai-integration","pageMetadata":{"title":"Integrate with AI assistance","sidebarTitle":"AI prompts","description":"Copy-paste prompts for AI coding assistants to integrate Partnero into your application. Works with Cursor, GitHub Copilot, ChatGPT, Claude, and other AI tools.","href":"/guides/ai-integration"},"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: \"Copy-paste prompts for AI coding assistants to integrate Partnero into your application. Works with Cursor, GitHub Copilot, ChatGPT, Claude, and other AI tools.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{Accordion,CodeBlock,Heading}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`These are ready-to-use prompts you can paste into AI coding assistants like Cursor, GitHub Copilot, ChatGPT, or Claude. Each prompt includes the API context the AI needs to generate correct, working code for your Partnero integration.`}),`\n`,_jsx(Heading,{level:`2`,id:`how-to-use`,children:`How to use`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Pick the prompt that matches your integration scenario`}),`\n`,_jsx(_components.li,{children:`Copy it and paste it into your AI coding assistant`}),`\n`,_jsxs(_components.li,{children:[`Replace `,_jsx(_components.code,{children:`YOUR_API_KEY`}),` and `,_jsx(_components.code,{children:`YOUR_PROGRAM_ID`}),` with your actual values from the `,_jsx(_components.a,{href:`https://app.partnero.com`,children:`Partnero dashboard`})]}),`\n`,_jsx(_components.li,{children:`Add a line describing your tech stack (e.g., “I’m using Next.js 14 with App Router, Prisma, and NextAuth”)`}),`\n`,_jsx(_components.li,{children:`If possible, point the AI to your existing sign-up or payment code so it knows where to add the integration`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`affiliate-program`,children:`Affiliate program`}),`\n`,_jsx(Heading,{level:`3`,id:`full-affiliate-tracking`,children:`Full affiliate tracking`}),`\n`,_jsx(Accordion,{title:`Prompt: Add affiliate tracking to my app`,id:`prompt-add-affiliate-tracking-to-my-app`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`66`,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:`66`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Integrate Partnero affiliate tracking into my application.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`My tech stack: [DESCRIBE YOUR STACK HERE]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Context about Partnero:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Partnero is an affiliate/partner management platform`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- API base URL: https://api.partnero.com/v1/`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Authentication: Bearer token in Authorization header`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- API key: YOUR_API_KEY`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Program ID: YOUR_PROGRAM_ID`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`What needs to happen:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`1. FRONTEND — Add this PartneroJS snippet before \u003c/head> on all pages:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\u003cscript>`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` (function(p,t,n,e,r,o){ p['__partnerObject']=r;function f(){`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` var c={ a:arguments,q:[]};var r=this.push(c);return \"number\"!=typeof r?r:f.bind(c.q);}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` f.q=f.q||[];p[r]=p[r]||f.bind(f.q);p[r].q=p[r].q||f.q;o=t.createElement(n);`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` var _=t.getElementsByTagName(n)[0];o.async=1;o.src=e+'?v'+(~~(new Date().getTime()/1e6));`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` _.parentNode.insertBefore(o,_);})(window, document, 'script', 'https://app.partnero.com/js/universal.js', 'po');`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` po('settings', 'assets_host', 'https://assets.partnero.com');`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` po('program', 'YOUR_PROGRAM_ID', 'load');`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\u003c\\/script>`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`This script reads the partner key from referral URLs (e.g., ?ref=PARTNER_KEY)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`and stores it in a \"partnero_partner\" first-party cookie.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`2. BACKEND — In my existing sign-up/registration handler, read the`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\"partnero_partner\" cookie from the HTTP request and call:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`POST https://api.partnero.com/v1/customers`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Headers: Authorization: Bearer YOUR_API_KEY, Content-Type: application/json`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Body:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"partner\": { \"key\": \"VALUE_FROM_COOKIE\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"key\": \"unique_customer_id\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"email\": \"[email protected]\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"name\": \"Customer Name\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`3. BACKEND — In my existing payment/checkout handler, after a successful`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`payment call:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`POST https://api.partnero.com/v1/transactions`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Headers: Authorization: Bearer YOUR_API_KEY, Content-Type: application/json`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Body:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"customer\": { \"key\": \"unique_customer_id\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"key\": \"unique_transaction_id\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"amount\": 99.99,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"action\": \"sale\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Important rules:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Only create a customer when the \"partnero_partner\" cookie is present. In an`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` affiliate program a customer belongs to a partner, so the API rejects a`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` customer with no partner attached.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Send transactions for ALL purchases. Ones for customers that were never`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` referred are rejected, which is expected and harmless.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Make Partnero API calls non-blocking. If the API is down, the sign-up or`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` purchase should still succeed. Use try/catch and log errors.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- The customer \"key\" must be the same value in both the sign-up and`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` transaction calls — this is how Partnero links them.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Use the invoice/order ID as the transaction \"key\" so refunds can be handled`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` by deleting the transaction later.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Please find my existing sign-up and payment handlers and add the Partnero`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`integration to them.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})}),`\n`,_jsx(Heading,{level:`3`,id:`sign-up-tracking-with-stripe/paddle`,children:`Sign-up tracking with Stripe/Paddle`}),`\n`,_jsx(_components.p,{children:`Use this if your payment processor (Stripe, Paddle, Chargebee) is already connected to Partnero and handles transactions automatically. You only need to track sign-ups.`}),`\n`,_jsx(Accordion,{title:`Prompt: Add sign-up tracking (payment processor handles transactions)`,id:`prompt-add-sign-up-tracking-payment-processor-handles-transactions`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`34`,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:`34`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Add Partnero affiliate sign-up tracking to my registration flow. I already`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`have Stripe/Paddle connected to Partnero for transaction tracking, so I only`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`need to track customer sign-ups.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`My tech stack: [DESCRIBE YOUR STACK HERE]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`When a user signs up in my app, read the \"partnero_partner\" cookie from the`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`HTTP request and send it to Partnero's API.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`API call:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`POST https://api.partnero.com/v1/customers`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Headers: Authorization: Bearer YOUR_API_KEY, Content-Type: application/json`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Body:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"partner\": { \"key\": \"VALUE_FROM_PARTNERO_PARTNER_COOKIE\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"key\": \"unique_customer_id_or_email\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"email\": \"[email protected]\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"name\": \"First Name\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"surname\": \"Last Name\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Important rules:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- The \"partnero_partner\" cookie is a first-party cookie set by a frontend`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` JavaScript snippet when users arrive via referral links`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Only send this when the \"partnero_partner\" cookie is present. In an affiliate`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` program the API rejects a customer with no partner attached.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Use the user's internal ID or email as the \"key\" — this is what Stripe/Paddle`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` uses to match transactions to customers`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Make this call non-blocking with try/catch. If Partnero API is down, the`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` sign-up should still succeed.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`The PartneroJS snippet is already installed on my frontend. Please find my`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`sign-up handler and add the Partnero API call.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})}),`\n`,_jsx(Heading,{level:`3`,id:`transaction-tracking-only`,children:`Transaction tracking only`}),`\n`,_jsx(Accordion,{title:`Prompt: Track sales for affiliate commissions`,id:`prompt-track-sales-for-affiliate-commissions`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`31`,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:`31`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Add Partnero transaction tracking to my payment/checkout flow.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`My tech stack: [DESCRIBE YOUR STACK HERE]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`After a successful payment, send the transaction to Partnero so the referring`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`partner earns their commission.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`API call:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`POST https://api.partnero.com/v1/transactions`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Headers: Authorization: Bearer YOUR_API_KEY, Content-Type: application/json`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Body:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"customer\": { \"key\": \"the_customer_id_used_during_signup\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"key\": \"unique_order_or_invoice_id\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"amount\": 99.99,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"action\": \"sale\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Important rules:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- customer.key must match the key used when the customer was created in Partnero`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Use invoice/order ID as the transaction key so you can delete it for refunds`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Send for ALL purchases — Partnero ignores transactions for non-referred customers`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Optional fields: \"product_id\" and \"product_type\" for advanced commission rules`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Make this non-blocking with try/catch`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`For refunds, delete the transaction:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`DELETE https://api.partnero.com/v1/transactions/{transaction_key}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Headers: Authorization: Bearer YOUR_API_KEY`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Please find my payment success handler and add the Partnero call.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`refer-a-friend-program`,children:`Refer-a-friend program`}),`\n`,_jsx(Heading,{level:`3`,id:`full-referral-tracking`,children:`Full referral tracking`}),`\n`,_jsx(Accordion,{title:`Prompt: Add refer-a-friend tracking to my app`,id:`prompt-add-refer-a-friend-tracking-to-my-app`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`64`,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:`64`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Integrate Partnero refer-a-friend tracking into my application.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`My tech stack: [DESCRIBE YOUR STACK HERE]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Context about Partnero:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Partnero is a referral program platform`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- API base URL: https://api.partnero.com/v1/`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Authentication: Bearer token in Authorization header`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- API key: YOUR_API_KEY`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Program ID: YOUR_PROGRAM_ID`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`What needs to happen:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`1. FRONTEND — Add this PartneroJS snippet before \u003c/head> on all pages:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\u003cscript>`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` (function(p,t,n,e,r,o){ p['__partnerObject']=r;function f(){`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` var c={ a:arguments,q:[]};var r=this.push(c);return \"number\"!=typeof r?r:f.bind(c.q);}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` f.q=f.q||[];p[r]=p[r]||f.bind(f.q);p[r].q=p[r].q||f.q;o=t.createElement(n);`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` var _=t.getElementsByTagName(n)[0];o.async=1;o.src=e+'?v'+(~~(new Date().getTime()/1e6));`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` _.parentNode.insertBefore(o,_);})(window, document, 'script', 'https://app.partnero.com/js/universal.js', 'po');`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` po('settings', 'assets_host', 'https://assets.partnero.com');`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` po('program', 'YOUR_PROGRAM_ID', 'load');`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\u003c\\/script>`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`This script reads the referral key from URLs (e.g., ?ref=REFERRAL_KEY)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`and stores it in a \"partnero_referral\" first-party cookie.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`2. BACKEND — In my existing sign-up handler, create a customer in Partnero`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`for EVERY sign-up:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`POST https://api.partnero.com/v1/customers`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Headers: Authorization: Bearer YOUR_API_KEY, Content-Type: application/json`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`If the \"partnero_referral\" cookie exists (referred user):`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"referring_customer\": { \"key\": \"VALUE_FROM_COOKIE\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"key\": \"unique_customer_id\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"email\": \"[email protected]\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"name\": \"Customer Name\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`If NO cookie exists (organic sign-up, becomes a potential referrer):`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"key\": \"unique_customer_id\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"email\": \"[email protected]\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"name\": \"Customer Name\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`The response includes a \"referral_link\" field — save it for the user.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`3. BACKEND — In my payment handler, track purchases by referred customers:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`POST https://api.partnero.com/v1/transactions`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Headers: Authorization: Bearer YOUR_API_KEY, Content-Type: application/json`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"customer\": { \"key\": \"unique_customer_id\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"key\": \"unique_transaction_id\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"amount\": 99.99,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"action\": \"sale\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Important rules:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Create ALL customers in Partnero, not just referred ones (everyone can refer)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Make all Partnero API calls non-blocking with try/catch`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- The customer \"key\" must be consistent across sign-up and transaction calls`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Store the referral_link from the sign-up response for the user's dashboard`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Please find my sign-up and payment handlers and add the integration.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})}),`\n`,_jsx(Heading,{level:`3`,id:`referral-dashboard`,children:`Referral dashboard`}),`\n`,_jsx(Accordion,{title:`Prompt: Build an in-app referral dashboard`,id:`prompt-build-an-in-app-referral-dashboard`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`33`,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:`33`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Create a referral dashboard page where users can see their referral link,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`stats, and rewards from Partnero.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`My tech stack: [DESCRIBE YOUR STACK HERE]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`The backend needs to call these Partnero API endpoints (all GET requests`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`with header \"Authorization: Bearer YOUR_API_KEY\"):`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`1. Customer details + referral link:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` GET https://api.partnero.com/v1/customers/{customer_id}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` Returns: referral_link, referrals_count, email, name`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`2. Referral statistics:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` GET https://api.partnero.com/v1/customers/{customer_id}/stats`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` Returns: click counts, referral counts, social sharing links`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`3. Reward balance:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` GET https://api.partnero.com/v1/customers/{customer_id}/balance`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` Returns: balance amounts by currency`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`4. Referred friends:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` GET https://api.partnero.com/v1/customers/{customer_id}/referrals`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` Returns: array of referred customers with name, email, status, created_at`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`The dashboard UI should include:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- The user's referral link with a \"Copy link\" button`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Social share buttons (use links from the stats response)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Total referrals count and reward balance`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- A table of referred friends with their name and status`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Fetch all 4 endpoints in parallel from the backend. Never call the Partnero`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`API from the frontend — keep the API key server-side.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`webhooks`,children:`Webhooks`}),`\n`,_jsx(Accordion,{title:`Prompt: Handle Partnero webhook events`,id:`prompt-handle-partnero-webhook-events`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`34`,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:`34`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Set up a webhook endpoint to receive real-time events from Partnero.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`My tech stack: [DESCRIBE YOUR STACK HERE]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Partnero sends POST requests with JSON body to your webhook URL.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Event types:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- partner.created, partner.updated, partner.deleted, partner.approved,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` partner.rejected, partner.archived`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- customer.created, customer.updated, customer.deleted`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- transaction.created, transaction.deleted`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Example payload:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"event\": \"transaction.created\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"data\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"id\": \"txn_123\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"amount\": 99.99,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"customer\": { \"key\": \"customer_123\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"timestamp\": \"2025-05-07T10:30:00.000000Z\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Requirements:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Create a POST endpoint at /webhooks/partnero (or similar)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Parse the JSON body and route events by the \"event\" field`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Return a 200 status within 5 seconds`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Process heavy logic asynchronously (queue, background job)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Make the handler idempotent — Partnero retries failed webhooks, so you`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` may receive the same event twice`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Log all incoming webhook events for debugging`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Please implement this endpoint and add handlers for the event types listed.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`mobile-apps`,children:`Mobile apps`}),`\n`,_jsx(Accordion,{title:`Prompt: Add referral tracking to my mobile app`,id:`prompt-add-referral-tracking-to-my-mobile-app`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`56`,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:`56`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Integrate Partnero referral tracking into my mobile app.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`My tech stack: [DESCRIBE YOUR STACK HERE, e.g. Swift/iOS, Kotlin/Android,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`React Native, Flutter]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Context: Partnero normally tracks referrals via browser cookies. In mobile`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`apps, there are no cookies, so we extract the referral key from deep links`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`and pass it to the backend.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`What needs to happen:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`1. DEEP LINK HANDLING:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` When the app opens from a URL like \"yoursite.com?ref=PARTNER_KEY\":`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` - Extract the \"ref\" query parameter value`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` - Store it persistently (UserDefaults on iOS, SharedPreferences on Android,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` AsyncStorage on React Native, SharedPreferences on Flutter)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` - The key should survive app restarts`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`2. ON SIGN-UP:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` Include the stored referral key in the sign-up request to my backend.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` My backend then calls:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` POST https://api.partnero.com/v1/customers`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` Headers: Authorization: Bearer YOUR_API_KEY, Content-Type: application/json`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` Body (for affiliate programs):`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"partner\": { \"key\": \"STORED_REFERRAL_KEY\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"key\": \"unique_user_id\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"email\": \"[email protected]\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"name\": \"User Name\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` Body (for refer-a-friend programs):`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"referring_customer\": { \"key\": \"STORED_REFERRAL_KEY\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"key\": \"unique_user_id\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"email\": \"[email protected]\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"name\": \"User Name\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` After successful creation, clear the stored referral key.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`3. ON PURCHASE:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` My backend calls:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` POST https://api.partnero.com/v1/transactions`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` Headers: Authorization: Bearer YOUR_API_KEY, Content-Type: application/json`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"customer\": { \"key\": \"unique_user_id\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"key\": \"order_id\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"amount\": 49.99,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"action\": \"sale\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Important: NEVER call the Partnero API from the mobile app directly.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Always route through the backend to keep the API key secure.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Please implement the deep link handler in the app and the API calls in`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`the backend.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`refund-handling`,children:`Refund handling`}),`\n`,_jsx(Accordion,{title:`Prompt: Reverse commissions on refund`,id:`prompt-reverse-commissions-on-refund`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`17`,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:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`When a refund happens in my app, delete the corresponding transaction in`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Partnero so the partner's commission is reversed.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`My tech stack: [DESCRIBE YOUR STACK HERE]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`API call:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`DELETE https://api.partnero.com/v1/transactions/{transaction_key}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Headers: Authorization: Bearer YOUR_API_KEY`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`The transaction_key is the unique key used when the transaction was created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`(e.g., the invoice or order ID).`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Add this to my existing refund handler. After the refund is processed with`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`the payment provider, call the Partnero API to delete the transaction. Make`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`it non-blocking with try/catch — the refund should succeed even if Partnero`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`is unreachable.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})})]})}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":"Integrate with AI assistance","sidebarTitle":"AI prompts","description":"Copy-paste prompts for AI coding assistants to integrate Partnero into your application. Works with Cursor, GitHub Copilot, ChatGPT, Claude, and other AI tools.","href":"/guides/ai-integration"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"How to use","slug":"how-to-use","depth":2,"children":[]},{"title":"Affiliate program","slug":"affiliate-program","depth":2,"children":[{"title":"Full affiliate tracking","slug":"full-affiliate-tracking","depth":3,"children":[]},{"title":"Sign-up tracking with Stripe/Paddle","slug":"sign-up-tracking-with-stripe/paddle","depth":3,"children":[]},{"title":"Transaction tracking only","slug":"transaction-tracking-only","depth":3,"children":[]}]},{"title":"Refer-a-friend program","slug":"refer-a-friend-program","depth":2,"children":[{"title":"Full referral tracking","slug":"full-referral-tracking","depth":3,"children":[]},{"title":"Referral dashboard","slug":"referral-dashboard","depth":3,"children":[]}]},{"title":"Webhooks","slug":"webhooks","depth":2,"children":[]},{"title":"Mobile apps","slug":"mobile-apps","depth":2,"children":[]},{"title":"Refund handling","slug":"refund-handling","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"partnero","siteName":"Partnero","title":"Integrate with AI assistance - Partnero","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-08T19:50:30.223Z","originalFileLocation":"guides/ai-integration.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=\"Copy-paste prompts for AI coding assistants to integrate Partnero into your application. Works with Cursor, GitHub Copilot, ChatGPT, Claude, and other AI tools.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Partnero\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/partnero/Sa9xWNFgYCZSChdd/_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/partnero/Sa9xWNFgYCZSChdd/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/partnero/Sa9xWNFgYCZSChdd/_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/partnero/Sa9xWNFgYCZSChdd/_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/partnero/Sa9xWNFgYCZSChdd/_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/partnero/Sa9xWNFgYCZSChdd/_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/partnero/Sa9xWNFgYCZSChdd/_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/partnero/Sa9xWNFgYCZSChdd/_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/partnero/Sa9xWNFgYCZSChdd/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Integrate with AI assistance - Partnero\">\u003cmeta data-mint-head property=\"og:description\" content=\"Copy-paste prompts for AI coding assistants to integrate Partnero into your application. Works with Cursor, GitHub Copilot, ChatGPT, Claude, and other AI tools.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Partnero\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.partnero.com/guides/ai-integration\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://partnero.mintlify.site/_mintlify/api/og/v2?division=AI+tools\u0026amp;title=Integrate+with+AI+assistance\u0026amp;description=Copy-paste+prompts+for+AI+coding+assistants+to+integrate+Partnero+into+your+application.+Works+with+Cursor%2C+GitHub+Copilot%2C+ChatGPT%2C+Claude%2C+and+other+AI+tools.\u0026amp;theme=dd577e376cfcfab166ab7c93\u0026amp;signature=974f5fe516506c76d937c9715555519299e5739c1acc81d3ca372430d72f7215\">\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=\"Integrate with AI assistance - Partnero\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Copy-paste prompts for AI coding assistants to integrate Partnero into your application. Works with Cursor, GitHub Copilot, ChatGPT, Claude, and other AI tools.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://partnero.mintlify.site/_mintlify/api/og/v2?division=AI+tools\u0026amp;title=Integrate+with+AI+assistance\u0026amp;description=Copy-paste+prompts+for+AI+coding+assistants+to+integrate+Partnero+into+your+application.+Works+with+Cursor%2C+GitHub+Copilot%2C+ChatGPT%2C+Claude%2C+and+other+AI+tools.\u0026amp;theme=dd577e376cfcfab166ab7c93\u0026amp;signature=974f5fe516506c76d937c9715555519299e5739c1acc81d3ca372430d72f7215\">\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/partnero/Sa9xWNFgYCZSChdd/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Partnero\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#134E4A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.partnero.com/guides/ai-integration\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/ai-integration.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.partnero.com/#organization\",\"name\":\"Partnero\",\"url\":\"https://docs.partnero.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/partnero/gINf_F3u_8GmW16y/images/partnero-black.svg?fit=max\u0026auto=format\u0026n=gINf_F3u_8GmW16y\u0026q=85\u0026s=a61ae64c8a722513b3eb0564bc371392\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.partnero.com#website\",\"name\":\"Partnero\",\"url\":\"https://docs.partnero.com\",\"publisher\":{\"@id\":\"https://docs.partnero.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.partnero.com/guides/ai-integration#webpage\",\"url\":\"https://docs.partnero.com/guides/ai-integration\",\"name\":\"Integrate with AI assistance\",\"description\":\"Copy-paste prompts for AI coding assistants to integrate Partnero into your application. Works with Cursor, GitHub Copilot, ChatGPT, Claude, and other AI tools.\",\"dateModified\":\"2026-10-08T19:50:30.223Z\",\"isPartOf\":{\"@id\":\"https://docs.partnero.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.partnero.com/guides/ai-integration#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.partnero.com/guides/ai-integration#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Partnero\",\"item\":\"https://docs.partnero.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Integrate with AI assistance\",\"item\":\"https://docs.partnero.com/guides/ai-integration\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.partnero.com/guides/ai-integration#article\",\"headline\":\"Integrate with AI assistance\",\"name\":\"Integrate with AI assistance\",\"description\":\"Copy-paste prompts for AI coding assistants to integrate Partnero into your application. Works with Cursor, GitHub Copilot, ChatGPT, Claude, and other AI tools.\",\"url\":\"https://docs.partnero.com/guides/ai-integration\",\"mainEntityOfPage\":{\"@id\":\"https://docs.partnero.com/guides/ai-integration#webpage\"},\"dateModified\":\"2026-10-08T19:50:30.223Z\",\"publisher\":{\"@id\":\"https://docs.partnero.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.partnero.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Partnero\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Partnero\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/guides/ai-integration.md","siteName":"Partnero","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"Knowledge Base","pages":[{"title":"Knowledge Base","href":"/knowledge-base/overview"}]},{"tab":"Guides","groups":[{"group":"Overview","pages":[{"title":"Guides","description":"Connect Partnero to the tools you already use — AI assistants, payment platforms, e-commerce, website builders, courses, forms, CRMs, payouts and email.","href":"/integrations/overview"}]},{"group":"AI tools","pages":[{"title":"Integrate with AI assistance","sidebarTitle":"AI prompts","href":"/guides/ai-integration"},{"title":"Partnero for Cursor","sidebarTitle":"Cursor","description":"Install the Partnero plugin in Cursor to manage your program from the editor and add referral tracking to your codebase correctly.","href":"/guides/cursor"},{"title":"Connect Grok","sidebarTitle":"Grok","href":"/guides/grok"},{"title":"Connect Lovable","sidebarTitle":"Lovable","href":"/guides/lovable"}]},{"group":"Getting started","pages":[{"title":"Integrate Partnero into your website","sidebarTitle":"Integrate Partnero into your website","href":"/integrations/integrate-partnero-into-your-website"},{"title":"Integration guides","sidebarTitle":"Integration guides","href":"/integrations/integration-guides"},{"title":"Integration assistant","sidebarTitle":"Integration assistant","href":"/integrations/integration-assistant"},{"title":"Affiliate Integration FAQ","sidebarTitle":"Integration FAQ","href":"/integrations/affiliate-integration-faq"},{"title":"How to enable secure JavaScript calls","sidebarTitle":"Secure JavaScript calls","href":"/integrations/how-to-enable-secure-javascript-calls"}]},{"group":"Billing integrations","pages":[{"title":"Stripe integration","sidebarTitle":"Stripe","href":"/integrations/stripe"},{"title":"Paddle integration","sidebarTitle":"Paddle","href":"/integrations/paddle"},{"title":"Integrate Paddle Classic","sidebarTitle":"Paddle Classic","href":"/integrations/integrate-paddle-classic"},{"title":"Chargebee integration","sidebarTitle":"Chargebee","href":"/integrations/chargebee"},{"title":"Integrate Razorpay","sidebarTitle":"Razorpay","href":"/integrations/integrate-razorpay"},{"title":"PayPal Links \u0026 Buttons integration","sidebarTitle":"PayPal Links \u0026 Buttons","href":"/integrations/paypal-links-buttons-integration"}]},{"group":"Coupon tracking","pages":[{"title":"Create and use Stripe coupons","sidebarTitle":"Stripe coupons","href":"/integrations/create-and-use-stripe-coupons"},{"title":"WooCommerce coupons","sidebarTitle":"WooCommerce coupons","href":"/integrations/woocommerce-coupons"}]},{"group":"E-commerce","pages":[{"title":"Shopify integration","sidebarTitle":"Shopify","href":"/integrations/shopify"},{"title":"WooCommerce integration","sidebarTitle":"WooCommerce","href":"/integrations/woocommerce"},{"title":"Integrate BigCommerce","sidebarTitle":"BigCommerce","href":"/integrations/integrate-partnero-with-bigcommerce"},{"title":"Integrate Ecwid","sidebarTitle":"Ecwid","href":"/integrations/integrate-ecwid"},{"title":"Integrate Gumroad","sidebarTitle":"Gumroad","href":"/integrations/integrate-gumroad"},{"title":"Integrate SamCart","sidebarTitle":"SamCart","href":"/integrations/integrate-samcart"}]},{"group":"Website builders \u0026 CMS","pages":[{"title":"Integrate Partnero with WordPress","sidebarTitle":"WordPress","href":"/integrations/integrate-partnero-with-wordpress"},{"title":"Integrate Partnero with Squarespace","sidebarTitle":"Squarespace","href":"/integrations/integrate-partnero-with-squarespace"},{"title":"Integrate Wix","sidebarTitle":"Wix","href":"/integrations/integrate-wix"},{"title":"Integrate Ghost","sidebarTitle":"Ghost","href":"/integrations/integrate-ghost"},{"title":"Integrate Softr","sidebarTitle":"Softr","href":"/integrations/integrate-softr"},{"title":"Integrate Bubble","sidebarTitle":"Bubble","href":"/integrations/integrate-bubble"},{"title":"Integrate Simvoly","sidebarTitle":"Simvoly","href":"/integrations/integrate-partnero-with-simvoly"},{"title":"Integrate Brilliant Directories","sidebarTitle":"Brilliant Directories","href":"/integrations/integrate-partnero-with-brilliant-directories"}]},{"group":"Courses \u0026 communities","pages":[{"title":"Integrate Kajabi","sidebarTitle":"Kajabi","href":"/integrations/integrate-kajabi"},{"title":"Integrate Teachable","sidebarTitle":"Teachable","href":"/integrations/integrate-teachable"},{"title":"Integrate Thinkific","sidebarTitle":"Thinkific","href":"/integrations/integrate-partnero-with-thinkific"},{"title":"Integrate Memberstack","sidebarTitle":"Memberstack","href":"/integrations/integrate-memberstack"},{"title":"Integrate Outseta","sidebarTitle":"Outseta","href":"/integrations/integrate-outseta"},{"title":"Integrate Circle","sidebarTitle":"Circle","href":"/integrations/integrate-circle"}]},{"group":"Forms \u0026 scheduling","pages":[{"title":"Integrate Typeform","sidebarTitle":"Typeform","href":"/integrations/integrate-typeform"},{"title":"Integrate Tally","sidebarTitle":"Tally","href":"/integrations/integrate-tally"},{"title":"Integrate Calendly","sidebarTitle":"Calendly","href":"/integrations/integrate-partnero-with-calendly"},{"title":"Integrate OnceHub","sidebarTitle":"OnceHub","href":"/integrations/integrate-partnero-with-oncehub"}]},{"group":"CRM \u0026 automation","pages":[{"title":"Integrate Attio","sidebarTitle":"Attio","href":"/integrations/attio"},{"title":"Integrate Zapier","sidebarTitle":"Zapier","href":"/integrations/integrate-zapier"},{"title":"Integrate Make","sidebarTitle":"Make","href":"/integrations/integrate-make"},{"title":"Integrate Systeme.io","sidebarTitle":"Systeme.io","href":"/integrations/integrate-systeme-io"},{"title":"Integrate HighLevel","sidebarTitle":"HighLevel","href":"/integrations/integrate-partnero-with-highlevel"}]},{"group":"Payouts","pages":[{"title":"PayPal Mass Pay integration","sidebarTitle":"PayPal","href":"/integrations/paypal"},{"title":"Wise integration","sidebarTitle":"Wise","href":"/integrations/wise"}]},{"group":"Email \u0026 marketing","pages":[{"title":"Mailchimp integration","sidebarTitle":"Mailchimp","href":"/integrations/mailchimp"},{"title":"MailerLite integration","sidebarTitle":"MailerLite","href":"/integrations/mailerlite"},{"title":"Send program emails with MailerSend","sidebarTitle":"MailerSend","href":"/integrations/mailersend"},{"title":"Send program emails with Brevo","sidebarTitle":"Brevo","href":"/integrations/send-program-emails-with-brevo"},{"title":"Send program emails with Mailgun","sidebarTitle":"Mailgun","href":"/integrations/mailgun"},{"title":"Send program emails with Postmark","sidebarTitle":"Postmark","href":"/integrations/postmark"},{"title":"Send program emails with SendGrid","sidebarTitle":"SendGrid","href":"/integrations/sendgrid"},{"title":"Connect Amazon Incentives","sidebarTitle":"Amazon Incentives","href":"/integrations/connect-amazon-incentives"}]},{"group":"Webhooks","pages":[{"title":"How to set up webhooks","sidebarTitle":"Set up webhooks","href":"/integrations/how-to-set-up-webhooks"},{"title":"Incoming webhooks","sidebarTitle":"Incoming webhooks","href":"/integrations/incoming-webhooks"}]}]},{"tab":"API reference","icon":"square-terminal","pages":[{"title":"API reference","href":"/api-reference/introduction"}]}]},"basePath":"","title":"Integrate with AI assistance - Partnero","buildId":"dpl_9RFrWkXdFTJCytfx6jAofvAaEXr6","deploymentId":"dpl_9RFrWkXdFTJCytfx6jAofvAaEXr6","dynamics":[],"chunks":[]}