# WinWinKit > Affiliates, referrals, and promo codes management platform for mobile apps. --- # Affiliate marketing for mobile apps Source: https://winwinkit.com/ > A purpose-built tool for running powerful affiliate programs and promo campaigns. Designed for iOS, Android and desktop apps. WinWinKit is your ultimate toolkit for partnering with content creators and influencers. [Affiliate Programs](/affiliates/) [User-to-User Referrals](/referrals/) [Promo Codes](/promos/) Trusted by [ReciMe](https://recime.app/ambassador-program) [INTVL](https://www.intvl.com.au/) [Pillow](https://pillow.app/partners) and 50+ more apps **Affiliates Groups Payouts** ![Affiliates dashboard listing active affiliates with their claims, conversions and earnings](/_astro/affiliates.BePITRkW.webp) One place for all your affiliates Every affiliate you work with in a single table, with performance overview, filters and custom views. ![Affiliate groups dashboard with per-group affiliates, claims, conversions, revenue and earnings](/_astro/groups.CX5hhQzF.webp) Segment into groups Give influencers, your community, and partners their own rewards, onboarding rules, and payout schedules. ![Affiliate payouts dashboard with projected, pending and paid amounts per period](/_astro/payouts.CDMULzaU.webp) Pay in one click Complete overview of upcoming, pending, and completed payouts. Hassle free, global payouts in one click. Optional auto-payouts. 01 Foundation ## Referral Codes Referral codes are the foundation of every campaign in WinWinKit. Short enough to remember, universal enough to work on any channel, and private by design. Short & Memorable Codes are concise and easy to remember, making them simple to share and type in. Universal Works across any channel - Instagram, TikTok, YouTube, podcasts, newsletters, offline. Deterministic Code redemption is a clear, intentional action - no probabilistic attribution or fingerprinting required. Privacy Friendly Respects user privacy by design - no cross-app tracking, cookies, or sensitive data collection involved. [Learn more about attribution & revenue tracking](/attribution-and-revenue/) 02 Features ## Supercharge Growth Everything you need to turn users, creators, and promotions into sustainable growth - available after a single integration. Partner with Creators Run affiliate campaigns with influencers, bloggers, and content creators. Track performance and pay commissions automatically. [Learn more](/affiliates/) Create User-to-User Referral Programs Let your users invite friends and reward both sides. WinWinKit handles tracking, rewards, and attribution for you. [Learn more](/referrals/) Run Sale Campaigns Create promo codes to drive limited-time offers, seasonal sales, or discounts. [Learn more](/promos/) ![WinWinKit Dashboard with Active Affiliates](/_astro/affiliates-page-narrow.CWTLh6zX.webp) ![WinWinKit Landing Page for Affiliates to Apply](/_astro/affiliates-apply-usage.WCfAzVoK.webp) Invite & Manage Affiliates One dashboard to recruit, track, and pay affiliates. 03 Features ## Reward Users Six flexible reward types that work across affiliates, referrals, and promo codes. Configure once and use everywhere - from unlocking premium features to granting free subscriptions. Basic Simple key based type for rewarding an access, feature or content. Credit Reward an amount of usable credits, which essentially is virtual currency. ![App Store icon](/_astro/app-store.BYRU4tvf.svg) App Store Offer Codes Reward discounted or free subscriptions for new, existing, and past subscribers. ![Google Play icon](/_astro/google-play.inGV1HHX.svg) Google Play Promo Codes Reward discounted or free subscriptions for new, existing, and past subscribers. ![RevenueCat icon](/_astro/revenue-cat._yt0KJN1.svg) RevenueCat Entitlement Grant an entitlement unlocking premium features or content. ![RevenueCat icon](/_astro/revenue-cat._yt0KJN1.svg) RevenueCat Offering Assign an offering, presenting users with a custom paywall or pricing. 04 Integration ## Integrate today A clean, straightforward integration so you can launch campaigns with ease. Native SDKs for your favorite languages. **Swift Kotlin Dart TypeScript** import WinWinKit Referrals.configure(apiKey: "your-api-key") Referrals.shared.set(appUserId: "your-app-user-id") let (user, rewardsGranted) = try await Referrals.shared.claimCode(code: "XYZ123") import com.winwinkit.WinWinKit val winwinkit = WinWinKit(apiKey = "your-api-key") winwinkit.appUserId = "your-app-user-id" winwinkit.createOrUpdateUser() val result = winwinkit.claimCode("XYZ123") import 'package:winwinkit/api.dart'; final sdk = WinWinKit(apiKey: 'your-api-key'); final userClient = sdk.user('your-app-user-id'); await userClient.createOrUpdate(); final result = await userClient.claimCode('XYZ123'); import { WinWinKit } from "@winwinkit/sdk"; const wwk = new WinWinKit({ apiKey: process.env['WINWINKIT_API_KEY']!, }); const { user } = await wwk.createOrUpdateUser({ appUserId: "your-app-user-id", }); const { user: updatedUser, rewardsGranted } = await wwk.claimCode({ appUserId: "your-app-user-id", code: "XYZ123", }); [Docs](/developers/sdks/swift/) [GitHub](https://github.com/winwinkit/winwinkit-swift) [Docs](/developers/sdks/kotlin/) [GitHub](https://github.com/winwinkit/winwinkit-kotlin) [Docs](/developers/sdks/dart/) [GitHub](https://github.com/winwinkit/winwinkit-dart) [Docs](/developers/sdks/typescript/) [GitHub](https://github.com/winwinkit/winwinkit-js) 05 Product ## Changelog [11 Aug 2026 Affiliate Analytics Affiliate Analytics lets you track your affiliates' performance and activity over time.](/changelog/#affiliate-analytics) [14 Jul 2026 Custom Applications You can now shape the affiliate application form around your program — ask affiliates the questions that matter to you before they join.](/changelog/#custom-application-questions) [03 Jul 2026 Sandbox Mode Every new project now starts in Sandbox Mode, so you can test your entire integration end-to-end before going live.](/changelog/#sandbox-mode) [01 Jul 2026 Affiliate Payouts with PayPal Affiliate payouts now support PayPal — another way for your affiliates to get paid, alongside Stripe and Wise.](/changelog/#affiliate-payouts-paypal) [See all releases](/changelog/) The growth platform your app has been missing [Get Started for Free](https://app.winwinkit.com) [Plans & pricing](/pricing/) ![WinWinKit Icon](/_astro/icon.white.outline.BKy9wNT6.svg) ## Frequently Asked Questions **What is WinWinKit?** WinWinKit is a platform for setting up affiliate and referral marketing in iOS, Android and desktop apps. WinWinKit provides a great level of flexibility empowering you to create a setup that fits your product, business, and vision. Besides code integration, everything can be done via the dashboard with the help of just a few clicks. **What is affiliate marketing?** Affiliate marketing is a performance-based strategy where app owners reward affiliates, such as influencers, bloggers, or even regular users, for driving user actions like app installs or in-app purchases. Unlike traditional ads, where you pay upfront, affiliate marketing ensures you only pay for results, making it cost-effective. Affiliates promote your app through their channels, like social media or blogs, using unique links or codes to track their efforts. **What is referral marketing?** Referral marketing is a strategy that leverages your existing user base to acquire new users through direct recommendations. It’s based on the simple principle that people trust recommendations from friends and family more than they trust traditional advertising. For mobile apps, referral marketing involves incentivizing current users to invite their contacts to download and engage with your app, typically in exchange for rewards that benefit both parties. **How does tracking for in-app purchases work?** We integrate with providers like RevenueCat and Stripe, ensuring accurate and timely tracking of purchases. Direct tracking via App Store and Google Play Store is on our roadmap too. **How do I integrate WinWinKit into my app?** WinWinKit provides a lightweight SDK for every platform. Additionally, we are working on a completely no-code integration for the App Store apps. **How do I find affiliates for my app?** There are media, influencers, and content creators in every niche. Find the most promising ones and shoot them a message with a link to accept the affiliate campaign on WinWinKit. Additionally, enable a public affiliate form where visitors, including regular users, can request to become your affiliate. You can share a link in your network and place it on your website. **Do affiliates have access to a dashboard?** Yes, affiliates have access to a dashboard. They can view their performance and earnings, referral codes, assets, and other resources that you share with them. **What commission structures are supported?** There are three different options available: revenue percentage, fixed fee per acquisition, and fixed fee per conversion. It is up to you which ones to choose and if you want to use one or combine them together. **How are affiliates paid?** Affiliates are required to provide their banking details via Stripe Connect integration, and are paid when payouts are initiated by an app owner on the WinWinKit dashboard. In most cases, earnings arrive on their Stripe Connect account instantly and then can be withdrawn to their bank account on demand or schedule, depending on the affiliate’s preference. **When are affiliates paid?** Affiliate earnings are tracked on a calendar month basis and there is a default 14-day holding period to account for any refunds and delays. After the holding period, you can pay affiliates during the 60-day period. This allows you to pay the affiliates after receiving proceeds from the App Store. **Does it work with TikTok/Instagram/YouTube?** Yes, all campaigns are code-based and by default fully compatible with any social media, podcasts, TikTok, Instagram, and YouTube. **Do I need a mobile attribution platform?** No. WinWinKit is based on referral codes and complex attribution is simply unnecessary. Read more about how WinWinKit solves mobile attribution in our [blog post](/blog/how-winwinkit-solves-mobile-attribution/). **How can I contact you?** You can always reach us at [support@winwinkit.com](mailto:support@winwinkit.com). --- # Grow your app with Affiliates Source: https://winwinkit.com/affiliates/ > Partner with creators, influencers, and bloggers to grow your app. Manage commissions, payouts, and user rewards - all from one dashboard. Performance-based growth for modern apps. [Get Started for Free](https://app.winwinkit.com) ![Affiliates dashboard](/_astro/affiliates.BePITRkW.webp) 01 Features ## Invite with a single link Share a public page or a personal invite link - post it on social media, your website, or send it directly. Affiliates sign up, create codes, and start promoting. Public Landing Pages Each affiliate group gets a public page where potential affiliates can learn about the offer and apply. Personal Invites Generate unique invite links to onboard specific affiliates directly. Unlimited Affiliates Invite as many affiliates as you need. No limits on every plan. Self-Service Affiliates can create their own codes without needing your involvement. 02 Features ## The complete affiliate toolkit Rewards, analytics, grouping, resources, and a dedicated dashboard - everything you and your affiliates need in one place. Affiliate Rewards Compensate affiliates with a revenue commission or a fixed fee per claim and conversion. User Rewards Reward users who sign up through an affiliate with any supported reward type. Analytics Code redemptions, revenue, and commissions are tracked and displayed in the dashboard. Automated Revenue Tracking Server-side revenue tracking with zero instrumentation in your app. Groups Segment affiliates into groups with separate rewards, onboarding rules, and configurations. Resources Share brand materials, FAQs and support links, all via the platform. Affiliates Dashboard Each affiliate gets their own dashboard with earnings, codes, payouts, and performance stats. Affiliates Management Deactivate or ban affiliates at any time to maintain full control over your program. 03 Features ## Global Payouts Pay affiliates directly through WinWinKit. Commissions are calculated automatically - just approve and send with one-click. ![Stripe icon](/_astro/stripe.DBHZogOx.svg) Stripe Connect Affiliates onboard via Stripe Connect and receive payouts to their account. ![Wise icon](/_astro/wise.DYNNPWp_.svg) Wise Affiliates onboard via our dashboard and receive payouts to their bank account in their local currency. ![PayPal icon](/_astro/paypal.CI3cwV_t.svg) PayPal Affiliates connect with PayPal and receive payouts to their account. 04 Features ## Grow on Autopilot Scale without extra effort by automating approvals, payouts, and onboarding. Auto-Approve Automatically approve affiliates requesting to join the program. Auto-Payout Automatically pay affiliate commissions once eligible. ![WinWinKit Dashboard with Active Affiliates](/_astro/affiliates-page-narrow.CWTLh6zX.webp) ![WinWinKit Landing Page for Affiliates to Apply](/_astro/affiliates-apply-usage.WCfAzVoK.webp) Invite & Manage Affiliates One dashboard to recruit, track, and pay affiliates. 05 Integration ## No-Code Integration Run a full affiliate program without touching your codebase. Available for App Store apps. [Learn more](/no-code/) Native User Experience Users redeem offers through built-in flow - no redirects and web views. Powered by Offer Codes Flexible discount codes with rich configuration options. Pay for results. Not for impressions. [Get Started for Free](https://app.winwinkit.com) [Plans & pricing](/pricing/) ![WinWinKit Icon](/_astro/icon.white.outline.BKy9wNT6.svg) ## Frequently Asked Questions **How do affiliates join my program?** Affiliates can apply through a public landing page or be invited directly via a personal invite link. You can also enable auto-approval to skip the manual review step. **How are affiliates compensated?** You configure a revenue commission percentage or a fixed fee per claim and conversion. Payouts are processed through Stripe Connect. **How is revenue tracked?** Revenue from affiliate-referred users is tracked automatically on the server side via integration with RevenueCat. No tracking code is needed in your app. Direct tracking via App Store Connect and Google Play is coming soon! **Can I reward users who sign up through an affiliate?** Yes. You can assign any supported reward type to users who claim an affiliate code - credits, subscriptions, entitlements, and more. **What are affiliate groups?** Groups let you segment affiliates into tiers with separate commission rates, user rewards, payout rules, and onboarding settings. **Is there a limit on how many affiliates I can have?** No. Every plan supports unlimited affiliates. --- # Grow your app with Referral Programs Source: https://winwinkit.com/referrals/ > Let your users invite friends and reward both sides. Set up user-to-user referral programs with flexible rewards and automatic tracking. Turn your users into your best growth channel. [Get Started for Free](https://app.winwinkit.com) ![Referral programs dashboard](/_astro/referrals.DG62568F.webp) 01 Features ## Feature-packed referrals Referral programs with dual-sided rewards, privacy-first tracking, and analytics. Dual-sided Incentives Reward both the referrer and the invited user - each with their own configurable rewards. Private by Design No personal data required. WinWinKit identifies users solely by the ids your app provides. All Reward Types Reward referrers and invitees with any reward type. Multiple Rewards Stack multiple rewards per referral - trigger different ones on claim, conversion, or both. Analytics Code redemptions, revenue, and commissions are tracked and displayed in the dashboard. Traceable Track every claim - see who redeemed, when, and what rewards were granted. The best growth loop? A happy user with a referral code. [Get Started for Free](https://app.winwinkit.com) [Plans & pricing](/pricing/) ![WinWinKit Icon](/_astro/icon.white.outline.BKy9wNT6.svg) ## Frequently Asked Questions **How do referral programs work in WinWinKit?** Every user in a referral program is automatically assigned their own unique referral code. When an invited user claims that code, both the referrer and the new user can receive rewards you've configured - credits, subscriptions, entitlements, or any other supported type. **Can I reward both the referrer and the invited user?** Yes. Referral programs support dual-sided incentives - you configure separate rewards for the referrer and the invitee independently. **What user data does WinWinKit need?** Only an app user ID that your app provides. No personal data, emails, or device information is collected or stored by WinWinKit. **Can I assign multiple rewards to a single referral?** Yes. You can stack multiple rewards per referral and trigger them on different events - on claim, on conversion, or after a referrer reaches a specific number of invited or converted users. **How do I track referral activity?** Every referral event is tracked in the dashboard - claims, conversions, granted rewards, and user activity are all visible in real time. --- # Promo Codes with superpowers Source: https://winwinkit.com/promos/ > Create and manage promo codes to drive sales, limited-time offers, and targeted discounts for your app. Create promo codes that reward users and drive conversions. [Get Started for Free](https://app.winwinkit.com) ![Promo codes dashboard](/_astro/promos.hhwuOfZv.webp) 01 Features ## Powerful by default Promo codes with flexible rewards, stackable events, and built-in analytics. All Reward Types Pair promo codes with any reward in the platform, no restrictions. Multiple Rewards Assign multiple rewards per promo code and stack them across events. Analytics Code redemptions, revenue, and commissions are tracked and displayed in the dashboard. Traceable Track every claim - see who redeemed, when, and what rewards were granted. Smarter promo codes. Better results. [Get Started for Free](https://app.winwinkit.com) [Plans & pricing](/pricing/) ![WinWinKit Icon](/_astro/icon.white.outline.BKy9wNT6.svg) ## Frequently Asked Questions **What are promo codes in WinWinKit?** Promo codes are shareable codes you create in the dashboard. When a user redeems one, they receive the rewards you've configured - credits, subscriptions, entitlements, or any other supported reward type. **Can I assign multiple rewards to a single promo code?** Yes. You can attach multiple rewards to one promo code and stack them across different events - for example, one reward on claim and another on conversion. **How do I track promo code usage?** Every claim is tracked in the dashboard. You can see who redeemed a code, when it happened, and which rewards were granted. **Is there a limit on how many promo codes I can create?** Limits depend on your plan. Check the pricing page for details on promo code quotas for each tier. **Can I limit how many users can redeem a promo code?** Yes. Each promo code has a configurable user limit, so you can cap the total number of redemptions - perfect for exclusive or limited-run campaigns. **Can I activate or deactivate a promo code?** Yes. Each promo code has an active state that you can toggle at any time. This gives you full control over when a code is available for redemption. --- # Creators Source: https://winwinkit.com/creators/ > Connect your app with verified creators, with revenue-share, per-user, per-conversion, per-post, and per-1k-views commission models. Connect with an army of content creators promoting your app for performance-based rewards defined by you. 01 Apps ## For apps Tap into a global, curated network of verified creators. Filter by audience, platform, location and language — then partner with the ones that fit, and pay only for performance. Verified Creators Each creator needs to verify their social profiles and goes through a verification process before being added to the platform. Filtering & Matching Find the perfect creators for your app based on their social profiles, audience, performance, location and languages spoken. Multi-platform Creators can post content across Instagram, TikTok and YouTube. Global & multi-lingual People from around the world can promote your app in their native language. Performance Driven Define how creators are rewarded and pay only for their performance. Dual-Sided Creators discover and apply to promote apps, while apps can discover and invite creators. ### Performance Rewards Multiple payout models for every kind of campaign. Revenue Share The percentage share of revenue that creators generate for the app. Per User Fixed fee per referred user. Per Conversion Fixed fee per referred user conversion. Per Post Fixed fee per post, up to a set limit. Per 1k Views Fee per 1k views generated, up to a set limit per post and campaign. ### How it works Launch your first creator campaign in three steps. 1 Enable Referral & Revenue Tracking Integrate WinWinKit into your app to enable referral code & revenue tracking. 2 Create Campaign Configure and publish a campaign defining your preferences, creator rewards, and budget. 3 Pay Creators One-click or automatic global payouts to creators. 02 Creators ## For creators Discover paid opportunities from apps that match your audience. Apply, create content, and get paid for the results you drive. ### How it works Start earning from your content in four steps. 1 Download WinWinKit app Get the WinWinKit creator app to browse opportunities, manage content, and track your performance in one place. 2 Browse Opportunities Discover campaigns from apps that match your audience, niche, and platforms. 3 Create Content Post on Instagram, TikTok, or YouTube using the brief and your own referral code. In most cases, you aren't subject to any constraints and can create as many posts as you want. Be creative and experiment with different content types and formats. 4 Get Paid Connect your bank account details and get paid wherever you are. --- # No-Code Integration Source: https://winwinkit.com/no-code/ > Launch affiliate marketing for your App Store app in under 5 minutes — no SDK or API integration required. Powered by Apple's native Offer Codes. Launch affiliate marketing in under 5 minutes. Available for App Store apps. Currently invite-only. [Request Access](mailto:support@winwinkit.com?subject=No-code%20integration%20access) ![Affiliates dashboard](/_astro/affiliates.BePITRkW.webp) 01 Integration ## Setting up takes under 5 minutes Step 1 Authorize App Store Connect Add an auth key for a direct and secure integration with App Store Connect. Step 2 Configure Rewards Define commissions structure for affiliates and choose a discount for users referred to the app. Step 3 Invite Affiliates Share a sign-up link with influencers, creators, or power users. Each affiliate gets a unique code to share with their audience. 02 Features ## Built on Apple's native foundation Code integration is the biggest friction point - so we eliminated it. WinWinKit connects directly to App Store Connect and handles everything server-side. Native User Experience Users redeem offers through built-in flow - no redirects and web views. Powered by Offer Codes Flexible discount codes with rich configuration options. All Configurations Supported Works with every available subscription Offer Code type. Fits Your Current Setup Reuse existing Offer Codes configuration if already in place. Analytics Code redemptions, revenue, and commissions are tracked and displayed in the dashboard. Minimum Permissions WinWinKit only requires Marketing & Sales access roles. The no-code integration is invite-only [Request Access](mailto:support@winwinkit.com?subject=No-code%20integration%20access) ![WinWinKit Icon](/_astro/icon.white.outline.BKy9wNT6.svg) 03 Features ## Grow on Autopilot Combine with platform's other features to enable end-to-end automation. Auto-Approve Automatically approve affiliates requesting to join the program. Auto-Payout Automatically pay affiliate commissions once eligible. Unlimited Affiliates Invite as many affiliates as you need. No limits on every plan. Resources Share brand materials, FAQs and support links, all via the platform. ![WinWinKit Dashboard with Active Affiliates](/_astro/affiliates-page-narrow.CWTLh6zX.webp) ![WinWinKit Landing Page for Affiliates to Apply](/_astro/affiliates-apply-usage.WCfAzVoK.webp) Invite & Manage Affiliates One dashboard to recruit, track, and pay affiliates. ## Frequently Asked Questions **Do I need to add any code to my app?** Not any of our SDKs. The only requirement is that your app supports Apple's native Offer Codes. Find more information about [implementing offer codes in your app](https://developer.apple.com/documentation/storekit/implementing-offer-codes-in-your-app). **Does it work with Google Play apps?** No, the no-code integration is available for App Store apps only. Google Play does not offer equivalent APIs. Android apps can use the standard integration instead. **What App Store Connect permissions are needed?** Marketing and Sales access via an auth key. **Which Offer Code types are supported?** All subscription Offer Code configurations are supported - free trials, pay-up-front, and pay-as-you-go. The in-app purchase Offer Codes are not supported yet. **How are redemptions tracked?** WinWinKit syncs data directly from App Store Connect on the server side. No tracking code runs inside your app. **Which plan do I need?** The no-code integration is available on every plan, including the Free plan. You can get started for free - no credit card required. **Can I cancel my subscription at any time?** Yes, you can cancel at any time. You'll keep access until the end of your billing period, after which you'll be downgraded to the free plan. --- # Attribution & Revenue Source: https://winwinkit.com/attribution-and-revenue/ > How attribution and revenue work in WinWinKit — the SDK integration, how purchase data reaches us from the App Store, Google Play, Stripe and RevenueCat, and how claims, trials and conversions are tracked. How user attribution and revenue tracking work in WinWinKit. 01 Attribution02 Integration03 Revenue tracking04 Claims, trials & conversions 01 Attribution ## Deterministic, privacy-friendly attribution Attribution links a user, and everything they spend, to the campaign that brought them in. In WinWinKit that happens the moment they claim a referral code. 01 User claims a referral code They enter a short code they got from a creator, a friend, or a discount campaign. Your app hands it to WinWinKit. 02 User is linked to the campaign WinWinKit validates the code, attributes the user to it, and grants whatever rewards were configured for them. 03 Revenue tracking From then on every purchase that user makes is credited to the same campaign — which is what analytics is built from. Accurate A user is either attributed or they are not. There is no confidence score to interpret and no window to tune. Privacy-friendly No fingerprinting, no cross-app tracking, no IDFA prompt. The only identifier involved is the app user ID you already have. Universal Works identically on iOS, Android, and the web, and does not break the next time a platform tightens its privacy rules. 02 Integration ## Set it up once Add the SDK, tell us who your user is, and pass along any code they enter. That one setup covers affiliate programs, user-to-user referrals, and promo codes. 01 Configure the SDK Drop in your project API key. Native SDKs for Swift, Kotlin, Dart, and TypeScript. Available via REST API. 02 Identify the user Register users by the app user ID you already have. No emails, no device IDs, no personal data. 03 Claim a code Pass the code the user entered. WinWinKit validates it, links the user to the campaign, and grants their rewards. 03 Revenue Tracking ## The whole purchase lifecycle WinWinKit automatically processes every step of the purchase lifecycle: trials, conversions, renewals, and refunds. Fully automatic Connect the integration once and transactions land on their own. Nothing to reconcile by hand. Every purchase type Works the same way with subscriptions, one-time purchases, intro offers, and reactivations. Real-time Transactions arrive the moment they happen, and show up in your dashboard right away. Trials Trial starts are tracked, but deliberately kept out of revenue so a free trial never inflates conversions. Renewals Each renewal is recorded on its own, and stays attributed to the source campaign. Refunds Each refund is tracked and automatically updates the attributed revenue and earnings. ![RevenueCat logo](/_astro/revenue-cat._yt0KJN1.svg) ### RevenueCat If RevenueCat is already in your app, this is the one to connect. A single webhook covers all three stores. ![App Store](/_astro/app-store.BYRU4tvf.svg) ![Google Play](/_astro/google-play.inGV1HHX.svg) ![Stripe](/_astro/stripe.DBHZogOx.svg) User actions & events Makes a purchase, renews a subscription, or gets a refund. Delivered to WinWinKit RevenueCat sends the event to WinWinKit right away. Matched to a user The event is attributed to the user and the source referral code. Analytics Transactions are converted into WinWinKit events and analytics. ![App Store logo](/_astro/app-store.BYRU4tvf.svg) ### App Store Direct revenue tracking from the App Store, with no third party in between. User actions & events Makes a purchase, renews a subscription, or gets a refund. Delivered to WinWinKit Apple sends the event to WinWinKit right away. Matched to a user The event is attributed to the user and the source referral code. Analytics Transactions are converted into WinWinKit events and analytics. ![Google Play logo](/_astro/google-play.inGV1HHX.svg) ### Google Play Direct revenue tracking from Google Play, with no third party in between. User actions & events Makes a purchase, renews a subscription, or gets a refund. Delivered to WinWinKit Google sends the event to WinWinKit right away. Matched to a user The event is attributed to the user and the source referral code. Analytics Transactions are converted into WinWinKit events and analytics. ![Stripe logo](/_astro/stripe.DBHZogOx.svg) ### Stripe Direct revenue tracking from Stripe, for the revenue that never touches a mobile store. User actions & events Makes a purchase, renews a subscription, or gets a refund. Delivered to WinWinKit Stripe sends the event to WinWinKit right away. Matched to a user The event is attributed to the user and the source referral code. Analytics Transactions are converted into WinWinKit events and analytics. 04 Claims, Trials & Conversions ## Foundation signals Everything in WinWinKit is built on three events: a code claimed, a trial started, a payment made. Earnings, rewards, and every number you see come from them. Claim One claim is one attributed user. It is the top of the funnel every other number is measured against, and it lands the instant the code is redeemed. Tracked by Claim a referral code method call from your app. Trial Trial starts are tracked separately so a free trial never inflates conversions. Once an integration is connected, they arrive on their own. Tracked by The trial event from your revenue integration. Conversion A user counts as converted on their first real purchase, once a trial turns into money. This is what unlocks per-conversion commissions and conversion-gated rewards. Tracked by The first purchase event with a positive amount. ### Metrics Every metric is updated in real time, split by day and broken down by code, affiliate, and affiliate group. Claims Users who redeemed the code. Trials Trial starts attributed to the code. Conversions First-time purchases, trials excluded. Revenue Purchases and renewals, minus refunds. Affiliate earnings Commission earned by the affiliates. Profit Revenue left after affiliate earnings. --- # Pricing Source: https://winwinkit.com/pricing/ > Plans, pricing, and what is included in each tier. Flexible plans that grow with you. ## Plans | Plan | Starter | Essential | Scale | | --- | --- | --- | --- | | Price | $30 per month | $75 per month | $150 per month | | Attributed Revenue | Starter | Essential | Scale | | --- | --- | --- | --- | | MAR | $3k MAR | $7.5k MAR | $15k MAR | _MAR - Monthly Attributed Revenue, which is the total revenue attributed across features._ | Affiliates | Starter | Essential | Scale | | --- | --- | --- | --- | | Unlimited Affiliates | Yes | Yes | Yes | | Payout Fee [1] | 7% Payout Fee | 5% Payout Fee | 3% Payout Fee | | Groups | 1 Group | 5 Groups | 25 Groups | | Landing | 1 Landing | 5 Landings | 25 Landings | | Custom Forms | No | Yes | Yes | | Analytics | No | Yes | Yes | | Auto-Approve | No | Yes | Yes | | Auto-Payouts | No | Yes | Yes | | Assets | Yes | Yes | Yes | | FAQ | Yes | Yes | Yes | _[1] - Does not include 3% of Stripe processing fee._ | Promos | Starter | Essential | Scale | | --- | --- | --- | --- | | Promo Codes | 20 Promo Codes | 50 Promo Codes | 100 Promo Codes | | Rewards | Starter | Essential | Scale | | --- | --- | --- | --- | | Amount of Rewards | 10 Rewards | 50 Rewards | 100 Rewards | | All Reward Types | Yes | Yes | Yes | | API | Starter | Essential | Scale | | --- | --- | --- | --- | | API Rate Limit | 600 req/min | 1,200 req/min | 2,400 req/min | | Native SDKs | Yes | Yes | Yes | | Client API | Yes | Yes | Yes | | Workspace | Starter | Essential | Scale | | --- | --- | --- | --- | | Team Members | 5 Team Members | 10 Team Members | 25 Team Members | | User Roles | Yes | Yes | Yes | | Support | Starter | Essential | Scale | | --- | --- | --- | --- | | Support | Email Support | Priority Email Support | Slack Channel | Free Trial while in Sandbox Mode Every new project starts in Sandbox Mode. Test your whole integration end-to-end before you go live — free. [Get Started for Free](https://app.winwinkit.com) ![WinWinKit Icon](/_astro/icon.white.outline.BKy9wNT6.svg) ## Frequently Asked Questions **Is there a free plan?** No — every plan is paid, and you choose one when you take your project live. Until then you're not charged anything: building and testing happens on the free trial below. **Do you offer a free trial?** Yes — Sandbox Mode. Every new project starts there, with no credit card and no time limit. Affiliates, referrals, promos and rewards behave exactly as in production; only sandbox transactions are tracked and no affiliate payouts are created. Deactivate Sandbox Mode when you're ready to go live. **What happens when I exceed my plan limits?** You will be notified when you are approaching your limit and will have the option to upgrade your plan before reaching your limit. If you exceed your plan limits, you may experience reduced functionality. **What is MAR?** Monthly attributed revenue (MAR) is the total revenue attributed across features. It includes all revenue WinWinKit tracks through your affiliates and promo codes. **Can I cancel my subscription at any time?** Yes, you can cancel your subscription at any time. If you cancel your subscription, you will still be able to use WinWinKit until the end of your billing period. After that, you will be downgraded and integration will stop working. --- # Attribution Source: https://winwinkit.com/docs/introduction/attribution/ > How users and revenue are attributed to the right campaigns in WinWinKit. Attribution is the process of associating a user — and the revenue they generate — with the right affiliate campaign, referral program, or promo code. WinWinKit takes a **deterministic, intent-driven** approach to attribution: a user is attributed to a campaign only when they explicitly claim a code. There is no fingerprinting, IP matching, or other probabilistic signal involved. Read more in our blog post: [How WinWinKit solves mobile attribution](/blog/how-winwinkit-solves-mobile-attribution/). ## User Attribution A user becomes attributed to a campaign at the moment they claim a code in your app: - The user enters or receives a short code (an [affiliate](/docs/affiliates/introduction/) code, [referral](/docs/referrals/introduction/) code, or [promo](/docs/promos/introduction/) code). - The app passes that code to WinWinKit via the SDK. - WinWinKit validates the code, links the user to the corresponding campaign, and grants any user-side rewards configured on it. This is a clear, observable action — you always know exactly which campaign brought a user in, and the user is in control of their own attribution. > **Tip:** Because attribution is driven by the code claim, the user experience around claiming a code matters. See the [User Experience for Claiming Code](/docs/guides/user-experience-for-claiming-code/) guide to learn more. ## Revenue Attribution Once a user is attributed to a campaign, every tracked transaction from that user is attributed to the same campaign. This is what powers: - **Affiliate earnings** — The revenue percentage configured on the affiliate campaign is applied to each tracked transaction from attributed users. - **Referral rewards** — A referrer can be rewarded based on the referee's purchases, conversions, or first transaction. - **Promo code analytics** — Revenue from users who claimed a promo code is rolled up into the promo code's analytics. See [Revenue Tracking](/docs/introduction/revenue-tracking/introduction/) for how transactions reach WinWinKit in the first place. ## Why Deterministic Attribution Most mobile attribution platforms rely on probabilistic matching — IP addresses, device fingerprints, or install referrers — which is increasingly unreliable on iOS and Android, and inherently fuzzy. WinWinKit's intent-driven approach trades the broadest possible reach for accuracy and privacy: - **Accurate** — A user is either attributed or not. There is no guesswork. - **Privacy-friendly** — No fingerprinting, no cross-app tracking. - **Durable** — Works the same on iOS, Android, and the web, regardless of platform privacy changes. The trade-off is that attribution requires an explicit user action — claiming a code. The rest of the WinWinKit product is designed around making that action seamless. --- # Introduction Source: https://winwinkit.com/docs/introduction/revenue-tracking/introduction/ > How WinWinKit tracks revenue from your app's purchases to attribute revenue, commissions and conversions. Revenue tracking is the foundation of everything WinWinKit does for affiliates, referrals, and promo codes. Without accurate revenue data, commissions cannot be calculated, conversions cannot be attributed, and rewards cannot be granted reliably. This section explains how WinWinKit ingests revenue data from each supported source, what gets tracked, and what to keep in mind when configuring an integration. ## Supported Sources WinWinKit currently tracks revenue from four sources: - [App Store](/docs/introduction/revenue-tracking/app-store/) — Apple's App Store, via App Store Server Notifications and the App Store Connect API. - [Google Play](/docs/introduction/revenue-tracking/google-play/) — Google Play Store, via Real-time Developer Notifications and the Play Developer API. - [Stripe](/docs/introduction/revenue-tracking/stripe/) — Subscription and one-off payments via Stripe webhooks. - [RevenueCat](/docs/introduction/revenue-tracking/revenuecat/) — Aggregated revenue from App Store, Google Play, and Stripe via RevenueCat webhooks. ## What Gets Tracked WinWinKit only tracks revenue from users who have engaged with an affiliate code, promo code, or referral program. Purchases from users with no such engagement are not stored or counted toward any analytics. For each tracked transaction, WinWinKit records: - **Type** — Initial purchase, renewal, refund, or trial. - **Amount** — Gross revenue (the actual amount paid by the user), normalized to USD. - **Store** — Which platform the transaction originated from (App Store, Google Play, Stripe, etc.). - **User** — The WinWinKit user the transaction belongs to, when it can be matched. This data is then used to: - Calculate affiliate earnings based on the campaign's revenue percentage. - Determine when a user converts (for conversion-based rewards). - Power analytics for affiliate codes, referral programs, and promo codes. ## Attribution For revenue to be attributed to the right campaign, WinWinKit needs to associate each transaction with a WinWinKit user. The way this association is made depends on the source — see the per-source pages for details. ## Sandbox vs Production Sandbox transactions are stored and visible on each user's profile so you can verify that integrations and attribution work end-to-end. However **only production** transactions are counted toward analytics and revenue tracking. ## Avoiding Duplicate Revenue When more than one integration is configured for the same app, the same purchase will be reported multiple times. WinWinKit does not deduplicate transactions across integrations — each integration assigns its own transaction identifier, so the same underlying App Store, Google Play, or Stripe purchase received via two integrations is recorded as two separate transactions. > **Warning:** Configure only one integration per revenue source. If a third-party integration (such as RevenueCat) already forwards revenue from a given platform, do not also configure a direct integration for that platform. ## Refunds When a refund event is received from any source, a corresponding negative-amount transaction is recorded against the original purchase. Affiliate earnings tied to the refunded transaction are adjusted accordingly if the transaction belongs to upcoming or holding payout. ## Currencies All revenue is normalized to USD before being stored. The exchange rate used is the one available at the time the transaction is processed. --- # App Store Source: https://winwinkit.com/docs/introduction/revenue-tracking/app-store/ > How WinWinKit tracks revenue directly from the Apple App Store. WinWinKit supports tracking revenue from the [App Store](https://apps.apple.com) directly via **App Store Server Notifications V2** — real-time webhooks delivered by Apple as transactions happen. ## App Store Server Notifications Once the integration is configured, Apple sends a notification to WinWinKit each time a relevant event occurs in your app: - **Initial purchase** — A user buys a subscription or in-app purchase for the first time. - **Renewal** — A subscription auto-renews. - **Refund** — Apple issues a refund for a previous purchase. - **Trial** — A user starts a free trial. ## What Gets Tracked Each App Store transaction recorded in WinWinKit includes: - **Type** — Purchase, renewal, refund, or trial. - **Amount** — Gross revenue (the actual amount paid by the user), normalized to USD. - **Original transaction ID** — Used to link renewals and refunds back to the original purchase. - **Product identifier** — The App Store product the user bought. - **Environment** — Sandbox or production. ## User Attribution App Store transactions are attributed to a WinWinKit user via the **original transaction ID** and, when available, Apple's **`appAccountToken`**. ## Setup To enable App Store revenue tracking: 1. In the WinWinKit dashboard, go to **Settings → Integrations → App Store Server Notifications** and follow the on-screen instructions to obtain the App Store Server Notifications V2 URL. 2. In [App Store Connect](https://appstoreconnect.apple.com), set that URL as the **Production Server URL** (and **Sandbox Server URL**, if you want sandbox transactions to appear) for your app. 3. In your app, use the WinWinKit SDK's method for registering or syncing transactions after a purchase completes, so WinWinKit can associate the transaction with the user. > **Note:** If your app uses RevenueCat and you prefer tracking revenue from the App Store directly, you do not need to change the Server Notifications URL in App Store Connect. Instead, set the WinWinKit webhook URL in the RevenueCat dashboard — RevenueCat will forward the underlying App Store events to WinWinKit. ## No-Code Integration For the [Affiliates](/docs/affiliates/introduction/) feature, App Store apps can be configured for revenue tracking and attribution without any SDK or backend code changes — the entire flow runs through Apple's own Offer Code redemption and the App Store Connect API. See the [No-Code Integration guide](/docs/affiliates/no-code/) for requirements, limitations, and setup steps. --- # Google Play Source: https://winwinkit.com/docs/introduction/revenue-tracking/google-play/ > How WinWinKit tracks revenue directly from the Google Play Store. WinWinKit supports tracking revenue from the [Google Play Store](https://play.google.com) directly via **Real-time Developer Notifications (RTDN)** — real-time messages delivered by Google through Cloud Pub/Sub as transactions happen. ## Real-time Developer Notifications Once the integration is configured, Google sends a notification to WinWinKit each time a relevant event occurs in your app: - **Initial purchase** — A user buys a subscription or one-time product for the first time. - **Renewal** — A subscription auto-renews. - **Refund** — Google issues a refund or voids a previous purchase. - **Trial** — A user starts a free trial. ## What Gets Tracked Each Google Play transaction recorded in WinWinKit includes: - **Type** — Purchase, renewal, refund, or trial. - **Amount** — Gross revenue (the actual amount paid by the user), normalized to USD. - **Purchase token** — Used to link renewals and refunds back to the original purchase. - **Product identifier** — The product or subscription SKU. - **Environment** — Sandbox or production. ## User Attribution Google Play transactions are attributed to a WinWinKit user via the **purchase token** and, when available, Google's **`obfuscatedAccountId`**. ## Setup To enable Google Play revenue tracking: 1. In the WinWinKit dashboard, go to **Settings → Integrations → Google Play Server Notifications** and follow the on-screen instructions to obtain the Pub/Sub topic and service account credentials. 2. In the [Google Play Console](https://play.google.com/console), enable Real-time Developer Notifications for your app and point them at the Pub/Sub topic provided by WinWinKit. 3. In your app, use the WinWinKit SDK's method for registering or syncing transactions after a purchase completes, so WinWinKit can associate the transaction with the user. > **Note:** If your app uses RevenueCat and you prefer tracking revenue from Google Play directly, you do not need to configure Real-time Developer Notifications in the Google Play Console. Instead, set the WinWinKit webhook URL in the RevenueCat dashboard — RevenueCat will forward the underlying Google Play events to WinWinKit. --- # RevenueCat Source: https://winwinkit.com/docs/introduction/revenue-tracking/revenuecat/ > How WinWinKit tracks revenue via the RevenueCat integration. WinWinKit supports tracking revenue via [RevenueCat](https://revenuecat.com) — a third-party subscription management platform that aggregates revenue across the App Store, Google Play, and Stripe. ## RevenueCat Webhooks Once the integration is configured, RevenueCat sends a webhook to WinWinKit each time a relevant event occurs: - **Initial purchase** — A user makes their first purchase. - **Renewal** — A subscription renews. - **Non-renewing purchase** — A one-off, non-subscription purchase. - **Refund / Cancellation** — A previous purchase is refunded or cancelled. - **Expiration** — A subscription lapses. ## What Gets Tracked Each RevenueCat transaction recorded in WinWinKit includes: - **Type** — Initial purchase, renewal, refund, non-renewing purchase, or trial. - **Amount** — Gross revenue (the actual amount paid by the user), normalized to USD. - **Store** — The underlying platform reported by RevenueCat (App Store, Google Play, Stripe, etc.). - **Product identifier** — The product the user purchased. - **Environment** — Sandbox or production. ## User Attribution RevenueCat transactions are attributed to a WinWinKit user via the **App User ID** sent by RevenueCat in the webhook event. ## Setup To enable RevenueCat revenue tracking: 1. In the WinWinKit dashboard, go to **Settings → Integrations → RevenueCat** and follow the on-screen instructions to obtain the WinWinKit webhook URL and authentication header. 2. In the [RevenueCat dashboard](https://app.revenuecat.com), add that URL as a webhook for your project. 3. Use the same App User ID in RevenueCat and WinWinKit so transactions can be matched to the right user. --- # Stripe Source: https://winwinkit.com/docs/introduction/revenue-tracking/stripe/ > How WinWinKit tracks revenue directly from Stripe. WinWinKit supports tracking revenue from [Stripe](https://stripe.com) directly via Stripe webhooks — real-time events delivered by your Stripe account as charges happen. ## Stripe Webhooks Once the integration is configured, Stripe sends a webhook to WinWinKit each time a relevant event occurs: - **Initial purchase** — A successful first-time charge for a subscription or one-off product. - **Renewal** — A subscription invoice is paid. - **Refund** — A previous charge is refunded. ## What Gets Tracked Each Stripe transaction recorded in WinWinKit includes: - **Type** — Purchase, renewal, or refund. - **Amount** — Gross revenue (the actual amount paid by the user), normalized to USD. - **Stripe Customer ID** — Used to link the charge to a WinWinKit user. - **Product identifier** — The Stripe product or price the user purchased. - **Environment** — Test or live mode. > **Warning:** Stripe revenue tracking currently only supports charges in **USD**. Charges in other currencies are received but not recorded as transactions. ## User Attribution Stripe transactions are attributed to a WinWinKit user via the [Stripe Customer ID](/docs/users/introduction/#stripe-customer-id) set on the WinWinKit user. ## Setup To enable Stripe revenue tracking: 1. In the WinWinKit dashboard, go to **Settings → Integrations → Stripe** and follow the on-screen instructions to obtain the WinWinKit webhook URL and signing secret. 2. In the [Stripe dashboard](https://dashboard.stripe.com), add that URL as a webhook endpoint and subscribe it to the events listed in the WinWinKit dashboard instructions. 3. When creating or updating a WinWinKit user, set the [Stripe Customer ID](/docs/users/introduction/#stripe-customer-id) so charges can be matched to the right user. --- # Introduction Source: https://winwinkit.com/docs/rewards/introduction/ > A reward represent a level of access, feature, offer, or content that a user is “rewarded” with. ![Rewards](@assets/docs/rewards-list.png) > **Tip:** If you're familiar with RevenueCat, WinWinKit's Rewards concept is similar to their [Entitlements](https://www.revenuecat.com/docs/getting-started/entitlements). ## Reward Types WinWinKit supports six rewards types that enable vast range of possibilities for engaging existing and attracting new users. If a reward type you need is not supported yet, we would love to know about it. Please [contact us](mailto:support@winwinkit.com) with your request. --- # Basic Source: https://winwinkit.com/docs/rewards/basic/ > Simplest reward that can be offered to users. Typically used to grant a user an access, feature, or content. ## Examples There are many ways how the basic reward type can be utilized. Below are a few of them: - **Alternative Plan**: Offer an alternative plan to a user. - **Feature Access**: Grant access to a special feature. - **Exclusive Content**: Unlock content that otherwise is restricted. ## Guides ### Creating a reward Let's create a simple reward that gives users an extra app icon. #### 1. Type Selected type is by default "Basic". ![Reward Type](@assets/docs/create-basic-reward-1.png) #### 2. Name and Description Enter name and description. > **Note:** Name and Description of the reward are shown on [Code Link](/docs/pages/code-link/) and [Affiliate Form](/docs/pages/affiliate-form/) pages if enabled, and also shown to [Affiliates](/docs/affiliates/introduction/) in their dashboard if configured as part of the User Rewards. ![Reward General](@assets/docs/create-basic-reward-2.png) #### 3. Key The key value is auto-filled based on the entered name and if is precise enough can be kept as is. > **Note:** The key is a stable and machine-readable string value meant to be used for granting users access to their rewards. Cannot be changed once the reward is saved. #### 4. Metadata This allows you to provide extra configuration and metadata making it flexible to meet your specific needs. Must be a valid JSON object. --- # Credit Source: https://winwinkit.com/docs/rewards/credit/ > Virtual currency reward. ## Examples There are many ways how the credit reward type can be utilized. Below are a few of them: - **Trial Days**: Grant a user with a number of trial days. One day equals one credit. - **AI Requests**: Grant additional requests as a reward. One request equals one credit. - **Game Levels**: Unlock a number of levels in a game. One level equals one credit. ## Withdrawing As a user utilizes the credits, you need to withdraw them. In your integration use a method from our SDK or call the REST API endpoint to withdraw credits. ## Guides ### Creating a reward Let's create a reward that rewards users with 20 extra AI requests. #### 1. Type Select type "Credit"". ![Reward Type](@assets/docs/create-credit-reward-1.png) #### 2. Name and Description Enter name and description. > **Note:** Name and Description of the reward are shown on [Code Link](/docs/pages/code-link/) and [Affiliate Form](/docs/pages/affiliate-form/) pages if enabled, and also shown to [Affiliates](/docs/affiliates/introduction/) in their dashboard if configured as part of the User Rewards. ![Reward General](@assets/docs/create-credit-reward-2.png) #### 3. Key The key value is auto-filled based on the entered name and if is precise enough can be kept as is. > **Note:** The key is a stable and machine-readable string value meant to be used for granting users access to their rewards. Cannot be changed once the reward is saved. #### 4. Credits Enter the number of credits attached to the reward. Once the reward is saved, its credits value cannot be changed. > **Note:** Credits are accumulative and can be granted multiple times to the same user. ![Reward Credits](@assets/docs/create-credit-reward-3.png) #### 5. Metadata This allows you to provide extra configuration and metadata making it flexible to meet your specific needs. Must be a valid JSON object. --- # App Store Offer Code Source: https://winwinkit.com/docs/rewards/appstore-offer-code/ > Discounted or trial subscription or in-app purchase offer on the App Store. Offer codes is a type of subscription and in-app purchase offers on the App Store. You can use them to acquire, retain, and re-acquire paying users by providing a discount or for free offer for a limited time. > **Warning:** Integration with the [App Store Connect](https://appstoreconnect.apple.com) is required to use this reward type. Log in to your project in [WinWinKit](https://app.winwinkit.com), click Settings -> Integrations -> App Store Connect -> Connect and follow the instructions. With WinWinKit you can create a peer-to-peer referral program that enables current users to share and receive an offer code as a reward for promoting your app. ![App Store Subscription Offers](@assets/docs/offer-codes-intro-1.png) ## Examples - **Discounted Start**: Give a user discounted first three months of a monthly subscription. - **Cheaper First Year**: Attract a user with a lower price for the first year of a yearly subscription. - **Free Month**: Reward with a free month of their active subscription for each invited user. - **Trial Period**: Enable a trial period on a subscription that otherwise is not available. ## Guides ### Configuring in the App Store Connect To start rewarding users with Offer Codes, you must first create them in App Store Connect. To create an Offer Code: **1. Sign in to [App Store Connect](https://appstoreconnect.apple.com).** **2. Navigate to Your App -> Subscriptions.** **3. Choose the subscription group containing your subscription.** **4. Select the subscription from the list.** **5. In the Subscription Prices section, click the add button (+).** ![Subscription Prices](@assets/docs/offer-codes-app-store-connect-1.png) **6. From the menu, click Create Offer Codes.** **7. Enter a reference name for the offer.** You’ll use this reference name to manage the offer in App Store Connect and to select it in WinWinKit when linking it to a reward. **8. Select the Customer Eligibility for your offer.** - **New subscribers**: Customers who have never subscribed to any subscription product within the group. - **Existing subscribers**: Customers who are currently subscribed to a product within the group. - **Expired subscribers**: Customers who were previously subscribed to a product within the group, but whose subscription has expired. > **Note:** All options are supported by WinWinKit. > **Note:** Note that WinWinKit does not store or provide any information about your user's current or past subscriptions. > **Note:** You might want to apply custom logic when displaying rewards for new, existing or expired subscribers. ![Create Offer Code](@assets/docs/offer-codes-app-store-connect-2.png) **9. Configure Introductory Offers compatibility.** If your subscription has an introductory offer, determine whether people redeeming your codes should be eligible to redeem both a code and the introductory offer by choosing from the following options: - **Yes**: Eligible customers will redeem your app’s introductory offer first, then automatically renew to the offer they redeemed with the code. - **No**: Eligible customers will redeem the offer code first, then automatically renew to the standard subscription price without using the introductory offer. If they cancel and resubscribe at any point, they’re still eligible to redeem an introductory offer. > **Note:** All options are supported by WinWinKit. **10. Click Next.** **11. Select the countries or regions where you want to make your offer available, then click Next.** > **Note:** **WinWinKit does not fetch or filter availability by countries or regions.** If your app is available globally, we recommend you select all. If you have custom requirements to availability you need to handle it on your side. **12. Select Type of Offer.** - **Pay as you go**: If you select Pay as you go, customers pay a discounted price for each billing period for a selected duration. - **Pay up front**: If you select Pay up front, customers pay a one-time discounted price for a selected duration. - **Free**: If you select Free, customers access the subscription for free for a selected duration. Learn more about [offer types](https://developer.apple.com/help/app-store-connect/reference/pricing-and-availability). > **Note:** All options are supported by WinWinKit. ![Type of Offer](@assets/docs/offer-codes-app-store-connect-3.png) **13. Choose the appropriate duration, and if applicable, the discounted price for a base country or region, then click Next.** **14. Make sure the details of your offer are correct and click Confirm.** **15. Congrats, your Offer Code is ready!** > **Note:** You can create multiple Offer Codes for the same or different subscriptions. > **Note:** Once you create an Offer Code, you won’t be able to edit it. If changes are needed, create a new one. > **Warning:** Be careful when deactivating an Offer Code if it is used with WinWinKit. Deactivating makes it unusable and will cause disturbance for rewards. For more information please refer to the App Store Connect documentation: - [Offer codes](https://developer.apple.com/app-store/subscriptions/#offer-codes) - [Set up offer codes](https://developer.apple.com/help/app-store-connect/manage-subscriptions/set-up-offer-codes/) ### Creating a reward Let's create a reward that rewards users with a free month of a subscription. **1. Type** Select type "Offer Code"". ![Reward Type](@assets/docs/create-offer-code-reward-1.png) **2. Name and Description** Enter name and description. > **Note:** Name and Description of the reward are shown on [Code Link](/docs/pages/code-link/) and [Affiliate Form](/docs/pages/affiliate-form/) pages if enabled, and also shown to [Affiliates](/docs/affiliates/introduction/) in their dashboard if configured as part of the User Rewards. ![Reward General](@assets/docs/create-offer-code-reward-2.png) **3. Key** The key value is auto-filled based on the entered name and if is precise enough can be kept as is. > **Note:** The key is a stable and machine-readable string value meant to be used for granting users access to their rewards. Cannot be changed once the reward is saved. **4. Offer Code** Select the Offer Code that is loaded from the App Store Connect. Once the reward is saved, its Offer Code value cannot be changed. ![Reward Offer Code](@assets/docs/create-offer-code-reward-3.png) **5. Metadata** This allows you to provide extra configuration and metadata making it flexible to meet your specific needs. Must be a valid JSON object. ### Supporting in the app Once everything is set up in App Store Connect and WinWinKit, you need to add support for Offer Codes in your app. When a user is rewarded with an Offer Code, there is two ways they can redeem it: - through a redemption URL, which opens the App Store - directly in your app. WinWinKit supports both ways, so you can choose which one to use. However, we recommend you implement support for both ways. #### Redemption URL Follow the Apple's documentation to implement support for Offer Codes redeemed outside of your app: [Support offer codes redeemed outside of your app](https://developer.apple.com/documentation/storekit/supporting-subscription-offer-codes-in-your-app#Support-offer-codes-redeemed-outside-of-your-app) > **Note:** If you use [RevenueCat](https://revenuecat.com/), you don't need to implement this, as their SDK listens for `updates` on `Transaction` already. #### Inside app Follow the Apple's documentation to implement support for Offer Codes redeemed in your app: [Redeem offer codes in your app](https://developer.apple.com/documentation/storekit/supporting-subscription-offer-codes-in-your-app#Redeem-offer-codes-in-your-app) > **Note:** Essentially you only need to present a native sheet where user can enter the Offer Code value. #### Retrieve and Redeem Offer Code WinWinKit provides Offer Code value for active rewards for the user. Available Offer Code reward and value can be retrived on the `User` object. **Retrieving Offer Code value with Swift SDK:** ```swift let offerCodeRewards = Referrals.shared.user?.rewards.active.offerCode let offerCodeReward = offerCodeRewards?.first // The value that can be presented to the user, and they can redeem in the app. let offerCodeValue = offerCodeReward?.value.value // The redemption URL that can be used to redeem the Offer Code in the App Store. // You can open this URL to prompt the user to redeem it. let offerCodeRedemptionURL = offerCodeReward?.value.link // The expiration date of the Offer Code value. // After the expiration date, a new value will be assigned, unless the reward is expired before. let offerCodeExpirationDate = offerCodeReward?.value.expiresAt ``` > **Note:** For new users, redeeming an Offer Code is starting a subscription in your app. > **Note:** For existing users, redeeming an Offer Code is starting, adding, changing, renewing or getting temporary discount on a subscription in their account. What happens depends on the subscription type and the Offer Code they redeem. For more information please refer to the App Store Connect documentation: [Supporting offer codes | Design Guidelines](https://developer.apple.com/design/human-interface-guidelines/in-app-purchase#Supporting-offer-codes) [Supporting subscription offer codes in your app](https://developer.apple.com/documentation/storekit/supporting-subscription-offer-codes-in-your-app) [Implementing offer codes in your app](https://developer.apple.com/documentation/storekit/implementing-offer-codes-in-your-app) --- # Google Play Promo Code Source: https://winwinkit.com/docs/rewards/googleplay-promo-code/ > Trial subscription offer on Google Play. With WinWinKit you can reward users with a promo code giving them a free month or extended trial when starting a subscription via Google Play. > **Warning:** Because Google Play does not provide API interface for creating and fetching promo codes, the promo codes need to be manually created and uploaded to WinWinKit with a .csv file. ## Examples - Free Month: Reward with a free month of their active subscription for each invited user. - Trial Period: Enable a trial period on a subscription that otherwise is not available. --- # RevenueCat Entitlement Source: https://winwinkit.com/docs/rewards/revenuecat-entitlement/ > Reward an Entitlement directly in RevenueCat. > **Warning:** Integration with [RevenueCat](https://www.revenuecat.com) is required to use this reward type. Log in to your project in [WinWinKit](https://app.winwinkit.com), click Settings -> Integrations -> RevenueCat -> Connect and follow the instructions to enable it. ## Examples - **Feature Access**: Grant access to a feature as a reward for engaging with referrals. - **Premium Access**: Grant access to premium features for a limited time. Learn more about [RevenueCat Entitlements](https://www.revenuecat.com/docs/getting-started/entitlements). --- # RevenueCat Offering Source: https://winwinkit.com/docs/rewards/revenuecat-offering/ > Reward a custom Offering directly in RevenueCat. > **Warning:** Integration with [RevenueCat](https://www.revenuecat.com) is required to use this reward type. Log in to your project in [WinWinKit](https://app.winwinkit.com), click Settings -> Integrations -> RevenueCat -> Connect and follow the instructions to enable it. ## Examples - **Special Offering**: Set a special offering for newcomers from a referral invite. Learn more about [RevenueCat Offerings](https://www.revenuecat.com/docs/offerings/overview). --- # Introduction Source: https://winwinkit.com/docs/affiliates/introduction/ > Invite affiliates to promote your app for a commission. ![Affiliates](@assets/docs/affiliates-table.png) ## Revenue Tracking Revenue tracking is a crucial aspect of affiliate marketing, as it allows monitoring and measuring the performance of campaigns and attributing correct commissions to the affiliates. > **Warning:** Setting up a revenue tracking integration is required to get started with the Affiliates feature. Follow instructions on the dashboard to set it up. > **Warning:** Valid payment method is required to get started with the Affiliates feature. It is to ensure that affiliates are paid for their promotion. Follow instructions on the dashboard to set it up. ### RevenueCat [RevenueCat](https://revenuecat.com) is a subscription management platform that simplifies the process of managing subscriptions and in-app purchases in mobile apps. Established integration provides accurate and timely data about the revenue in your app from the [App Store](https://apps.apple.com), [Google Play](https://play.google.com), and also from [Stripe](https://stripe.com) if connected. > **Note:** For correct attribution ensure using the same user ids in RevenueCat and WinWinKit. ### Stripe [Stripe](https://stripe.com) is an online payment processing platform that allows businesses to accept and manage payments through their websites and apps. Established integration provides accurate and timely data about the revenue made via the platform. > **Note:** For correct attribution set [Stripe Customer ID](/docs/users/introduction/#stripe-customer-id) when creating/updating a user in WinWinKit. > **Warning:** If existing [RevenueCat](https://revenuecat.com) integration provides revenue information from [Stripe](https://stripe.com) too, adding separate integration for [Stripe](https://stripe.com) is not needed, and it might cause duplicate revenue data. To verify if [RevenueCat](https://revenuecat.com) provides [Stripe](https://stripe.com) data, check the integrations page on the [RevenueCat](https://revenuecat.com) dashboard. ## Creating a Campaign ### General #### Code Each affiliate campaign has its unique code by which users claim attached rewards and are linked to a specific campaign. Assign a custom value or generate a random one. ![Affiliates Create Code](@assets/docs/affiliates-create-code.png) ### Affiliate Rewards Affiliates promote your app for a specified commission over a given period of time. > **Tip:** Affiliate rewards can be used in combination or separately, giving you the flexibility to create a tailored campaign for your app and affiliates. #### Revenue Percentage Set the commission percentage earned from each purchase. Initial and recurring purchases are counted towards the commission. ![Affiliates Create Revenue Percentage](@assets/docs/affiliates-create-revenue-percentage.png) #### Amount per User Set fixed amount earned for each user who claims the code. > **Note:** The amount per user can be counted towards the commission only once per user. ![Affiliates Create Amount per User](@assets/docs/affiliates-create-amount-per-user.png) #### Amount per Conversion Set fixed amount earned for each user conversion. Learn more about user's [is premium](/docs/users/introduction/#is-premium) flag to understand how conversions are tracked. > **Note:** The amount per conversion can be counted towards the commission only once per user. ![Affiliates Create Amount per Conversion](@assets/docs/affiliates-create-amount-per-conversion.png) #### Duration Set the duration of the affiliate campaign in months. The duration is counted from the first time the affiliate code is claimed by a user. > **Note:** The campaign is archived after the duration is over. Note that users can still claim the affiliate campaign's code after the campaign's duration is over, but the tracked revenue is not counted towards the commission for the affiliate. ![Affiliates Create Duration](@assets/docs/affiliates-create-duration.png) ### User Rewards To improve conversion of signups configure rewards for the user who arrives via the affiliate campaign. ![Affiliates Create User Rewards](@assets/docs/affiliates-create-user-rewards.png) Learn more about [Rewards](/docs/rewards/introduction/). ## States During the life cycle of the campaign, the state of the campaign can be changed. ![Affiliates States](@assets/docs/affiliates-states.png) ### Active The campaign is active and users can claim rewards. Tracked revenue is counted towards the commission for the affiliate. ### Pending The campaign is pending and an affiliate should accept the campaign to activate it. ### Requests The incoming requests from affiliates signing up via the [Affiliate Form](/docs/pages/affiliate-form/) are displayed here. You need to accept or reject the request. ### Archived The campaign is archived after the duration of the active campaign has passed the due date. User can still claim rewards for the campaign, but the tracked revenue is not counted towards the commission for the affiliate. ## Preview Press a campaign row in the table to open the preview page. Complete information about the affiliate, rewards, and analytics are displayed there. ![Affiliates Active Preview](@assets/docs/affiliates-active-preview.png) ## Payouts WinWinKit is responsible for tracking the revenue and transferring the commissions to the affiliates. ## Guides Check out our guide about [setting up Affiliates with RevenueCat](/docs/guides/setting-up-affiliates-with-revenuecat/). --- # No-Code Integration Source: https://winwinkit.com/docs/affiliates/no-code/ > Introduction and integration guide. > **Warning:** The No-Code Integration is currently an invite-only feature. If you're interested in getting access, please [reach out to us](mailto:support@winwinkit.com). ## Introduction Every platform for affiliate marketing for mobile apps requires some kind of code integration. Even most web-based platforms require some kind of code integration. But we believed it could be better and simpler, and searched for a solution for a very long time. Finally, we have a solution that we believe can be a game changer for affiliate marketing in the mobile app space. ## Requirements ### App Store apps This feature works only for apps distributed via the App Store. > **Note:** A similar setup for Google Play Store apps is currently not possible, and might not be possible at all. For Android apps, consider using our standard integration approach. ### Offer Codes The app must have Offer Code support enabled. This might be the only code change needed, but it involves adding integration of Apple's native feature, not a third party. > **Note:** When using RevenueCat, Superwall, or similar tools, the necessary support is most likely already in place. Check the documentation for your chosen SDK. > **Note:** For RevenueCat paywalls, you might want to configure the redeem button as part of the paywall. ### App Store Connect Integration The integration must be established via the WinWinKit dashboard. > **Note:** The required access roles are **Marketing** and **Sales**. You might need to update an existing integration with the new permissions. > **Note:** Previously, the integration required the **App Manager** access role, but this has been revised and now lower-level access roles are sufficient. ## Limitations Current limitations apply only to the Offer Code configurations. These limitations exist mainly due to uncertainty about the data structure and quality received from App Store Connect. These limitations will be partially, but hopefully fully, lifted when proper handling of currently unsupported cases is possible and is implemented. ### Available to New Users The Offer Code configuration must be available to new users. This is configured in App Store Connect when creating a new offer. ### Subscriptions Only Since iOS 18, Offer Codes work with in-app purchases (lifetime) too. While Apple only recently released an API to interact with the new Offer Codes, they still don't provide analytical data about them. Support for in-app purchases will be added as soon as there is a way to get data from App Store Connect. ### Usage & Limits When creating a custom Offer Code on an app's behalf in App Store Connect, WinWinKit sets a minimum configurable limit of 500. This means that up to 500 users can claim the code until the usage is extended. WinWinKit tracks and extends the usage & limits of Offer Codes automatically on a daily basis. Currently this means that up to 500 users can claim the code per day. Latest tracked usage & limits are displayed in the dashboard for each code. Values are updated daily. ## Setting Up Steps to set up an Offer Code for no-code integration: ### 1. App Store Connect Integration The first step is to add or update your integration with App Store Connect. This enables interaction with and tracking of Offer Codes. **1.1.** Go to Settings → Integrations → App Store Connect → Connect → No-Code Integration and follow the instructions for providing an Auth Key. > **Warning:** The required access roles are **Marketing** and **Sales**. ### 2. Offer Code Reward The next step is to create a new reward with an Offer Code. **2.1.** Go to Rewards → New Reward **2.2.** Select Type → Offer Code **2.3.** Select Offer Code from the dropdown The Offer Code configuration is displayed once loaded. Have a look at the Native Integration item, which indicates whether the currently selected Offer Code is compatible with the current limitations. If needed, create a different Offer Code in App Store Connect that meets the limitation criteria described above. Save when done. > **Warning:** Remember, the selected Offer Code should be compatible with the no-code integration. ### 3. Configure User Rewards for an Affiliate Group **3.1.** Go to Affiliates → Groups → Default Group **3.2.** Set Affiliate Rewards Update Commission Rate if needed. Update Commission Duration to be 1 month (equals the user's first tracked transaction). This is best kept at 1 month until support for tracking renewals is in place. Update Amount per User and Amount per Conversion if needed. Save when done. **3.3.** Set User Rewards In App Store Offer Code Reward section, select the Offer Code reward created in step 2. Save when done. ### 4. Invite Affiliates Copy invite link to the group by going to Affiliates → Invite Affiliates → Copy Link. Share the invite link with your affiliates. You will receive an email notification when a new affiliate request is submitted. ### 5. Creating a Code Once there are affiliates on board, they can create the first referral code themselves. Alternatively, you can create up to three codes for each affiliate. When a code is created from the WinWinKit dashboard, it will also be created on App Store Connect as a custom Offer Code. Immediately after, users can use this code to redeem a discount on your app. WinWinKit validates that the code does not already exist on App Store Connect before creating it. Note that it is currently not possible to edit or delete any custom offer codes in App Store Connect. They can only be deactivated, and support for this is already in place. ## Resources **Apple Documentation:** - [Setting up subscription offer codes in App Store Connect](https://developer.apple.com/help/app-store-connect/manage-subscriptions/set-up-subscription-offer-codes) - [Implementing offer codes in your app](https://developer.apple.com/documentation/storekit/implementing-offer-codes-in-your-app) --- # For Affiliates Source: https://winwinkit.com/docs/affiliates/for-affiliates/ > Affiliates can be creators, influencers, media, or even your app users! Each affiliate has access to their own dashboard where they can see the details of their campaigns and earnings. ![Affiliates Dashboard](@assets/docs/affiliates-aff-dashboard.png) ### Payouts To receive payments, affiliates are required to provide their preferred way of receiving money via our Stripe Connect integration. Payouts are available for the previous month after default 14-days holding period, and are initiated by an app owner from their dashboard. --- # Introduction Source: https://winwinkit.com/docs/referrals/introduction/ > Launch a referral program to reward users for inviting others and being invited. ![Programs](@assets/docs/referrals-table.png) ## Creating a Program ### General #### Name and Description Name and optional description that are meant for internal use. ### Rewards Rewards are essential part of any referral program and represent a level of access, feature, or content that a user is "rewarded" with. Learn more about [Rewards](/docs/rewards/introduction/). #### Referring vs Invited users Referring users are those who invite others to your app. They initiate the referral by sharing their unique referral code. Invited users are new users to your app who are referred by the referring users. This dual-reward system creates a mutually beneficial environment, encouraging both parties to participate actively in the referral. #### Activation Each reward for either referring or invited users has its own configuration for when it should be activated, which determines when the party should be rewarded. **Claim** For **the referring user**, activate the reward when invited user(s) claim the referral code. The number defines how many invited users should claim the referral code for the reward to be activated. For example, the default value "1" means that the reward to be activated when the first invited user claims the referral code. For **the invited users**, activate the reward once the referral code is claimed. Note there is no number selection for Activation - invited users have no further relations. **Conversion** For **the referring user**, activate the reward when invited user(s) claim the referral code and then become premium. The number defines how many invited users should claim and convert for the reward to be activated. For example, the default value "1" means that the reward to be activated when the first invited user converts to premium. For **the invited users**, activate the reward when converted to premium. Note there is no number selection for Activation - invited users have no further relations. > **Warning:** Using **Conversion** type for activating rewards requires continious updates to the `is_premium` property for users. Read more about [Users](/docs/users/introduction/). #### Deactivation Each reward has deactivation configurations. **Never** Once the reward is activated, the user will retain it indefinitely. **Interval** Once the reward is activated, the user retains it for a specified duration. > **Note:** Check out how "Free Month" reward is configured in the [Example Program](/docs/guides/creating-a-referral-program-1/#3-rewards-for-the-invited-user) below. ### Configs #### Limit In some cases, it may be beneficial to restrict the number of invited users who can utilize the same referral code. The default setting is Unlimited, but this can be adjusted to any number up to 100. If you require a different limit than what is currently offered, [please contact us](mailto:support@winwinkit.com). #### Metadata This allows you to provide extra configuration and metadata making it flexible to meet your specific needs. Must be a valid JSON object. ## Activation An active program means that any app users created through an integration will be assigned to that program. Once a user is assigned to the program, they receive a unique referral code that can be shared with and claimed by other users of your app. By default every new program is Inactive. #### How to Activate Click the three-dots icon on the right side of a row and click "Activate": ![Activate Program](@assets/docs/activate-program.png) > **Warning:** Currently WinWinKit supports **only one active program at a time**. We're working towards allowing multiple active programs with split distribution and targeting. ## Re-assignment Currently it is not possible to explicitly re-assign a user to a different program. If a program is deleted, then users who have been assigned to that program will be assigned to the active program. If there is no active program, users won't have any program. It is also technically possible to have users with referral code but not a program. > **Note:** Referral code can be assigned to a user only once. While it is technically possible for the user to be assigned to different programs, their referral code won't change. > **Warning:** Activate and delete programs with caution to prevent unexpected issues. In production, it is good practice to always have an active program. ## Guides Learn more about [designing a referral program](/docs/guides/designing-a-referral-program/) and check out an example [referral program](/docs/guides/creating-a-referral-program-1/) in our [guides](/docs/guides/). --- # Introduction Source: https://winwinkit.com/docs/promos/introduction/ > Attract new users by distributing promo codes. ![Promos](@assets/docs/promos-table.png) ## Creating a Promo Code ### General #### Code Unique promo code that can be distributed to invite users to claim it and receive rewards. Examples: SUMMER25, WELCOME10, BLACKFRIDAY #### Description Optional description for internal use. ### Rewards Rewards for the users claiming the promo code. Learn more about [Rewards](/docs/rewards/introduction/). ### Configs #### Limit In some cases, it may be beneficial to restrict the number of users who can utilize the same promo code. The default setting is Unlimited, but this can be adjusted to any number. When the limit is reached, the promo code can no longer be used. --- # Code Link Source: https://winwinkit.com/docs/pages/code-link/ > A web link to a code, its rewards, and instructions on how to use it. The code can be an affiliate, referral, or promo code. Code Link provides a convenient way to onboard new users and can be used across all code types supported by the platform. Affiliates can share a link to their campaign code with their audience making the onboarding process streamlined. A link to the referral code page can be shared between users for faster onboarding. A link to the promo code page can be shared to attract new users to your app. In combination with deep links, Code Link can be used to onboard new users with a two-step process. ## Format A code link has the following format: `https://.wwk.link/`. ## Example An example of the Code Link page for the [Usage](https://usage.pro) app, available at [https://usage.wwk.link/NMB231](https://usage.wwk.link/NMB231). ![Code Link Usage](@assets/docs/code-link-usage.png) ## Setting Up ### Project Details For the best presentation of the project on the Code Link page, configure the following details by going to Settings -> General. #### Logo Upload app icon. #### Name In necessary update the name of the project to match the app name. #### Description Enter a short description of the app. #### Link Set the link to where your app is available. This can be a link to the App Store or website. ![Code Link Project Details](@assets/docs/code-link-project-details.png) ### Subdomain Subdomain is required to enable the Code Link feature and can be set by going to Settings -> General -> Subdomain. > **Warning:** Subdomain can be set only once. ![Code Link Subdomain](@assets/docs/code-link-subdomain.png) ### Deep Links Deep links can be used to open the app directly from the Code Link page and enable two-step instructions shown on the page. #### Configuring Navigate to Pages -> Code Link -> Deep Links to configure the deep links. Configure a deep link for each platform where your app is available, or set a single deep link that works across all platforms. > **Warning:** You are responsible for setting up the deep links handling in your app. When receiving a deep link, you can present a view, claim the received code, or implement any other functionality that suits your needs. ![Code Link Deep Links](@assets/docs/code-link-deep-links.png) ## Preview Navigate to Pages -> Code Link to preview and verify the presentation of the page. Use **Preview Configurations** to verify how the page is presented with different content and deep links. ![Code Link Preview](@assets/docs/code-link-preview.png) ## Access ### Affiliate Code The affiliate code link is available on the dashboard for active and archived campaigns. ### Referral Code The referral code link value is available on the user object via SDKs and REST API. #### Swift SDK The Code Link value is available on the User object as the `referralCodeLink` property. Get it from the singleton instance: ```swift let referralCodeLink = Referrals.shared.user?.referralCodeLink ``` Or in a SwiftUI view from the observable object: ```swift @State var referralsObservableObject = Referrals.shared.observableObject ... Text(self.referralsObservableObject.user?.referralCodeLink ?? "-") ``` Learn more about [Swift SDK](/developers/sdks/swift/). #### TypeScript SDK The Code Link value is available on the user object as the `referral_code_link` property. ```typescript const user = await winwinkit.fetchUser({ appUserId: "" }); const referralCodeLink = user?.referral_code_link; ``` #### REST API The Code Link value is part of the User object: ```json { "data": { "user": { "app_user_id": "821fae4b5-1a2d-4c1e-9152-5297086a161c", "referral_code": "XYZ123", "referral_code_link": "https://example.wwk.link/XYZ123", ... } } } ``` ### Promo Code The promo code link can be constructed by following the usual format `https://.wwk.link/`. --- # Affiliate Form Source: https://winwinkit.com/docs/pages/affiliate-form/ > A web page where new affiliates can sign up to promote your app for a commission. Affiliate Form provides a quick and easy way to onboard new affiliates. Spread a link to the Affiliate Form page within your network and place it on your website to attract new affiliates. > **Tip:** Affiliates arriving via the form need your approval. You will receive an email notification when a new affiliate signs up. ## Format An affiliate form link has the following format: ``` https://.wwk.link/affiliate-form ``` ## Example An example of the Affiliate Form page for the [Usage](https://usage.pro) app, available at [https://usage.wwk.link/affiliate-form](https://usage.wwk.link/affiliate-form). ![Affiliate Form Usage](@assets/docs/affiliate-form-usage.png) ## Setting Up ### Project Details For the best presentation of the project on the Affiliate Form page, configure the following details by going to Settings -> General. #### Logo Upload app icon. #### Name In necessary update the name of the project to match the app name. #### Description Enter a short description of the app. #### Link Set the link to where your app is available. This can be a link to the App Store or website. ![Affiliate Form Project Details](@assets/docs/code-link-project-details.png) ### Subdomain Subdomain is required to enable the Affiliate Form feature and can be set by going to Settings -> General -> Subdomain. > **Warning:** **Subdomain can be set only once.** ![Affiliate Form Subdomain](@assets/docs/code-link-subdomain.png) ### Availability The Affiliate Form by default is not publicly available. When project details are up-to-date and the subdomain is set, the form can be made publicly available by going to Pages -> Affiliate Form -> Public Status and changing it to Enabled. When publicly available, the form can be accessed at `https://.wwk.link/affiliate-form`. ![Affiliate Form Public Status](@assets/docs/affiliate-form-public-status.png) ### Rewards You can set the default rewards for new affiliates signing up via the form, and for the inviting users coming to the app, by pressing Update Rewards button on the same page. ![Affiliate Form Rewards](@assets/docs/affiliate-form-rewards.png) ## Preview Navigate to Pages -> Affiliate Form to preview and verify the presentation of the page. ![Affiliate Form Preview](@assets/docs/affiliate-form-preview.png) --- # Introduction Source: https://winwinkit.com/docs/users/introduction/ > A user represents an individual who interacts with your app. ![Users](@assets/docs/users-list.png) To complete integration, you must register users of your app in WinWinKit via our SDK or REST API.. ## User Properties ### Configurable These are the properties that you can use to update your user entities in WinWinKit. #### App User Id (Required) The only mandatory property that uniquely identifies a user within your app and in WinWinKit. Normally it is a universally unique identifier (UUID). #### Is Premium Flag determining the premium status of a user. The `is_premium` flag serves an important purpose of tracking: - [Amount per Conversion](/docs/affiliates/introduction/#amount-per-conversion) in affiliate rewards; - [Activation on Conversion](/docs/referrals/introduction/#activation) configuration in referral programs; - [Stats](/docs/users/introduction/#stats) of referring users. We recommend updating it whenever user's premium status changes. To handle trial users properly, read more about [Is Trial](/docs/users/introduction/#is-trial) flag below. > **Tip:** For automatic updates of the `is_premium` flag, enable integration with [RevenueCat](https://revenuecat.com/). To do this, go to your project in WinWinKit and navigate to Settings -> Integrations page. #### Is Trial Flag determining the trial status of a user. Helps to improve conversion tracking accuracy by filtering out users who are still in trial. We recommend updating it whenever user's trial status changes. When both `is_premium` and `is_trial` are set to `true`, the user is considered a trial user, and no conversion is tracked. > **Tip:** For automatic updates of the `is_trial` flag, enable integration with [RevenueCat](https://revenuecat.com/). To do this, go to your project in WinWinKit and navigate to Settings -> Integrations page. #### First Seen At Date when the user was first seen in your app. Used to determine user's eligibility to claim a referral code. Learn more about [Claim Code Elibigility](/docs/users/introduction/#claim-code-eligibility) #### Metadata A metadata object. This allows you to provide extra configuration and metadata making it flexible to meet your specific needs. Must be a valid JSON object. #### Stripe Customer ID Stripe customer ID. Used in tracking revenue with Stripe for the [Affiliates](/docs/affiliates/introduction/) feature. Example: **cus_1234567890** ### Provided by WinWinKit These are the properties provided by WinWinKit that reflect user's referral data, active and expired rewards, and stats. #### Referral Code Unique referral code for the user. A referral code is always 6 characters long and consists of a combination of letters and numbers. > **Note:** The code is unique within your app. > **Note:** Is assigned once and never changes. Example: **XYZ123** #### Referral Code Link A web url to the referral code and its rewards which your app users can share with friends. Learn more about how to set up [Code Link](/docs/pages/code-link/). **Example**: `https://appname.wwk.link/XYZ123` #### Referral Program An object containing complete information about the referral program assigned to the user. Can be used to create dynamic user interface based on the program configurations. #### Claim Code Eligibility An object providing information about user's eligibility to claim a referral code. > **Note:** **An eligible user is allowed to claim a referral code.** **Eligibility Rules** Currently, WinWinKit implements a few simple rules for limiting the types of users eligible to claim a referral code. - A user must not be older than the configured time constraints for claiming a code (by default it is 7 days). The reference date used is the [First Seen At](/docs/users/introduction/#first-seen-at), if provided; otherwise, the date when the user was created in WinWinKit is used. > **Tip:** This is a configurable setting and can be set between 0 and 365 days, where 0 allows unlimited time for claiming a code. To change the setting, open your project dashboard → Settings → General → Configurations → Claim Code Constraint in Days. - The limit for claiming a code has not been reached. The limit is defined by the [referral program](/docs/referrals/introduction/)'s or [promo code](/docs/promos/introduction/)'s limit. > **Note:** By default there is no limit, and it must be specified for this rule to apply. - A user can claim a code only once. - A user cannot claim own code. > **Note:** You can impose further limitations on a user's ability to claim a code by building own logic and user experience. > **Note:** If a user attempts to claim a code when not eligible, WinWinKit provides an error code and a descriptive message explaining the reason for the decline. Learn more about [Handling Errors](/developers/api/errors/) for more details. **Example** The `eligible` field indicates whether the user can claim a code, while `eligible_until` specifies the expiration date. ```json "claim_code_eligibility": { "eligible": true, "eligible_until": "2025-02-10T10:28:18.104Z" } ``` > **Note:** Until date can be null if the user is not eligible or when there is no time constraint for claiming a code. #### Referred By An object with the claimed code, and a type, which can be one of `affiliate`, `promo`, or `referral`. **Example** ```json "referred_by": { "code": "XYZ123", "type": "affiliate" } ``` > **Note:** Code value can be null if the entity (e.g. affiliate campaign) of claimed code has been deleted. #### Stats An object with information about referral statistics for the user. Provides three values: - Claims - how many invited users claimed the user's referral code. - Conversions - how many of those who claimed the user's referral code became premium users. - Churns - how many of those who claimed the user's referral code became premium users and then churned. > **Note:** Correct tracking of Conversions and Churns requires updating [Is Premium](/docs/users/introduction/#is-premium) flag. **Example** ```json "stats": { "claims": 10, "conversions": 8, "churns": 1 } ``` #### Rewards A list of active and expired rewards for the user. > **Warning:** Remember to unlock access to the active rewards in your app. ```json "rewards": { "active": { "basic": [ { "reward": { "key": "app-icon-neon", "name": "App Icon Neon", "description": "Access to an exclusive app icon", "metadata": null, "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" }, "expires_at": null, "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" } ], "credit": [ { "reward": { "key": "20-ai-requests", "credits": 20, "name": "20 AI Requests", "description": "Access to extra AI requests", "metadata": null, "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" }, "credits": 20, "expires_at": "2021-01-01T00:00:00.000Z", "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" } ], "offer_code": [ { "reward": { "key": "free-month", "offer_code_id": "123e4567-e89b-12d3-a456-426614174000", "name": "Free Month", "description": "Receive a free month of a subscription", "metadata": null, "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" }, "value": { "value": "ABCDEFGHIJKLMNOPQR", "link": "https://apps.apple.com/redeem?ctx=offercodes&id=1234567890&code=ABCDEFGHIJKLMNOPQR", "expires_at": "2021-01-01T00:00:00.000Z" }, "expires_at": "2021-01-01T00:00:00.000Z", "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" } ] }, "expired": { "basic": [], "credit": [], "offer_code": [] } } ``` ## Example Below is an example of a full referral user object returned by the REST API. ```json { "data": { "user": { "app_user_id": "821fae4b5-1a2d-4c1e-9152-5297086a161c", "referral_code": "XYZ123", "referral_code_link": "https://appname.wwk.link/XYZ123", "is_premium": false, "first_seen_at": "2024-11-10T10:28:18.104Z", "metadata": {}, "stripe_customer_id": "cus_1234567890", "claim_code_eligibility": { "eligible": true, "eligible_until": "2024-11-10T10:28:18.104Z" }, "referred_by": { "code": "XYZ123", "type": "affiliate" }, "stats": { "claims": 0, "conversions": 0, "churns": 0 }, "rewards": { "active": { "basic": [ { "reward": { "key": "basic-reward", "name": "Basic Reward", "description": "This is a basic reward", "metadata": {}, "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" }, "expires_at": "2021-01-01T00:00:00.000Z", "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" } ], "credit": [ { "reward": { "key": "credit-reward", "credits": 100, "name": "Credit Reward", "description": "This is a credit reward", "metadata": {}, "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" }, "credits": 100, "expires_at": "2021-01-01T00:00:00.000Z", "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" } ], "offer_code": [ { "reward": { "key": "offer-code-reward", "offer_code_id": "123e4567-e89b-12d3-a456-426614174000", "name": "Offer Code Reward", "description": "This is an offer code reward", "metadata": {}, "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" }, "value": { "value": "ABCDEFGHIJKLMNOPQR", "link": "https://apps.apple.com/redeem?ctx=offercodes&id=1234567890&code=ABCDEFGHIJKLMNOPQR", "expires_at": "2021-01-01T00:00:00.000Z" }, "expires_at": "2021-01-01T00:00:00.000Z", "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" } ] }, "expired": { "basic": [ { "reward": { "key": "basic-reward", "name": "Basic Reward", "description": "This is a basic reward", "metadata": {}, "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" }, "expired_at": "2021-01-01T00:00:00.000Z", "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" } ], "credit": [ { "reward": { "key": "credit-reward", "credits": 100, "name": "Credit Reward", "description": "This is a credit reward", "metadata": {}, "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" }, "expired_at": "2021-01-01T00:00:00.000Z", "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" } ], "offer_code": [ { "reward": { "key": "offer-code-reward", "offer_code_id": "123e4567-e89b-12d3-a456-426614174000", "name": "Offer Code Reward", "description": "This is an offer code reward", "metadata": {}, "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" }, "expired_at": "2021-01-01T00:00:00.000Z", "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" } ] } }, "referral_program": { "id": "123e4567-e89b-12d3-a456-426614174000", "name": "Referral Program #1", "description": "This is a referral program", "metadata": {}, "distribution_percentage": 100, "limit": 0, "rewards": { "sender": { "basic": [ { "reward": { "key": "basic-reward", "name": "Basic Reward", "description": "This is a basic reward", "metadata": {}, "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" }, "activation": { "variant": "claim", "amount": 1 }, "deactivation": { "variant": "never" } } ], "credit": [ { "reward": { "key": "credit-reward", "credits": 100, "name": "Credit Reward", "description": "This is a credit reward", "metadata": {}, "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" }, "activation": { "variant": "claim", "amount": 1, "limit": 1 }, "deactivation": { "variant": "never" } } ], "offer_code": [ { "reward": { "key": "offer-code-reward", "offer_code_id": "123e4567-e89b-12d3-a456-426614174000", "name": "Offer Code Reward", "description": "This is an offer code reward", "metadata": {}, "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" }, "activation": { "variant": "claim", "amount": 1, "limit": 1 }, "deactivation": { "variant": "never" } } ] }, "receiver": { "basic": [ { "reward": { "key": "basic-reward", "name": "Basic Reward", "description": "This is a basic reward", "metadata": {}, "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" }, "activation": { "variant": "claim" }, "deactivation": { "variant": "never" } } ], "credit": [ { "reward": { "key": "credit-reward", "credits": 100, "name": "Credit Reward", "description": "This is a credit reward", "metadata": {}, "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" }, "activation": { "variant": "claim" }, "deactivation": { "variant": "never" } } ], "offer_code": [ { "reward": { "key": "offer-code-reward", "offer_code_id": "123e4567-e89b-12d3-a456-426614174000", "name": "Offer Code Reward", "description": "This is an offer code reward", "metadata": {}, "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" }, "activation": { "variant": "claim" }, "deactivation": { "variant": "never" } } ] } }, "created_at": "2021-01-01T00:00:00.000Z", "updated_at": "2021-01-01T00:00:00.000Z" } } } } ``` --- # User Experience for Claiming Code Source: https://winwinkit.com/docs/guides/user-experience-for-claiming-code/ > Patterns for letting users claim referral, affiliate, and promo codes inside your app. Claiming a code is an essential action required for users to receive rewards and be attributed to the right affiliate campaign, referral program, or promo code. Learn more about [how WinWinKit solves mobile attribution](/blog/how-winwinkit-solves-mobile-attribution/) to understand why it is important and how it works. Creating a great user experience is important for the success of any app. Letting users claim a code should be seamlessly embedded into your existing user flow. In this guide, we will cover different options for crafting user experience for claiming codes. Which one to choose is up to you. > **Tip:** You do not need to create different user experience for claiming different types of codes. Implementing it once enables users to claim any code, be it an affiliate, referral, or promo code. ## Onboarding Step Onboarding is a common flow that users go through when they first use an app, and it's a natural place to let users claim a code. Claiming a code can be a separate step in the onboarding process. Take a look at how [Kiwi Money](https://kiwi-money.com/) and [Data Plan](https://dataplan.app) implement it: ![Screenshot of Kiwi Money and Data Plan onboarding step for claiming a referral code](@assets/guides/user-experience-for-claiming-code/onboarding.png) ## Purchase Screen Another common place to let users claim a code is on the purchase screen. A simple solution could be to add a "Claim Code" button under the normal purchase buttons, and present a screen for claiming a code, similar to the ones shown above. ## Deep-link Perhaps not so obvious, but deep-linking is a great way to let users claim a code. There are two options to consider when implementing deep-linking approach: ### Navigate to Code Claiming Screen If claiming a code should be a more exclusive feature and not available by default, you can navigate users to the code claiming screen via a deep-link. When deep-link is recognized, the app can present a screen similar to the ones shown in the [Onboarding Step](#onboarding-step). ### Claim Code Directly By using our [Code Link](/docs/pages/code-link/) feature, the app can receive and parse the incoming deep-link with a code, and then claim the code without users needing to input anything. In this scenario, it is a good idea to present users with steps reflecting code claiming and success/failure states. Take a look at how [Usage](https://usage.pro) implements it: ![Screenshot of Usage app onboarding step with claimed code rewards](@assets/guides/user-experience-for-claiming-code/deep-link-usage.png) ## Linking Platform It is not encouraged, but it is still possible to use a linking platform, such as [Branch](https://branch.io) or [AppsFlyer](https://www.appsflyer.com). While they are great for tracking attribution at scale, there are challenges when it comes to the fast and accurate attribution necessary for immediate code claiming. Again, learn more about [how WinWinKit solves mobile attribution](/blog/how-winwinkit-solves-mobile-attribution/) to understand the benefits of using short codes instead of links. If you decide to go with this approach, you would configure links via those platforms by embedding affiliate or promo codes, handle them via their SDKs, and then pass the code to WinWinKit's SDK for claiming it and granting rewards for the user. > **Note:** There is no direct integration between WinWinKit and linking platforms, and as such, it requires some manual work to configure campaigns that you need to work via them. While it can still be done for affiliate and promo codes, it becomes impractical for referral codes. --- Examples here are for your reference and inspiration. Ultimately, it is up to you to build an awesome experience for your users. If you come up with a different way to claim a code, please share it with us! --- # Creating a Referral Program #1 Source: https://winwinkit.com/docs/guides/creating-a-referral-program-1/ > Set up a dual-sided referral program that rewards existing users for inviting others while also giving a free month to invited users. Let's create a dual-sided referral program that rewards existing users for inviting others, while also giving a free month to the invited users. This creates a win-win situation where both parties benefit from the referral. As an example, we'll set up a program where: - Referring user gets a new app icon for each person they invite, with three icons to be rewarded in total. - Every invited user receives a free month. > **Note:** Following example assumes there are appropriate rewards configured. Learn more about [Rewards](/docs/rewards/introduction/). #### 1. Name and description Enter a name and optional description, both of which are only used internally. ![Create program](@assets/guides/creating-a-referral-program-1/create-program-1.png) #### 2. Rewards for the referring user Since we have three app icons to reward the referring user, we need to add three separate rewards. **2.1.** Click "+ Add Reward" in the "Referring user" section. The dropdown will show all available rewards. ![Create program](@assets/guides/creating-a-referral-program-1/create-program-2.png) **2.2** Select the first reward for the referring user. Let it be "App Icon Candy". ![Create program](@assets/guides/creating-a-referral-program-1/create-program-3.png) The reward is now selected and has the default configurations: Activation "Claim", the reward is activated when one invited user claims the referring user's referral code. Deactivation "Never", the referring user keeps the reward forever. **2.3** Select the second reward "App Icon Hologram". Since we want the second icon to be rewarded for the second invited user, we need to change Activation on Claim number to 2. ![Create program](@assets/guides/creating-a-referral-program-1/create-program-4.png) **2.4** Select the last reward "App Icon Neon". Similar to the previous step, we want the third icon to be rewarded for the third invited user, so we need to change Activation on Claim number to 3. ![Create program](@assets/guides/creating-a-referral-program-1/create-program-5.png) Now the rewards for the referring user are ready. #### 3. Rewards for the invited user **3.1.** Again, click "+ Add Reward", but now for the "Invited user" section. ![Create program](@assets/guides/creating-a-referral-program-1/create-program-6.png) **3.2.** Select the reward "Free Month". The reward is now selected and has the default configurations: ![Create program](@assets/guides/creating-a-referral-program-1/create-program-7.png) Now we should change the Deactivation to "Interval" with "1 Months" duration. This will ensure that the invited user won't keep the reward after 1 month from when the reward was activation. ![Create program](@assets/guides/creating-a-referral-program-1/create-program-8.png) Below is screenshot of how all rewards set up: ![Create program](@assets/guides/creating-a-referral-program-1/create-program-9.png) Press Save and the new referral program is now set up! #### 4. Next Steps Make sure to complete and verify integration via one of our SDKs, and remember to unlock the [active rewards](/docs/users/introduction/#rewards) availalbe on the user object. --- # Designing a Referral Program Source: https://winwinkit.com/docs/guides/designing-a-referral-program/ > What to think about when designing a referral program for an iOS or Android app, and tips on what rewards to offer. Creating a referral program for an iOS or Android app is not something that many have done or even thought about before. Knowing the product, understanding the users of the app, and having the right toolset is the key to designing a successful referral program. This guide outlines different aspects of what to think about when designing a referral program, and provides tips on what rewards to offer. ## Know Your Product & Users Creating a referral program starts with assessing the product's features and functionality. Identify the key benefits that users value and how they can be leveraged to incentivize referrals. Consider the user journey and how the referral program can enhance the user experience. ## Design Process A referral program is typically a mutually beneficial reward system that encourages users to invite their friends and family to join the app. It is designed to create a positive feedback loop where users are rewarded for referring others, and those who are referred are also rewarded for joining the app. It is important to carefully design the rewards and incentives to ensure that they are aligned with the product's goals and values. Designing a referral program requires looking at separate categories of users by their journey throughout their interaction with the app. We highlight four of them, starting from simpler to more complex based on the complexity of the rewards that they can receive. ### New Users Users that arrive at the app from a referral and are typically non-premium users at the start. They may be attracted to the rewards offered and want to learn more about the app and how it can benefit them. It is a good idea to include referral in their onboarding process, and provide a clear picture of their rewards for being invited via a referral. #### Rewards to Consider Coming up with rewards for this category of users is the easiest part of the referral program design process. Because they are new users, there are many options available. Below are some examples: - **Trial Period**: Offer a trial when otherwise there are none. Offer a longer trial period, such as 30 days instead of 7 days. - **Discount**: Offer a lower price for premium features for a period of time, or forever. - **Feature Access**: Access to a feature that otherwise is available only to premium users. - **Other Perks**: Additional benefits, such as app icons, customizations, etc. ### Referring, Non-Premium Users Users that are already using the app and are not premium users. They may be willing to first refer others to earn the rewards that give them a better premium plan or other benefits. #### Rewards to Consider Rewards for these users are similar to the rewards for new users, because they are still users without a premium plan. - **Trial Period**: Offer a trial when otherwise there are none. Offer a longer trial period, such as 30 days instead of 7 days. - **Discount**: Offer a lower price for premium features for a period of time, or forever. - **Feature Access**: Access to a feature that otherwise is available only to premium users. - **Other Perks**: Additional benefits, such as app icons, customizations, etc. Further customization can be applied to the rewards for these users, for example you can offer a reward after inviting 3 users, or after an invited user becomes a premium user. Additionally, a multi-step referral incentive can be offered, where users can earn a free month for each invited user. ### Referring, Premium Users with a Subscription Users that are already using the app and are premium users with a subscription. They may be willing to refer others to earn the rewards that give them a better premium plan or other benefits. #### Rewards to Consider Rewards for these users are becoming trickier, as the available options depend on the user's subscription plan. - **Free Period**: Offer a free month for users on a monthly subscription, or offer a free year for users who invite x or more users. - **Discount Period**: Offer a cheaper next period of their current subscription. - **Discount Plan**: Offer switch to a cheaper plan. - **Upgrade Plan**: Offer an upgrade to a higher plan for period of time or at the same price level. - **Other Perks**: Additional benefits, such as app icons, customizations, content, etc. Further customization can be applied to the rewards for these users too, for example you can offer a reward after inviting 3 users, or after an invited user becomes a premium user. ### Referring, Premium Users with a Lifetime Usually there are not many reward options for users who already have lifetime access to the app. But at the same time, they may be the best users to invite others, since they are the most attached to the app. Asking them to invite others without any obvious reward is still a good idea, at least to consider. - **Other Perks**: Additional benefits, such as app icons, customizations, content, etc. ## Bonus Point Users engaged in referrals love seeing their statistics and rewards. Displaying the number of referrals they made and rewards earned is a great way to involve them in the process. ## Conclusion Referral programs can be a powerful tool for increasing user acquisition and retention. Even though it might sound complicated, you don't have to design a complex system to begin with. Start with a simple referral program rewarding new users. Offer a longer free trial or a discount and iterate from there. All examples of rewards listed above are supported in WinWinKit. Read more about [referrals](/docs/referrals/introduction/) and [rewards](/docs/rewards/introduction/) in our documentation. There will be separate guides for setting up different rewards, and we will link it from here when ready. --- # Setting up Affiliates with RevenueCat Source: https://winwinkit.com/docs/guides/setting-up-affiliates-with-revenuecat/ > Walk through the process of setting up affiliate marketing for an app that uses RevenueCat. This guide will walk you through the process of setting up affiliates with RevenueCat. ## What is Affiliate Marketing? Affiliate marketing is a performance-based strategy where app owners reward affiliates, such as creators, influencers, bloggers, or even regular users, for inviting new users to the app. Affiliate marketing can be a significant driver of growth and is an efficient and scalable way to reach new audiences. Read more about affiliate marketing in our [blog post](/blog/what-is-affiliate-marketing-for-mobile-apps/) and about the affiliates feature in our [documentation](/docs/affiliates/introduction/). ![Affiliates table in WinWinKit dashboard](@assets/guides/setting-up-affiliates-with-revenuecat/affiliates-table.png) ## What is RevenueCat? [RevenueCat](https://www.revenuecat.com/) is a subscription management platform that simplifies the process of managing subscriptions and in-app purchases in mobile apps. It provides a unified API for handling subscriptions across multiple platforms, including iOS, Android, and web. Integration with RevenueCat is required to get started with affiliate marketing in WinWinKit. RevenueCat provides accurate and timely data about the revenue in your app that WinWinKit can use to track and reward affiliates. ## Prerequisites Before you start setting up affiliate campaigns in WinWinKit, you need to have the following: - An established integration with a RevenueCat account. This can be done in the WinWinKit dashboard by navigating to Settings -> Integrations -> RevenueCat -> Connect, then follow the instructions on the dashboard to set it up. - A valid payment method, as a guarantee to affiliates that you have a complete account setup. Note: you are not charged until there are amounts to pay out to the affiliates at the end of your billing cycle. ## Creating an Affiliate Campaign In the WinWinKit dashboard, navigate to Affiliates -> New Campaign to start creating a new affiliate campaign. ### Code Each affiliate campaign has a unique code by which users claim their discount or special offer and are linked to a specific affiliate campaign. To learn more about how WinWinKit solves attribution and tracking, check out our [blog post](/blog/how-winwinkit-solves-mobile-attribution/). #### Custom Code The codes can be personalized to reflect the brand or creator's identity, making them easy to remember and share. Think "NINJA2025" for a gaming influencer or "TECHGURU50" for a YouTube reviewer. #### Random Code Generating a random code is a quick way to obtain a unique code without attaching personalization. Generated codes are short, only 5 characters long, and can be easily distributed visually, verbally, and digitally. ![Create affiliate campaign with code](@assets/guides/setting-up-affiliates-with-revenuecat/affiliate-campaign-code.png) ### Affiliate Rewards By promoting your app, affiliates earn a commission. The revenue percentage, amount per user, amount per conversion, and duration of the campaign are defined by the app owner and are set per campaign. > **Tip:** Affiliate rewards can be used in combination or separately, giving you the flexibility to create a tailored campaign for your app and affiliates. #### Revenue Percentage Set the commission percentage earned from each purchase. Choosing the right percentage is crucial for both the affiliate and the app. A higher percentage may attract more affiliates, but it may also lead to higher costs for the app owner. A lower percentage may be less attractive to affiliates, but it may also lead to lower costs for the app owner. As a general rule, a percentage of 20-30% is a good starting point for new apps seeking first affiliates. #### Amount per User Set the fixed amount earned for each user who claims the code. #### Amount per Conversion Set the fixed amount earned for each user conversion. Learn more about user's [is premium](/docs/users/introduction/#is-premium) flag to understand how conversions are tracked. #### Duration Set the duration of the affiliate campaign in months. The duration is counted from the first time an affiliate code is claimed by a user. ![Create affiliate campaign with affiliate rewards](@assets/guides/setting-up-affiliates-with-revenuecat/affiliate-campaign-affiliate-rewards.png) ### User Rewards To attract more users and increase your app's visibility, you should offer rewards to new users. These rewards can be in the form of discounts, free trials, or exclusive content. ![Create affiliate campaign with user rewards](@assets/guides/setting-up-affiliates-with-revenuecat/affiliate-campaign-user-rewards.png) #### Example Reward - Discounted Annual Subscription There are multiple ways to set up a discounted annual subscription reward for users. For ease of implementation and consistency with this guide, we will use a [RevenueCat Offering](/docs/rewards/revenuecat-offering/) reward. To set it up, we need to have a separate subscription at a discounted price — in our example, about 40% off: 1. Create a new subscription in App Store Connect or Google Play Console first. You can, of course, use any other subscription that fits your needs. 2. Create a new offering in RevenueCat with the discounted subscription being part of it — in our example, we name it 'discounted'. 3. Create a new reward in WinWinKit that is linked to the offering we have just created in RevenueCat. 4. Select the reward in User Rewards for the Affiliate Campaign. Tip: Set the Deactivation interval for the reward to expire, and make users aware of the limited time offer, motivating them to use it. 5. When a user claims the code, the discounted offering is automatically applied to the user's account in RevenueCat and can be shown in the paywall. ![Create RevenueCat offering reward](@assets/guides/setting-up-affiliates-with-revenuecat/revenuecat-offering-reward.png) Learn more about RevenueCat Offering and other rewards in [our documentation](/docs/rewards/introduction/). ## Creating User Experience To make it work, you need to create a user experience for claiming the code. It can be either asking for the code with a text field or parsing an incoming deep link, depending on your choice of implementation. Read more about [user experience for claiming codes](/docs/guides/user-experience-for-claiming-code/) in another guide. ## FAQ ### I don't use RevenueCat, can I still use WinWinKit? Yes, you can still use WinWinKit without RevenueCat; however, using the Affiliates feature requires either [RevenueCat](https://revenuecat.com/) or [Stripe](https://stripe.com/) integration. ### Is Stripe supported? Yes, [Stripe](https://stripe.com/) is supported and this guide won't be different when using [Stripe](https://stripe.com/). ### Are SuperWall or Adapty supported? Not right now. We are adding support for these platforms if there is demand. Let us know about your preferred platform! ### I don't use any subscription management platform, what can I do? You should let us know about your preferences and interest in using WinWinKit so we can make informed decisions about what to build next! ### Why is a payment method required? A payment method is a validation and fraud prevention method required to ensure that affiliates are able to receive their commission. Note: you are not charged until there are amounts to pay out to the affiliates at the end of your billing cycle. --- # Configuring a Free Month reward Source: https://winwinkit.com/docs/guides/configuring-a-free-month-reward/ > Different methods to implement one of the most popular rewards — a free month. Creating the right incentive for users is an essential step in creating successful affiliate and referral campaigns. This guide outlines different methods to implement one of the most popular rewards - a free month. In case you are not familiar with the rewards concept, you can learn more about it [here](/docs/rewards/introduction/). ## 1. App Store Offer Codes ### What are Offer Codes? Offer codes are a type of subscription and in-app purchase offer on the App Store. You can use them to acquire, retain, and re-acquire paying users by providing a discount or free offer for a limited time. ### Prerequisites - Integration with App Store Connect is required and can be enabled by providing the Auth keys in the WinWinKit dashboard. - You must have an Offer Code configured in App Store Connect. Learn more about [configuring Offer Codes](/docs/rewards/appstore-offer-code/#configuring-in-the-app-store-connect). ### Creating and configuring the reward 1. In the [WinWinKit dashboard](https://app.winwinkit.com), navigate to Rewards -> New Reward -> Offer Code and select the loaded Offer Code from App Store Connect that you want to attach to the reward. ![Creating Offer Code reward in WinWinKit](@assets/guides/creating-free-month-reward/asc-offer-code-1.png) 2. When creating any campaign (e.g., an affiliate campaign as illustrated in the screenshot below), select the created reward. Optionally, configure the Deactivation for the reward if you want to limit the availability of the offer code. For example, set Deactivation to 7 days to make the reward available for a week. Note: a free month starts when the user redeems the Offer Code, which essentially starts a subscription with a configured trial period. ![Configuring Offer Code reward for an affiliate campaign in WinWinKit](@assets/guides/creating-free-month-reward/asc-offer-code-2.png) ### How it works under the hood When a user claims a code and should be rewarded with an Offer Code, WinWinKit pulls Offer Codes from App Store Connect and assigns a unique, one-time use Offer Code value to the user. Later, WinWinKit can reassign the Offer Code value if the previous one has not been used and has expired. #### Implementation details When a user has an active Offer Code reward, use its value to redeem the Offer Code via Apple UX. Read more about [supporting Offer Codes in the app](/docs/rewards/appstore-offer-code/#supporting-in-the-app). ### Key Takeaways Offer Codes provide a native, flexible way to configure offers for users. #### Pros - User starts a subscription with a free trial; - Can be configured for existing subscriptions; - Support rich configuration for various types of offers - free trials, discounted periods, etc. #### Cons - An Offer Code can be redeemed only via Apple UX, which is an extra step for users, making obtaining a free month trial a two-step process. Learn more about Offer Codes reward in [our documentation](/docs/rewards/appstore-offer-code/). ### Google Play Promo Codes Similar to App Store Offer Codes for iOS/macOS, Google Play Promo Codes allow for configuring a free month trial for Android users. Except for the integration part, support and behavior of Google Play Promo Codes in WinWinKit is similar to App Store Offer Codes. ## 2. RevenueCat Entitlement ### What is RevenueCat? [RevenueCat](https://www.revenuecat.com/) is a subscription management platform that simplifies the process of managing subscriptions and in-app purchases in mobile apps. It provides a unified API for handling subscriptions across multiple platforms, including iOS, Android, and web. ### What is RevenueCat Entitlement? [RevenueCat Entitlement](https://www.revenuecat.com/docs/getting-started/entitlements) represents a level of access, features, or content that a user is "entitled" to, and is typically unlocked after a user purchases a product. ### Prerequisites - Integration with RevenueCat is required and can be enabled by providing the API keys in the WinWinKit dashboard. - You must have an entitlement configured in RevenueCat. ### Creating and configuring the reward 1. In the [WinWinKit dashboard](https://app.winwinkit.com), navigate to Rewards -> New Reward -> Entitlement and select the loaded entitlement from RevenueCat that you want to attach to the reward. Note: the key field is less significant than in other reward types, as in most cases it won't be used. ![Creating RevenueCat Entitlement reward in WinWinKit](@assets/guides/creating-free-month-reward/rc-entitlement-1.png) 2. When creating any campaign (e.g., an affiliate campaign as illustrated in the screenshot below), select the created reward and ensure the Claim option is selected for the Activation field, meaning the user will be rewarded with the entitlement once they claim the code, and select Interval of 1 month for the Deactivation field, meaning the entitlement will be revoked after 1 month. ![Configuring RevenueCat Entitlement reward for an affiliate campaign in WinWinKit](@assets/guides/creating-free-month-reward/rc-entitlement-2.png) ### How it works under the hood When a user claims a code and should be rewarded with access to the entitlement for a month, WinWinKit grants an entitlement to that user in RevenueCat by calling their APIs and setting the expiration date to the current date plus one month. Note: the entitlement is revoked on the RevenueCat side after the expiration date, unless the user has purchased the product or the entitlement has been extended for any other reason. #### Implementation details After a user claims a code via WinWinKit, a force-reload of customer info via [RevenueCat's SDK](https://www.revenuecat.com/docs/customers/customer-info#cache) is needed to ensure the entitlement is updated. ### Key Takeaways If you already use RevenueCat, setting up a free month via their entitlement is the easiest way to achieve it. #### Pros - Easiest to configure and integrate. #### Cons - User is not starting a subscription with a free trial but is directly granted temporary access. Learn more about RevenueCat Entitlement reward in [our documentation](/docs/rewards/revenuecat-entitlement/). ## 3. RevenueCat Offering ### What is RevenueCat Offering? [RevenueCat Offering](https://www.revenuecat.com/docs/offerings/overview) is the selection of products that are "offered" to a user on your paywall. ### Prerequisites - Integration with RevenueCat is required and can be enabled by providing the API keys in the WinWinKit dashboard. - You must have an offering with a month-long trial subscription configured in RevenueCat. ### Creating and configuring the reward 1. In the [WinWinKit dashboard](https://app.winwinkit.com), navigate to Rewards -> New Reward -> Offering and select the loaded offering from RevenueCat that you want to attach to the reward. ![Creating RevenueCat Offering reward in WinWinKit](@assets/guides/creating-free-month-reward/rc-offering-1.png) 2. When creating any campaign (e.g., an affiliate campaign as illustrated in the screenshot below), select the created reward. Optionally, configure the Deactivation for the reward if you want to limit the availability of the offering. For example, set Deactivation to 7 days to make the reward available for a week. Note: a free month starts when the user starts a subscription with a trial. ![Configuring RevenueCat Offering reward for an affiliate campaign in WinWinKit](@assets/guides/creating-free-month-reward/rc-offering-2.png) ### How it works under the hood When a user claims a code and should be rewarded with access to the offering for a month, WinWinKit sets an offering override for that user in RevenueCat by calling their APIs. After one month, WinWinKit resets the offering override to the default offering. #### Implementation details After a user claims a code via WinWinKit, a force-reload of customer info via [RevenueCat's SDK](https://www.revenuecat.com/docs/customers/customer-info#cache) is needed to ensure the offering is updated. Alternatively, you can check for the presence of an active RevenueCat offering reward in the WinWinKit SDK, and instead of using the user's current offering to display in the paywall, query an offering by the available key. ### Key Takeaways If you already use RevenueCat, setting up a free month via their offering empowers you with extra flexibility and allows you to configure exclusive paywalls for your marketing campaigns. #### Pros - User starts a subscription with a free trial; - Can be combined with an alternative/exclusive RevenueCat paywall. #### Cons - An alternative subscription with a month-long trial is required. Learn more about RevenueCat Offering reward in [our documentation](/docs/rewards/revenuecat-offering/). ## 4. Basic Reward ### Creating and configuring the reward 1. In the [WinWinKit dashboard](https://app.winwinkit.com), navigate to Rewards -> New Reward -> Basic and create a new reward with the name and key by which you will be checking for the reward status. Note: the key is very important here. It might be better to give the key a more generic name, such as `premium_access`, and reuse it across campaigns beyond the free month reward. Learn more about creating a Basic reward in [our documentation](/docs/rewards/basic/#creating-a-reward). ![Creating Basic reward in WinWinKit](@assets/guides/creating-free-month-reward/basic-1.png) 2. When creating any campaign, select the created reward and ensure the Claim option is selected for the Activation field, meaning the user will be rewarded once they claim the code, and select Interval of 1 month for the Deactivation field, meaning the reward will be revoked after 1 month. ![Configuring Basic reward for an affiliate campaign in WinWinKit](@assets/guides/creating-free-month-reward/basic-2.png) ### How it works under the hood When a user claims a code and should be rewarded with access for a month, WinWinKit activates the Basic reward and it becomes available under the user's object provided via our SDKs. After one month, WinWinKit resets the access to the reward. #### Implementation details You must check for active basic rewards and grant user access to the features in the code. ### Key Takeaways #### Pros - No external dependency is required; - Flexible and configurable reward that can fit different use cases. #### Cons - Requires slightly more integration effort due to the need to check for active rewards and grant access to features; - User is not starting a subscription with a free trial but is directly granted temporary access. Learn more about Basic reward in [our documentation](/docs/rewards/basic/). ## 5. Credit Reward An alternative to the above methods is the Credit reward, which can also be set up for a free month. It offers higher flexibility but also higher complexity. ### How it works under the hood When a user claims a code and should be rewarded with access for a month, WinWinKit grants the set amount of credits attached to the reward, and it becomes available under the user's object provided via our SDKs. Credits can be withdrawn as they are used or can be set to expire after a certain period of time. #### Implementation details You must check for active credit rewards and grant user access to the features in the code. You must also withdraw credits from the user's account when they are used. ### Key Takeaways #### Pros - No external dependency is required; - Fits dynamic use cases, such as trial uses, instead of a fixed period; - Supports stacking/accumulating credits; - Flexible and configurable reward that can fit different use cases. #### Cons - Requires significantly higher integration effort due to the need to check for active rewards and withdraw credits; - User is not starting a subscription with a free trial but is directly granted temporary access. Learn more about Credit reward in [our documentation](/docs/rewards/credit/). ## Conclusion WinWinKit offers a variety of reward types to fit different use cases. Each reward type has its own advantages and disadvantages, and it's important to choose the right one for your specific needs. By understanding the pros and cons of each reward type, you can make an informed decision and implement the best solution for your business. If you have any questions or need further assistance, please reach out to us. --- # API Keys Source: https://winwinkit.com/developers/get-started/api-keys/ > Learn what API keys are and how to use them. Every request to the WinWinKit API requires an API key. Use it with any of the SDKs, or to call the REST API directly. Keys are scoped to a single project — switching projects in the dashboard switches which keys you see. ## Key Types - **Client API Keys** — for use inside client-facing apps (iOS, Android, web). Scoped to the endpoints a client legitimately needs — registering users, claiming codes, reading reward state — can't be used for privileged actions. - **Secret API Keys** — grant access to every API endpoint. ## Generate an API key 1. [Sign in](https://app.winwinkit.com/) and select your project. 2. Open **Settings** → **Integrations** → **API Keys**. 3. Click **+ New API Key**. 4. Give the key a descriptive name (e.g. `iOS app`, `Android app`, `Backend`). 5. Copy the generated key — you'll pass it to the SDK or include it in REST API requests. > **Tip:** Create a separate key per client (iOS, Android, web, backend). Naming keys by client makes it easy to rotate one without affecting the others. ## Security - **Keep Secret keys out of source control.** Server-side keys belong in environment variables or secret managers. Client API Keys can sit in client source code — they ship in the binary regardless. - **One key per environment.** Keep production and staging keys separate so you can rotate one without disrupting the other. - **Rotate when compromised.** If a key leaks, create a new one, roll it out to your clients, then delete the old one from the dashboard. - **Revoke unused keys.** Deleting a key in the dashboard invalidates it immediately. --- # Swift Source: https://winwinkit.com/developers/sdks/swift/ > Learn how to install, configure, and use our Swift SDK. The WinWinKit Swift SDK is a native Swift library for iOS, iPadOS and macOS. It wraps the REST API calls, exposes typed models, and ships first-class SwiftUI integration via an `Observable` object. ## Installation ### Requirements - iOS 16.0+ / macOS 13.0+ - Swift 5.0+ - Xcode 15.0+ ### Swift Package Manager Add the package via Swift Package Manager: 1. In Xcode, choose **File** → **Add Package Dependencies**. 2. Paste the repository URL: ``` https://github.com/winwinkit/winwinkit-swift.git ``` 3. Press **Add Package**. You can now `import WinWinKit` from any source file. ## Configuration Configure the SDK once at app startup. Use an [API Key](/developers/get-started/api-keys/) from the WinWinKit dashboard (**Settings** → **Integrations** → **API Keys**). ```swift import WinWinKit Referrals.configure(apiKey: "your-api-key") ``` After `configure(apiKey:)` runs, `Referrals.shared` is the singleton you call from anywhere. ### Identify the user Set the app user id so WinWinKit knows whose claims, rewards, and stats to track. ```swift Referrals.shared.set(appUserId: "your-app-user-id") ``` > **Warning:** Use a UUID-like value for the app user id — never an email, phone number, username, or any other personally identifying information. The id ends up in URLs, logs, and analytics, so treat it as a public identifier. > **Tip:** If your app has no sign-in flow, generate a random UUID on first launch and persist it yourself — Keychain is preferred since it survives app reinstalls; UserDefaults works as a simpler fallback. When the user logs out, reset the SDK so any subsequent activity isn't attributed to the previous user: ```swift Referrals.shared.reset() ``` ## Claim a code Call `claimCode(code:)` when a user enters a code in your app — typically from a "Got a referral code?" screen, a referral link landing flow, or a deep link handler. Pass the code exactly as the user entered it — WinWinKit validates it server-side and throws an error if it's unknown, expired, ineligible, or already claimed. It returns the updated `User` and any rewards granted at claim time. ```swift do { let (user, rewardsGranted) = try await Referrals.shared.claimCode(code: "XYZ123") // Apply granted rewards in your app. } catch { // Handle ReferralsError — see Error handling below. } ``` ## Grant user rewards The `User` object is the source of truth for what the user is entitled to in WinWinKit — claimed codes, active rewards, and stats. Read it after configuring the SDK (and whenever it updates) to unlock the matching perks in your app. ```swift let user = Referrals.shared.user // Inspect user.rewards.active and grant features accordingly. ``` What you do with each reward depends on its type: - **Basic** — flip a feature flag or unlock content in your app. - **Credit** — apply the balance; call `withdrawCredits` when the user spends it. - **App Store Offer Code / Google Play Promo Code** — present the code to the user or trigger the platform redemption flow. - **RevenueCat Entitlement** — read the entitlement state from RevenueCat and unlock the corresponding feature. - **RevenueCat Offering** — display the matching paywall offering. The SDK caches the user and refreshes it in the background. In SwiftUI, prefer the observable object below — your UI updates automatically when the user state changes. ## User object The `User` object exposes properties you can update from the SDK and properties WinWinKit manages for you. ### Updatable #### Is Premium Marks the user as a paying customer. Drives conversion tracking, affiliate commissions, and reward activation. ```swift Referrals.shared.set(isPremium: true) ``` > **Tip:** Is updated automatically when revenue tracking is configured — directly from App Store, or Google Play, and from RevenueCat, Stripe. Configure them in **Settings** → **Integrations**. #### Is Trial Marks the user as currently on a free trial. Conversions are not counted while a user is in trial. ```swift Referrals.shared.set(isTrial: true) ``` > **Tip:** Is updated automatically when revenue tracking is configured — directly from App Store, or Google Play, and from RevenueCat, Stripe. Configure them in **Settings** → **Integrations**. #### First Seen At The "first seen at" date controls [claim code eligibility](/docs/users/introduction/#claim-code-eligibility) (default window: 7 days). If you don't set it, WinWinKit uses the user's creation date. ```swift Referrals.shared.set(firstSeenAt: Date()) ``` #### Metadata Attach arbitrary key-value pairs to a user. ```swift Referrals.shared.set(metadata: ["plan": "annual", "platform": "ios"]) ``` ### Provided by WinWinKit These properties are managed by WinWinKit. Read them from `Referrals.shared.user`. #### Referral Code The user's own referral code, generated when they are created in WinWinKit. ```json "referral_code": "ABC123" ``` #### Referral Code Link A hosted [Code Link](/docs/pages/code-link/) URL to user's referral code. ```json "referral_code_link": "https://example.wwk.link/ABC123" ``` #### Claim Code Eligibility Whether the user can claim a code right now, and until when. ```json { "eligible": true, "eligible_until": "2026-05-05T12:00:00Z" } ``` See [Claim Code Eligibility](/docs/users/introduction/#claim-code-eligibility) for the rules. #### Referred By The code that referred this user, if any. `type` is one of `affiliate`, `promo`, or `referral`. ```json { "code": "XYZ123", "type": "referral" } ``` #### Stats Counters for users who claimed this user's referral code: total claims, conversions to premium, and subsequent churns. ```json { "claims": 12, "conversions": 5, "churns": 1 } ``` #### Rewards The user's active and expired rewards, grouped by reward type. ```json { "active": { "basic": [...], "credit": [...], "offer_code": [...], "googleplay_promo_code": [...], "revenuecat_entitlement": [...], "revenuecat_offering": [...] }, "expired": { "basic": [...], "credit": [...], "offer_code": [...], "googleplay_promo_code": [...], "revenuecat_entitlement": [...], "revenuecat_offering": [...] } } ``` #### Referral Program The referral program the user is part of, if any. ## Methods ### Withdraw credits Spend down a credit reward balance. The amount is debited from the user's available credit for the given key. ```swift let (user, withdrawResult) = try await Referrals.shared.withdrawCredits( key: "extra-levels", amount: 5 ) ``` ### Sync transactions Sync App Store transactions with WinWinKit. Only needed when using direct App Store revenue tracking (without RevenueCat integration) — call this after a purchase completes so WinWinKit can attribute the conversion without delays. ```swift Referrals.shared.syncTransactions() ``` ### Refresh Manually refresh the user from the backend. Useful after an out-of-band change you want reflected in the SDK immediately — for example, a server-side reward grant or a webhook-driven update. ```swift Referrals.shared.refresh() ``` ### Reset Reset the SDK's internal state for the previously set `appUserId`. Call this when the user logs out so subsequent activity isn't attributed to them. ```swift Referrals.shared.reset() ``` ## SwiftUI integration The SDK provides convenient Observable object to interact and observe changes in SwiftUI views. ### ReferralsObservableObject Provides an observable `User` object, methods and states for interacting with WinWinKit. ```swift import SwiftUI import WinWinKit struct ReferralView: View { @State private var referrals = Referrals.shared.observableObject var body: some View { VStack { Text("Your referral code") Text(referrals.user?.referralCode ?? "—") } } } struct ReferralClaimCodeView: View { @State private var referrals = Referrals.shared.observableObject @State private var code = "" var body: some View { VStack { Text("Got a referral code?") TextField("Enter a code", text: $code) Button("Claim code") { referrals.claimCode(code: code) } .disabled(referrals.claimCodeState.isLoading) } } } ``` ## Delegate Optionally set a delegate to receive events from the SDK. ```swift final class ReferralsHandler: ReferralsDelegate { func referrals(_ referrals: Referrals, receivedUpdated user: User?) { // The user changed — refresh your UI. } func referrals(_ referrals: Referrals, receivedError error: any Error) { // The SDK failed to fetch, create, or update the user. } } let handler = ReferralsHandler() Referrals.shared.delegate = handler ``` ## Error handling Errors thrown or returned by the SDK conform to `Error` and can be cast to `ReferralsError`. See [Errors](/developers/api/errors/) for the full list of error codes the API can return. --- # Kotlin Source: https://winwinkit.com/developers/sdks/kotlin/ > Learn how to install, configure, and use our Kotlin SDK. The WinWinKit Kotlin SDK is a thin, suspend-based wrapper around the REST API for Android apps. Every call returns an [`ApiResult`](#error-handling) so successes, errors, and unexpected exceptions are explicit at every call site. ## Installation ### Requirements - JDK 21+ - Kotlin 1.9.23+ - Gradle 8.7+ ### Gradle (JitPack) The SDK is distributed via [JitPack](https://jitpack.io/). Add the JitPack repository to your root `build.gradle.kts`: ```kotlin repositories { maven("https://jitpack.io") } ``` Add the dependency to your module's `build.gradle.kts` (replace `` with the desired [release tag](https://github.com/winwinkit/winwinkit-kotlin/releases)): ```kotlin dependencies { implementation("com.github.winwinkit:winwinkit-kotlin:") } ``` You can now `import com.winwinkit.WinWinKit` from any source file. ## Configuration Instantiate `WinWinKit` once with your API key. Use an [API Key](/developers/get-started/api-keys/) from the WinWinKit dashboard (**Settings** → **Integrations** → **API Keys**). ```kotlin import com.winwinkit.WinWinKit val winwinkit = WinWinKit(apiKey = "your-api-key") ``` Hold on to this instance — typically as an injected singleton or a top-level property — and reuse it across the app. ### Identify the user Set the app user id before calling any method. ```kotlin winwinkit.appUserId = "your-app-user-id" ``` > **Warning:** Use a UUID-like value for the app user id — never an email, phone number, username, or any other personally identifying information. The id ends up in URLs, logs, and analytics, so treat it as a public identifier. > **Warning:** Calling any method while `appUserId` is `null` throws `IllegalStateException`. > **Tip:** If your app has no sign-in flow, generate a random UUID on first launch and persist it in `EncryptedSharedPreferences` (preferred) or `SharedPreferences` as a simpler fallback. When the user logs out, clear the app user id so any subsequent call doesn't get attributed to the previous user: ```kotlin winwinkit.appUserId = null ``` ## Create a user Register the user in WinWinKit with `createOrUpdateUser(...)` before calling `claimCode` or any other user related action. ```kotlin val result = winwinkit.createOrUpdateUser() ``` All arguments are optional. To set writable fields at creation time, see [User properties](#updatable). ## Claim a code Call `claimCode(code)` when a user enters a code in your app — typically from a "Got a referral code?" screen, a referral link landing flow, or a deep link handler. Pass the code exactly as the user entered it — WinWinKit validates it and returns a `Failure` if it's unknown, expired, ineligible, or already claimed. On success the response includes the updated `User` and any rewards granted at claim time. ```kotlin when (val result = winwinkit.claimCode("XYZ123")) { is ApiResult.Success -> { val user = result.data.user val rewardsGranted = result.data.rewardsGranted // Apply granted rewards in your app. } is ApiResult.Failure -> { // Show errors from result.errors — see Error handling below. } is ApiResult.Exception -> { // Network I/O or parse failure — result.cause has details. } } ``` ## Grant user rewards The `User` object is the source of truth for what the user is entitled to in WinWinKit — claimed codes, active rewards, and stats. Fetch it after the user is identified (and whenever you want a fresh snapshot) to unlock the matching perks in your app. ```kotlin val user = (winwinkit.fetchUser() as? ApiResult.Success)?.data // Inspect user?.rewards?.active and grant features accordingly. ``` What you do with each reward depends on its type: - **Basic** — flip a feature flag or unlock content in your app. - **Credit** — apply the balance; call `withdrawCredits` when the user spends it. - **App Store Offer Code / Google Play Promo Code** — present the code to the user or trigger the platform redemption flow. - **RevenueCat Entitlement** — read the entitlement state from RevenueCat and unlock the corresponding feature. - **RevenueCat Offering** — display the matching paywall offering. The SDK is stateless — it doesn't cache the user. Store the result yourself (e.g. in a `StateFlow`) so your UI can react when it changes. ## User object The `User` object exposes properties you can update from the SDK and properties WinWinKit manages for you. ### Updatable Update writable fields with `createOrUpdateUser(...)`. All arguments are optional — pass only what you want to change. ```kotlin winwinkit.createOrUpdateUser( isPremium = true, isTrial = false, firstSeenAt = OffsetDateTime.now(), metadata = mapOf("plan" to "annual", "platform" to "android"), ) ``` #### Is Premium Marks the user as a paying customer. Drives conversion tracking, affiliate commissions, and reward activation. > **Tip:** Is updated automatically when revenue tracking is configured — directly from App Store, or Google Play, and from RevenueCat, Stripe. Configure them in **Settings** → **Integrations**. #### Is Trial Marks the user as currently on a free trial. Conversions are not counted while a user is in trial. > **Tip:** Is updated automatically when revenue tracking is configured — directly from App Store, or Google Play, and from RevenueCat, Stripe. Configure them in **Settings** → **Integrations**. #### First Seen At The "first seen at" date controls [claim code eligibility](/docs/users/introduction/#claim-code-eligibility) (default window: 7 days). If you don't set it, WinWinKit uses the user's creation date. #### Metadata Attach arbitrary key-value pairs to a user. ### Provided by WinWinKit These properties are managed by WinWinKit. Read them from the `User` returned by `fetchUser()` or `createOrUpdateUser(...)`. #### Referral Code The user's own referral code, generated when they are created in WinWinKit. ```json "referral_code": "ABC123" ``` #### Referral Code Link A hosted [Code Link](/docs/pages/code-link/) URL to the user's referral code. ```json "referral_code_link": "https://example.wwk.link/ABC123" ``` #### Claim Code Eligibility Whether the user can claim a code right now, and until when. ```json { "eligible": true, "eligible_until": "2026-05-05T12:00:00Z" } ``` See [Claim Code Eligibility](/docs/users/introduction/#claim-code-eligibility) for the rules. #### Referred By The code that referred this user, if any. `type` is one of `affiliate`, `promo`, or `referral`. ```json { "code": "XYZ123", "type": "referral" } ``` #### Stats Counters for users who claimed this user's referral code: total claims, conversions to premium, and subsequent churns. ```json { "claims": 12, "conversions": 5, "churns": 1 } ``` #### Rewards The user's active and expired rewards, grouped by reward type. ```json { "active": { "basic": [...], "credit": [...], "offer_code": [...], "googleplay_promo_code": [...], "revenuecat_entitlement": [...], "revenuecat_offering": [...] }, "expired": { "basic": [...], "credit": [...], "offer_code": [...], "googleplay_promo_code": [...], "revenuecat_entitlement": [...], "revenuecat_offering": [...] } } ``` #### Referral Program The referral program the user is part of, if any. ## Methods ### Withdraw credits Spend down a credit reward balance. The amount is debited from the user's available credit for the given key. `operationId` is optional and lets you make the call idempotent — passing the same id twice debits only once. ```kotlin val result = winwinkit.withdrawCredits( key = "extra-levels", amount = 5, operationId = "checkout-7d3a", ) ``` ### Register App Store transaction Register an App Store transaction with WinWinKit. Only needed when using direct App Store revenue tracking (without RevenueCat integration) — call this after a purchase completes so WinWinKit can attribute the conversion without delays. ```kotlin val result = winwinkit.registerAppStoreTransaction( originalTransactionId = "1000000123456789", appAccountToken = null, ) ``` ### Register Google Play transaction Register a Google Play purchase with WinWinKit. Only needed when using direct Google Play revenue tracking (without RevenueCat integration) — call this after a purchase completes so WinWinKit can attribute the conversion without delays. ```kotlin val result = winwinkit.registerGooglePlayTransaction( purchaseToken = "abc...token", obfuscatedExternalAccountId = null, ) ``` ### Refresh To refresh the user's state, call `fetchUser()` again. ```kotlin val result = winwinkit.fetchUser() ``` ## Error handling Every method returns a sealed `ApiResult` with three cases: - `ApiResult.Success(data)` — 2xx response with the parsed body. - `ApiResult.Failure(errors)` — 4xx or 5xx response. `errors` is a list of `ErrorObject` parsed from the response body (empty if the body could not be parsed). - `ApiResult.Exception(cause)` — network I/O failure, JSON parse error on a 2xx body, or any other unexpected throwable. `cause` preserves the original exception. Handle all three cases with an exhaustive `when`: ```kotlin when (val result = winwinkit.claimCode("XYZ123")) { is ApiResult.Success -> println(result.data.user.referralCode) is ApiResult.Failure -> println(result.errors) is ApiResult.Exception -> println("unexpected: ${result.cause}") } ``` `fetchUser()` returns `Success(null)` when the user does not exist (HTTP 404); all other non-2xx responses return `Failure`. `CancellationException` is not caught — it propagates per coroutine conventions. `IllegalStateException` (raised when `appUserId` is `null`) is also not wrapped — it surfaces directly. See [Errors](/developers/api/errors/) for the full list of error codes the API can return. --- # Dart Source: https://winwinkit.com/developers/sdks/dart/ > Learn how to install, configure, and use our Dart SDK. The WinWinKit Dart SDK is a Dio-based wrapper around the REST API for Flutter and Dart apps. It exposes a single `WinWinKit` entry point and a per-user scoped `UserClient` so calls automatically carry the correct `appUserId`. ## Installation ### Requirements - Dart 2.15+ / Flutter 2.8+ - Dio 5.0.0+ ([pub.dev](https://pub.dev/packages/dio)) ### Package The SDK is published to [pub.dev](https://pub.dev/packages/winwinkit) as `winwinkit`. Add it to your project: **Flutter** ```bash flutter pub add winwinkit ``` **Dart** ```bash dart pub add winwinkit ``` You can now `import 'package:winwinkit/api.dart'` (or `package:winwinkit/winwinkit.dart` for the umbrella export) from any source file. ## Configuration Instantiate `WinWinKit` once with your API key. Use an [API Key](/developers/get-started/api-keys/) from the WinWinKit dashboard (**Settings** → **Integrations** → **API Keys**). ```dart import 'package:winwinkit/api.dart'; final sdk = WinWinKit(apiKey: 'your-api-key'); ``` Hold on to this instance — typically as an injected singleton or a top-level final — and reuse it across the app. > **Tip:** Pass your own `Dio` to share an HTTP client (interceptors, logging, retry, test adapters) across SDKs: ### Identify the user The SDK exposes a per-user scoped client. Get one with `sdk.user(appUserId)` and call methods on it. ```dart final userClient = sdk.user('your-app-user-id'); ``` > **Warning:** Use a UUID-like value for the app user id — never an email, phone number, username, or any other personally identifying information. The id ends up in URLs, logs, and analytics, so treat it as a public identifier. > **Tip:** If your app has no sign-in flow, generate a random UUID on first launch and persist it with `flutter_secure_storage` (preferred) or `shared_preferences` as a simpler fallback. When the user logs out, drop the `UserClient` reference and obtain a new one for the next user. ## Create a user Register the user in WinWinKit with `createOrUpdate(...)` before calling `claimCode` or any other user-related action. ```dart final user = await userClient.createOrUpdate(); ``` All arguments are optional. To set writable fields at creation time, see [User properties](#updatable). ## Claim a code Call `claimCode(code)` when a user enters a code in your app — typically from a "Got a referral code?" screen, a referral link landing flow, or a deep link handler. Pass the code exactly as the user entered it — WinWinKit validates it and throws if it's unknown, expired, ineligible, or already claimed. On success the response includes the updated `User` and any rewards granted at claim time. ```dart try { final result = await userClient.claimCode('XYZ123'); final user = result.user; final rewardsGranted = result.rewardsGranted; // Apply granted rewards in your app. } on DioException catch (e) { // Handle DioException — see Error handling below. } ``` ## Grant user rewards The `User` object is the source of truth for what the user is entitled to in WinWinKit — claimed codes, active rewards, and stats. Fetch it whenever you want a fresh snapshot to unlock the matching perks in your app. ```dart final user = await userClient.get(); // Inspect user.rewards.active and grant features accordingly. ``` What you do with each reward depends on its type: - **Basic** — flip a feature flag or unlock content in your app. - **Credit** — apply the balance; call `withdrawCredits` when the user spends it. - **App Store Offer Code / Google Play Promo Code** — present the code to the user or trigger the platform redemption flow. - **RevenueCat Entitlement** — read the entitlement state from RevenueCat and unlock the corresponding feature. - **RevenueCat Offering** — display the matching paywall offering. The SDK is stateless — it doesn't cache the user. Store the result yourself (e.g. in a `ValueNotifier`, `Riverpod` provider, or any store) so your UI can react when it changes. ## User object The `User` object exposes properties you can update from the SDK and properties WinWinKit manages for you. ### Updatable Update writable fields with `createOrUpdate(...)`. All arguments are optional — pass only what you want to change. ```dart final user = await userClient.createOrUpdate( isPremium: true, isTrial: false, firstSeenAt: DateTime.now(), metadata: {'plan': 'annual', 'platform': 'flutter'}, ); ``` #### Is Premium Marks the user as a paying customer. Drives conversion tracking, affiliate commissions, and reward activation. > **Tip:** Is updated automatically when revenue tracking is configured — directly from App Store, or Google Play, and from RevenueCat, Stripe. Configure them in **Settings** → **Integrations**. #### Is Trial Marks the user as currently on a free trial. Conversions are not counted while a user is in trial. > **Tip:** Is updated automatically when revenue tracking is configured — directly from App Store, or Google Play, and from RevenueCat, Stripe. Configure them in **Settings** → **Integrations**. #### First Seen At The "first seen at" date controls [claim code eligibility](/docs/users/introduction/#claim-code-eligibility) (default window: 7 days). If you don't set it, WinWinKit uses the user's creation date. #### Metadata Attach arbitrary key-value pairs to a user. ### Provided by WinWinKit These properties are managed by WinWinKit. Read them from the `User` returned by `userClient.get()` or `userClient.createOrUpdate(...)`. #### Referral Code The user's own referral code, generated when they are created in WinWinKit. ```json "referral_code": "ABC123" ``` #### Referral Code Link A hosted [Code Link](/docs/pages/code-link/) URL to the user's referral code. ```json "referral_code_link": "https://example.wwk.link/ABC123" ``` #### Claim Code Eligibility Whether the user can claim a code right now, and until when. ```json { "eligible": true, "eligible_until": "2026-05-05T12:00:00Z" } ``` See [Claim Code Eligibility](/docs/users/introduction/#claim-code-eligibility) for the rules. #### Referred By The code that referred this user, if any. `type` is one of `affiliate`, `promo`, or `referral`. ```json { "code": "XYZ123", "type": "referral" } ``` #### Stats Counters for users who claimed this user's referral code: total claims, conversions to premium, and subsequent churns. ```json { "claims": 12, "conversions": 5, "churns": 1 } ``` #### Rewards The user's active and expired rewards, grouped by reward type. ```json { "active": { "basic": [...], "credit": [...], "offer_code": [...], "googleplay_promo_code": [...], "revenuecat_entitlement": [...], "revenuecat_offering": [...] }, "expired": { "basic": [...], "credit": [...], "offer_code": [...], "googleplay_promo_code": [...], "revenuecat_entitlement": [...], "revenuecat_offering": [...] } } ``` #### Referral Program The referral program the user is part of, if any. ## Methods ### Withdraw credits Spend down a credit reward balance. The amount is debited from the user's available credit for the given key. `operationId` is optional and lets you make the call idempotent — passing the same id twice debits only once. ```dart final result = await userClient.withdrawCredits( key: 'extra-levels', amount: 5, operationId: 'checkout-7d3a', ); ``` ### Register App Store transaction Register an App Store transaction with WinWinKit. Only needed when using direct App Store revenue tracking (without RevenueCat integration) — call this after a purchase completes so WinWinKit can attribute the conversion without delays. ```dart await userClient.registerAppStoreTransaction( originalTransactionId: '1000000123456789', ); ``` ### Register Google Play transaction Register a Google Play purchase with WinWinKit. Only needed when using direct Google Play revenue tracking (without RevenueCat integration) — call this after a purchase completes so WinWinKit can attribute the conversion without delays. ```dart await userClient.registerGooglePlayTransaction( purchaseToken: 'abc...token', ); ``` ### Refresh To refresh the user's state, call `get()` again. ```dart final user = await userClient.get(); ``` ## Error handling The SDK delegates to Dio for transport, so HTTP errors and network failures throw `DioException`. Catch it and inspect `response.statusCode` and `response.data` to branch on API errors versus connectivity problems. ```dart try { final result = await userClient.claimCode('XYZ123'); // Handle success. } on DioException catch (e) { if (e.response != null) { // Server responded with a non-2xx — e.response.statusCode and // e.response.data hold the parsed ErrorsResponse body. } else { // Network I/O, timeout, cancellation, or other transport failure. } } ``` The parsed body for non-2xx responses follows the standard `ErrorsResponse` shape — a list of `ErrorObject` entries. See [Errors](/developers/api/errors/) for the full list of error codes the API can return. --- # TypeScript Source: https://winwinkit.com/developers/sdks/typescript/ > Learn how to install, configure, and use our TypeScript SDK. The WinWinKit TypeScript SDK is a thin, promise-based wrapper around the REST API. It works in any modern JavaScript runtime — React, React Native, Expo, Node.js, and others. Every call resolves to a discriminated union: either the data you asked for, or an `errors` array. ## Installation ### Requirements - A modern JavaScript runtime (Node.js 18+ or an evergreen browser). - TypeScript types are bundled — no `@types/*` package needed. ### Package The SDK is published to [npm](https://www.npmjs.com/package/@winwinkit/sdk) as `@winwinkit/sdk`. Install it with the package manager of your choice. **pnpm** ```bash pnpm add @winwinkit/sdk ``` **npm** ```bash npm install @winwinkit/sdk ``` **yarn** ```bash yarn add @winwinkit/sdk ``` **bun** ```bash bun add @winwinkit/sdk ``` You can now `import { WinWinKit } from "@winwinkit/sdk"` from any source file. ## Configuration Instantiate `WinWinKit` once with your API key. Use an [API Key](/developers/get-started/api-keys/) from the WinWinKit dashboard (**Settings** → **Integrations** → **API Keys**). ```ts import { WinWinKit } from "@winwinkit/sdk"; const wwk = new WinWinKit({ apiKey: process.env.WINWINKIT_API_KEY!, }); ``` Hold on to this instance — typically as a module singleton or a DI-provided value — and reuse it across the app. > **Warning:** The SDK is stateless: every method takes the `appUserId` of the user the call applies to. Make sure you pass the correct id at each call site so activity isn't attributed to the wrong user. > **Warning:** Use a UUID-like value for the app user id — never an email, phone number, username, or any other personally identifying information. The id ends up in URLs, logs, and analytics, so treat it as a public identifier. > **Tip:** If your app has no sign-in flow, generate a random UUID on first launch and persist it in `localStorage` (web), secure storage (React Native, Expo), or similar. ## Create a user Register the user in WinWinKit with `createOrUpdateUser(...)` before calling `claimCode` or any other user-related action. ```ts const { user, errors } = await wwk.createOrUpdateUser({ appUserId: "your-app-user-id", }); ``` All arguments other than `appUserId` are optional. To set writable fields at creation time, see [User properties](#updatable). ## Claim a code Call `claimCode(...)` when a user enters a code in your app — typically from a "Got a referral code?" screen, a referral link landing flow, or a deep link handler. Pass the code exactly as the user entered it — WinWinKit validates it and returns errors if it's unknown, expired, ineligible, or already claimed. On success the response includes the updated `User` and any rewards granted at claim time. ```ts const { user, rewardsGranted, errors } = await wwk.claimCode({ appUserId: "your-app-user-id", code: "XYZ123", }); if (errors) { // Show errors — see Error handling below. } else { // Apply granted rewards in your app. } ``` ## Grant user rewards The `User` object is the source of truth for what the user is entitled to in WinWinKit — claimed codes, active rewards, and stats. Fetch it whenever you want a fresh snapshot to unlock the matching perks in your app. ```ts const { user } = await wwk.fetchUser({ appUserId: "your-app-user-id" }); // Inspect user?.rewards.active and grant features accordingly. ``` What you do with each reward depends on its type: - **Basic** — flip a feature flag or unlock content in your app. - **Credit** — apply the balance; call `withdrawCredits` when the user spends it. - **App Store Offer Code / Google Play Promo Code** — present the code to the user or trigger the platform redemption flow. - **RevenueCat Entitlement** — read the entitlement state from RevenueCat and unlock the corresponding feature. - **RevenueCat Offering** — display the matching paywall offering. The SDK is stateless — it doesn't cache the user. Store the result yourself (e.g. in React state or a store) so your UI can react when it changes. ## User object The `User` object exposes properties you can update from the SDK and properties WinWinKit manages for you. ### Updatable Update writable fields with `createOrUpdateUser(...)`. All arguments other than `appUserId` are optional — pass only what you want to change. ```ts const { user, errors } = await wwk.createOrUpdateUser({ appUserId: "your-app-user-id", isPremium: true, isTrial: false, firstSeenAt: new Date(), metadata: { plan: "annual", platform: "web" }, }); ``` #### Is Premium Marks the user as a paying customer. Drives conversion tracking, affiliate commissions, and reward activation. > **Tip:** Is updated automatically when revenue tracking is configured — directly from App Store, or Google Play, and from RevenueCat, Stripe. Configure them in **Settings** → **Integrations**. #### Is Trial Marks the user as currently on a free trial. Conversions are not counted while a user is in trial. > **Tip:** Is updated automatically when revenue tracking is configured — directly from App Store, or Google Play, and from RevenueCat, Stripe. Configure them in **Settings** → **Integrations**. #### First Seen At The "first seen at" date controls [claim code eligibility](/docs/users/introduction/#claim-code-eligibility) (default window: 7 days). If you don't set it, WinWinKit uses the user's creation date. #### Metadata Attach arbitrary key-value pairs to a user. ### Provided by WinWinKit These properties are managed by WinWinKit. Read them from the `User` returned by `fetchUser(...)` or `createOrUpdateUser(...)`. #### Referral Code The user's own referral code, generated when they are created in WinWinKit. ```json "referral_code": "ABC123" ``` #### Referral Code Link A hosted [Code Link](/docs/pages/code-link/) URL to the user's referral code. ```json "referral_code_link": "https://example.wwk.link/ABC123" ``` #### Claim Code Eligibility Whether the user can claim a code right now, and until when. ```json { "eligible": true, "eligible_until": "2026-05-05T12:00:00Z" } ``` See [Claim Code Eligibility](/docs/users/introduction/#claim-code-eligibility) for the rules. #### Referred By The code that referred this user, if any. `type` is one of `affiliate`, `promo`, or `referral`. ```json { "code": "XYZ123", "type": "referral" } ``` #### Stats Counters for users who claimed this user's referral code: total claims, conversions to premium, and subsequent churns. ```json { "claims": 12, "conversions": 5, "churns": 1 } ``` #### Rewards The user's active and expired rewards, grouped by reward type. ```json { "active": { "basic": [...], "credit": [...], "offer_code": [...], "googleplay_promo_code": [...], "revenuecat_entitlement": [...], "revenuecat_offering": [...] }, "expired": { "basic": [...], "credit": [...], "offer_code": [...], "googleplay_promo_code": [...], "revenuecat_entitlement": [...], "revenuecat_offering": [...] } } ``` #### Referral Program The referral program the user is part of, if any. ## Methods ### Withdraw credits Spend down a credit reward balance. The amount is debited from the user's available credit for the given key. `operationId` is optional and lets you make the call idempotent — passing the same id twice debits only once. ```ts const { user, withdrawResult, errors } = await wwk.withdrawCredits({ appUserId: "your-app-user-id", key: "extra-levels", amount: 5, operationId: "checkout-7d3a", }); ``` ### Register App Store transaction Register an App Store transaction with WinWinKit. Only needed when using direct App Store revenue tracking (without RevenueCat integration) — call this after a purchase completes so WinWinKit can attribute the conversion without delays. ```ts const { errors } = await wwk.registerAppStoreTransaction({ appUserId: "your-app-user-id", originalTransactionId: "1000000123456789", }); ``` ### Register Google Play transaction Register a Google Play purchase with WinWinKit. Only needed when using direct Google Play revenue tracking (without RevenueCat integration) — call this after a purchase completes so WinWinKit can attribute the conversion without delays. ```ts const { errors } = await wwk.registerGooglePlayTransaction({ appUserId: "your-app-user-id", purchaseToken: "abc...token", }); ``` ### Refresh To refresh the user's state, call `fetchUser(...)` again. ```ts const { user } = await wwk.fetchUser({ appUserId: "your-app-user-id" }); ``` ## Error handling Every method resolves to a discriminated union — the SDK never throws on API errors. Check the `errors` field to branch: ```ts const { user, errors } = await wwk.fetchUser({ appUserId: "your-app-user-id" }); if (errors) { // errors is ErrorObject[] — show, log, or surface them. } else { // user is User | null — null means the user does not exist (HTTP 404). } ``` The shape per method: - **Most methods** — `{ ...payload, errors: null } | { ...payload-fields-as-null, errors: ErrorObject[] }`. - **`fetchUser`** — additionally returns `{ user: null, errors: null }` when the user does not exist. - **`registerAppStoreTransaction` / `registerGooglePlayTransaction`** — return only `{ errors: ErrorObject[] | null }`. Network failures and unexpected runtime errors will reject the returned promise — wrap calls in `try`/`catch` if you need to handle those distinctly from API errors. See [Errors](/developers/api/errors/) for the full list of error codes the API can return. --- # Introduction Source: https://winwinkit.com/developers/api/introduction/ > Learn what the WinWinKit REST API is and how to use it. Call the WinWinKit REST API directly when no SDK fits your runtime. [Endpoint Reference](https://docs.winwinkit.com/): Every endpoint, with its parameters, example requests, and responses. ## Base URL All requests should be made to the following base URL: ``` https://api.winwinkit.com/ ``` ## Format Requests and responses are JSON. Send `Content-Type: application/json` on requests with a body. ## Authentication Every request must include an [API Key](/developers/get-started/api-keys/) in the `x-api-key` header. See [Authentication](/developers/api/authentication/) for details. ## Errors All non-2xx responses follow a consistent shape and include machine-readable error codes you can branch on. See [Errors](/developers/api/errors/) for the full reference. --- # Authentication Source: https://winwinkit.com/developers/api/authentication/ > Learn how to authenticate your requests to the WinWinKit API. Every request to the WinWinKit API must include an `x-api-key` header with your [API Key](/developers/get-started/api-keys/). ```bash curl -X GET "https://api.winwinkit.com/users/your-app-user-id" \ -H "x-api-key: your-api-key" ``` The same header shape applies to every endpoint: ```json { "headers": { "x-api-key": "" } } ``` If the key is missing, invalid, or revoked, the API returns `401 UNAUTHORIZED` — see [Errors](/developers/api/errors/) for the full error contract. --- # Errors Source: https://winwinkit.com/developers/api/errors/ > Learn how the WinWinKit API returns errors and how to handle them in your code. When you send a request to the WinWinKit API, the response includes an HTTP status code and, in most cases, a response body. To determine your request's status and handle errors, use the HTTP status code along with the `code` from the error response. Interpret the error starting with the most general information first. ## Response HTTP Codes WinWinKit uses standard HTTP codes to indicate the success or failure of your requests. In general, 2xx codes correspond to success, 4xx codes are for caller-related failures, and 5xx codes are for infrastructure issues. | Status | Name | Description | | :----- | :--- | :---------- | | 200 | OK | Success. | | 201 | Created | Object created. | | 400 | Bad Request | Check that the request format was correct. | | 401 | Unauthorized | The API key was missing or invalid. | | 403 | Forbidden | The operation is not permitted. | | 404 | Not Found | The resource was not found. | | 422 | Unprocessable Entity | Check that the request data was correct. | | 424 | Failed Dependency | A request to an external service (e.g. App Store Connect) failed. | | 429 | Too Many Requests | The rate limit was exceeded. | | 500 | Internal Server Error | Indicates an error with WinWinKit servers. | ## Error Response The error body returned whenever the API request isn't successful. Contains an array of one or more errors. ```json { "errors": [ { "code": "", "status": , "message": "", "source": "" } ] } ``` ## Error Code The `code` property is a stable, machine-readable value indicating the exact type of error. Codes are hierarchical — dots separate information from general to specific. The more the system knows about the error, the more levels the code includes. | Status | Code | Description | | :----- | :--- | :---------- | | 400 | `BODY_INVALID` | The request body is the wrong type and is not valid JSON. | | 401 | `UNAUTHORIZED` | The operation is not authorized due to missing or invalid API key. | | 403 | `FORBIDDEN.CODE_INACTIVE` | The code cannot be claimed because it is not active. Applies to affiliate codes that haven't been accepted yet, and to inactive promo codes. | | 403 | `FORBIDDEN.CODE_LIMIT_REACHED` | The code cannot be claimed because its limit has been reached. | | 403 | `FORBIDDEN.OPERATION_DUPLICATE` | The operation is not allowed to be performed again. Applies to grant a reward and withdraw credits when a previously used `operation_id` is provided. | | 403 | `FORBIDDEN.USER_ALREADY_CLAIMED_CODE` | The user has already claimed a code. | | 403 | `FORBIDDEN.USER_CANNOT_CLAIM_OWN_CODE` | The user cannot claim their own referral code. | | 403 | `FORBIDDEN.USER_NOT_ELIGIBLE_DUE_TO_TIME_CONSTRAINTS` | The user is not eligible to claim a code due to time constraints. By default the user can claim a code within 7 days of their first seen at or creation date. | | 404 | `NOT_FOUND.CODE` | The code does not exist. | | 404 | `NOT_FOUND.REWARD` | The reward does not exist. | | 404 | `NOT_FOUND.USER` | The user does not exist. | | 404 | `PATH_ERROR` | The path is not valid. For example, `GET https://api.winwinkit.com/lol` is not a valid path. | | 422 | `PARAMETER_ERROR.INVALID` | The parameter is allowed but has an invalid value or type. The name of the invalid parameter is in the `source` field. | | 422 | `PARAMETER_ERROR.REQUIRED` | A required parameter is missing. The name of the missing parameter is in the `source` field. | | 429 | `TOO_MANY_REQUESTS` | Too many requests. | | 500 | `INTERNAL_SERVER_ERROR` | Indicates an error with WinWinKit servers. | ## Examples ### Unauthorized Returned when the API key is missing or invalid: ```json { "errors": [ { "code": "UNAUTHORIZED", "status": 401, "message": "Invalid API Key", "source": null } ] } ``` ### Claiming Own Code Returned when a user tries to claim their own code: ```json { "errors": [ { "code": "FORBIDDEN.USER_CANNOT_CLAIM_OWN_CODE", "status": 403, "message": "User Cannot Claim Own Code", "source": null } ] } ``` ### Claiming Code Again Returned when a user has already claimed a code and attempts to claim again: ```json { "errors": [ { "code": "FORBIDDEN.USER_ALREADY_CLAIMED_CODE", "status": 403, "message": "User Already Claimed Code", "source": null } ] } ``` ### Code Not Found Returned when trying to claim a non-existing code: ```json { "errors": [ { "code": "NOT_FOUND.CODE", "status": 404, "message": "Code Not Found", "source": null } ] } ``` ### User Not Found Returned when attempting any operation (e.g. fetch or claim code) on a non-existing user: ```json { "errors": [ { "code": "NOT_FOUND.USER", "status": 404, "message": "User Not Found", "source": null } ] } ``` ### Reward Not Found Returned when attempting to withdraw credits on a non-existing reward: ```json { "errors": [ { "code": "NOT_FOUND.REWARD", "status": 404, "message": "Reward Not Found", "source": null } ] } ``` ### Missing Parameter Returned when a required parameter named `code` is missing: ```json { "errors": [ { "code": "PARAMETER_ERROR.REQUIRED", "status": 422, "message": "Required", "source": "code" } ] } ``` > **Tip:** When a required parameter is missing, the error object includes the name of the parameter in the `source` field. ### Invalid Parameter Returned when a parameter named `is_trial` is invalid: ```json { "errors": [ { "code": "PARAMETER_ERROR.INVALID", "status": 422, "message": "Must be a boolean", "source": "is_trial" } ] } ``` > **Tip:** When a parameter is invalid, the error object includes a descriptive `message` and the name of the parameter in `source`. --- # Rate Limits Source: https://winwinkit.com/developers/api/rate-limits/ > How the WinWinKit API throttles excessive traffic and how to react when you hit a limit. Calls to our REST API are rate limited to provide equitable access for everyone and to prevent abuse. We are going to keep evolving these limits as we gather more information, and encourage your feedback. ## Limits Client-facing API requests are limited per project, based on your plan, over a rolling one-minute window. The limit is shared across all of your app's end users. | Plan | Requests per minute | | ---- | ------------------- | | [Free](/pricing/) | 120 | | [Starter](/pricing/) | 600 | | [Essential](/pricing/) | 1,200 | | [Scale](/pricing/) | 2,400 | Traffic is additionally subject to a per-IP safeguard that protects against short bursts and abuse: | Interval | Requests per minute | | ---------- | ------------------- | | 1 second | 30 | | 10 seconds | 90 | | 1 minute | 300 | > **Note:** Requests made with a [Secret API Key](/developers/get-started/api-keys/) are server-to-server and governed solely by per-project plan limit — no per-IP limits apply. ## Response headers WinWinKit API follows the IETF [RateLimit header fields for HTTP](https://datatracker.ietf.org/doc/html/draft-ietf-httpapi-ratelimit-headers) standard. Every response to a client-facing request advertises the current limit via its `RateLimit-Policy` and `RateLimit` fields, and a rate-limited (`429`) response additionally includes a `Retry-After` field: ```http RateLimit-Policy: "project-plan";q=600;w=60 RateLimit: "project-plan";r=587;t=42 Retry-After: 42 ``` | Header Name | Description | | ------------------ | ------------------------------------------------------------------------------------------------------------------------ | | `RateLimit-Policy` | `q` is your plan's quota and `w` is the window in seconds. | | `RateLimit` | `r` is the requests remaining in the current window (`0` once you're rate limited) and `t` is the seconds until it resets. | | `Retry-After` | Seconds to wait before retrying. Sent only on a `429 Too Many Requests` response. | These are standard structured-field headers — any client library that understands the `RateLimit` specification can consume them directly. Prefer reading these headers over hard-coding the limits, since we evolve them over time. ## Handling rate limit errors Once you exceed the limit, the WinWinKit API returns a `429 Too Many Requests` response. It carries the rate-limit headers described above — with `RateLimit` reporting `r=0` and a `Retry-After` field — alongside the standard [error](/developers/api/errors/) body: ```json { "errors": [ { "code": "TOO_MANY_REQUESTS", "status": 429, "message": "Too Many Requests", "source": null } ] } ``` Honor `Retry-After` and retry after a short backoff. If you consistently hit the limit during normal usage, batch where you can and avoid tight polling — most user state can be read once and cached client-side. --- # Affiliate Source: https://winwinkit.com/glossary/#affiliate > An affiliate is an influencer, content creator, or even a regular user who promotes your app for a commission. An affiliate is an influencer, content creator, or even a regular user who promotes your app for a commission. Learn more about [Affiliates](/docs/affiliates/introduction/). --- # Affiliate Code Source: https://winwinkit.com/glossary/#affiliate-code > An affiliate code is a unique short identifier assigned to an affiliate that allows them to invite others to join the app. An affiliate code is a unique short identifier assigned to an affiliate that allows them to invite others to join the app. When a new user uses this code, it links them to the affiliate. Affiliate codes are essential for tracking and distributing affiliate and user rewards correctly. An affiliate code is between 4 and 12 characters long and consists of a combination of letters and numbers. Example: **MKBHD2025** --- # Affiliate Form Source: https://winwinkit.com/glossary/#affiliate-form > A web page where new affiliates can sign up to promote your app for a commission. A web page where new affiliates can sign up to promote your app for a commission. Learn more about [Affiliate Form](/docs/pages/affiliate-form/). --- # Claim Source: https://winwinkit.com/glossary/#claim > A claim is the action taken by an invited user to utilize an affiliate, referral or promo code, which allows them to receive the associated rewards. A claim is the action taken by an invited user to utilize an affiliate, referral or promo code, which allows them to receive the associated rewards. This process is crucial for activating the rewards for the invited and, if applicable, the referring users. Synonyms: **redeem** --- # Code Link Source: https://winwinkit.com/glossary/#code-link > A web link to a code, its rewards, and instructions on how to use it. A web link to a code, its rewards, and instructions on how to use it. The code can be an affiliate, referral, or promo code. Learn more about [Code Link](/docs/pages/code-link/). --- # Conversion Source: https://winwinkit.com/glossary/#conversion > A conversion refers to the process where an invited user not only claims a code but also takes a further step to become a premium user. A conversion refers to the process where an invited user not only claims a code but also takes a further step to become a premium user. --- # Invited user Source: https://winwinkit.com/glossary/#invited-user > Invited users are new users to your app who are referred by either the referring users or the affiliates, or are attracted by the promo codes. Invited users are new users to your app who are referred by either the referring users or the affiliates, or are attracted by the promo codes. Synonyms: **invitee** --- # Offer Code Source: https://winwinkit.com/glossary/#offer-code > An offer code is an App Store Offer Code that provides users with a free or discounted subscription for a specific duration. An offer code is an App Store Offer Code that provides users with a free or discounted subscription for a specific duration. Learn more about [Offer Codes](/docs/rewards/appstore-offer-code/). --- # Promo Code Source: https://winwinkit.com/glossary/#promo-code > A promo code is a unique short identifier that allows users to receive rewards as part of a promotion. A promo code is a unique short identifier that allows users to receive rewards as part of a promotion. An promo code is between 4 and 12 characters long and consists of a combination of letters and numbers. Example: **SUMMERSALE25** --- # Referral Code Source: https://winwinkit.com/glossary/#referral-code > A referral code is a unique short identifier assigned to a user that allows them to invite others to join the app. A referral code is a unique short identifier assigned to a user that allows them to invite others to join the app. When a new user uses this code, it links them to the referring user, enabling both parties to earn rewards as part of the referral program. Referral codes are essential for tracking the effectiveness of referral campaigns and ensuring that rewards are distributed accurately. A referral code is always 6 characters long and consists of a combination of letters and numbers. Example: **XYZ123** --- # Referral Program Source: https://winwinkit.com/glossary/#referral-program > A referral program defines the rewards that users receive for inviting others and being invited. A referral program defines the rewards that users receive for inviting others and being invited. Synonyms: _just_ **program** Learn more about [Referrals](/docs/referrals/introduction/). --- # Referring user Source: https://winwinkit.com/glossary/#referring-user > Referring users are those who invite others to your app. Referring users are those who invite others to your app. They initiate the referral by sharing their unique referral code. Synonyms: **referrer**, **inviting user** --- # Reward Source: https://winwinkit.com/glossary/#reward > A reward represent a level of access, feature, offer, or content that a user is "rewarded" with. A reward represent a level of access, feature, offer, or content that a user is "rewarded" with. Learn more about [Rewards](/docs/rewards/introduction/). --- # User Source: https://winwinkit.com/glossary/#user > A user represents an individual who interacts with your app. A user represents an individual who interacts with your app. Learn more about [Users](/docs/users/introduction/). --- # Affiliate Analytics Source: https://winwinkit.com/changelog/#affiliate-analytics > 2026-08-11 — Affiliate Analytics lets you track your affiliates' performance and activity over time. ![WinWinKit screenshot with affiliate analytics](@assets/changelog/affiliate-analytics.png) Affiliate Analytics lets you track your affiliates' performance and activity over time. - **See who drives the results** — revenue, profit, affiliate proceeds, claims, and conversions, each split by affiliate. Your top five are charted individually and everyone else is grouped as Others, so a single partner can't hide the rest. - **Choose the window** — 7, 28, or 90 days, 12 months, or all time. Longer periods roll up into weeks automatically so the shape stays readable. - **Compare months against weeks** — fixed twelve-month and twelve-week views sit side by side, independent of the period above them, so a seasonal pattern and a recent one are visible at once. - **Know where the revenue came from** — every total is also broken down by App Store, Google Play, and Stripe. Switch between bar and area charts from Customize, or turn on Synchronize on hover to line every chart up on the same date at once. Available on the Essential plan and above, under Affiliates → Analytics. --- # Custom Applications Source: https://winwinkit.com/changelog/#custom-application-questions > 2026-07-14 — You can now shape the affiliate application form around your program — ask affiliates the questions that matter to you before they join. You can now shape the affiliate application form around your program — ask affiliates the questions that matter to you before they join. It's configurable per affiliate group, so each group can collect the information that's relevant to it — and you can copy a group's questions over to another to get a new one set up in seconds. --- # Sandbox Mode Source: https://winwinkit.com/changelog/#sandbox-mode > 2026-07-03 — Every new project now starts in **Sandbox Mode**, so you can test your entire integration end-to-end before going live. ![WinWinKit illustration of Sandbox Mode](@assets/changelog/sandbox-mode.png) Every new project now starts in **Sandbox Mode**, so you can test your entire integration end-to-end before going live. - **Only sandbox transactions are tracked** — App Store and Google Play sandbox purchases, RevenueCat sandbox events, and Stripe test-mode charges. - **Everything else behaves exactly as in production** — affiliates, referrals, promos, rewards, and analytics all run against your sandbox data. - **No affiliate payouts are created** — earnings are still calculated for testing, but nothing is ever paid out. When you're ready, deactivate Sandbox Mode to move the project to production. This can be done once and permanently removes all sandbox data (referred users, transactions, and analytics), after which the project starts tracking production transactions. --- # Affiliate Payouts with PayPal Source: https://winwinkit.com/changelog/#affiliate-payouts-paypal > 2026-07-01 — Affiliate payouts now support [PayPal](https://paypal.com) — another way for your affiliates to get paid, alongside Stripe and Wise. ![WinWinKit and PayPal integration for affiliate payouts](@assets/changelog/affiliate-payouts-paypal.png) Affiliate payouts now support [PayPal](https://paypal.com) — another way for your affiliates to get paid, alongside Stripe and Wise. - Affiliates connect in seconds with Log in with PayPal, no bank details required - Earnings are paid out directly to their PayPal account - Available to affiliates across the countries PayPal supports. --- # Affiliates iOS app Source: https://winwinkit.com/changelog/#affiliate-ios-app > 2026-05-29 — We've launched an iOS client app that gives affiliates an overview of their performance in real time — right from their phone. ![WinWinKit affiliates iOS app screenshot](@assets/changelog/affiliates-ios-app.png) We've launched an iOS client app that gives affiliates an overview of their performance in real time — right from their phone. Until now, affiliates managed their partnership from the web dashboard. With the new app, they get a native, on-the-go experience designed to let them stay on top of their overall performance wherever they are. Our ambition is to bring the entire web dashboard into the app, because that's the most natural interface for affiliates. [Download on the App Store](https://apps.apple.com/app/id6772105687) --- # Affiliate Payouts with Wise Source: https://winwinkit.com/changelog/#affiliate-payouts-wise > 2026-05-07 — Affiliate payouts now support [Wise](https://wise.com), expanding global coverage to 70+ countries. ![WinWinKit and Wise integration for affiliate payouts](@assets/changelog/affiliate-payouts-wise.png) Affiliate payouts now support [Wise](https://wise.com), expanding global coverage to 70+ countries. - Pay affiliates in their local currency with low FX fees and transparent pricing - Affiliates connect their Wise recipient details directly from the dashboard - Confirm payouts with a single click on the Payouts page. --- # Direct Revenue Tracking Source: https://winwinkit.com/changelog/#direct-revenue-tracking > 2026-05-01 — We've added support for tracking revenue directly from the [App Store](/docs/introduction/revenue-tracking/app-store/) and [Google Play](/docs/introduction/revenue-tracking/google-play/) — no third... ![WinWinKit direct revenue tracking from App Store and Google Play illustration](@assets/changelog/direct-revenue-tracking.png) We've added support for tracking revenue directly from the [App Store](/docs/introduction/revenue-tracking/app-store/) and [Google Play](/docs/introduction/revenue-tracking/google-play/) — no third-party billing platform required. - **App Store** — powered by App Store Server Notifications V2, delivering purchases, renewals, refunds, and trials in real time. - **Google Play** — powered by Real-time Developer Notifications via Cloud Pub/Sub, capturing the same set of events as they happen. Each transaction is attributed back to the app user, so referral conversions, affiliate earnings, and promo code revenue stay accurate across both stores. To enable it, head to **Settings → Integrations** and follow the setup steps. --- # Analytics Charts Source: https://winwinkit.com/changelog/#preview-analytics-charts > 2026-04-24 — We've refreshed the layout of affiliate details pages. ![WinWinKit analytics charts](@assets/changelog/preview-analytics-charts.png) We've refreshed the layout of affiliate details pages. They now surface the most important details first and feature analytics charts, giving you a clear view of performance trends at a glance - clicks, conversions, and revenue over time. --- # No-Code Integration Source: https://winwinkit.com/changelog/#no-code > 2026-03-23 — Run affiliate marketing for your App Store app - without any code integration. ![WinWinKit illustration for no-code integration](@assets/changelog/no-code.png) Run affiliate marketing for your App Store app - without any code integration. WinWinKit now supports a fully no-code setup for affiliate campaigns powered by Apple's Offer Codes. Connect your App Store Connect account, create an Offer Code reward, and let affiliates start driving subscriptions - no SDK or backend work required. - **Zero code changes** - if your app already supports Offer Codes, you're ready to go - **Automatic code creation** - affiliate codes are created as custom Offer Codes directly in App Store Connect - **Usage tracking & auto-extension** - WinWinKit monitors and extends limits automatically - **Works with existing affiliate setup** - configure rewards per affiliate group, invite affiliates, and track earnings as usual Learn more on the [No-Code Integration](/no-code/) page or read the [docs](/docs/affiliates/no-code/). --- # Affiliate Groups Source: https://winwinkit.com/changelog/#affiliate-groups > 2026-02-25 — Affiliate Groups let you segment your affiliates into tiers - each with its own commission rates, user rewards, payout rules, and signup settings. ![WinWinKit screenshot with affiliate groups](@assets/changelog/affiliate-groups.png) Affiliate Groups let you segment your affiliates into tiers - each with its own commission rates, user rewards, payout rules, and signup settings. Now you can create distinct tiers for different partner types: - **Affiliate rewards per group** - set commission rates, duration, per-claim and per-conversion amounts independently for each group; - **User rewards per group** - configure what end-users receive when they sign up through affiliates in a given group; - **Payout settings per group** - control holding periods, minimum payout thresholds, and auto-payouts per group; - **Landing page per group** - enable or disable group's landing page and auto-approval for each group separately. Every project starts with a default group. Move affiliates between groups at any time as your program evolves. With affiliate groups and their new settings, it is now possible to put affiliate marketing on full autopilot: - **Auto-Approve** - automatically approve new affiliate requests; - **Auto-Payouts** - automatically send payouts when minimum amount is met. Read more in our [blog post](/blog/meet-affiliate-groups/). --- # Affiliate Resources Source: https://winwinkit.com/changelog/#affiliate-resources > 2026-02-20 — Apps can now share brand resources directly with their affiliates — brand colors, logos, links, and additional files — so affiliates have everything they need to promote your app consistently. ![WinWinKit screenshot with affiliate resources](@assets/changelog/affiliate-resources.png) Apps can now share brand resources directly with their affiliates — brand colors, logos, links, and additional files — so affiliates have everything they need to promote your app consistently. You can also add FAQ and support links to help affiliates find answers without reaching out. All resources are available to affiliates from their dashboard. --- # Plans & Pricing Source: https://winwinkit.com/changelog/#plans-and-pricing > 2026-02-18 — We're introducing tiered plans — **Starter** ($30/mo), **Essential** ($75/mo), and **Scale** ($150/mo) — replacing the previous usage-based-only pricing model. ![WinWinKit screenshot with new plans and pricing](@assets/changelog/plans-and-pricing.png) We're introducing tiered plans — **Starter** ($30/mo), **Essential** ($75/mo), and **Scale** ($150/mo) — replacing the previous usage-based-only pricing model. This change lets us keep building WinWinKit in a more sustainable way while reducing complexity. Instead of unpredictable costs that scale with every metric, you get a clear monthly price with generous included limits. And even at small scale, the new plans are actually cheaper than what you'd have paid before. Each plan includes 100k MAU, with straightforward $10/100k MAU overage if you grow beyond that. All paid plans come with a 14-day free trial — no credit card required. Check out the full breakdown on the new [Pricing](/pricing/) page. --- # Affiliate Payouts Source: https://winwinkit.com/changelog/#affiliate-payouts > 2026-01-19 — We're finally supporting instant payouts for the Affiliates, powered by [Stripe Connect](https://stripe.com/connect)! ![WinWinKit screenshot with affiliate payouts](@assets/changelog/affiliate-payouts.png) We're finally supporting instant payouts for the Affiliates, powered by [Stripe Connect](https://stripe.com/connect)! To send a payout, on the Payouts page, click the 'Confirm Payouts' button and choose a payment method. Once confirmed, the payout will be instantly transferred to the affiliate's account. Then, affiliates can withdraw their earnings at their own discretion. An overview of past, upcoming and pending payouts is available on the dashboard for apps and affiliates. --- # Stripe Integration Source: https://winwinkit.com/changelog/#stripe-integration > 2025-11-05 — We're excited to add [Stripe](https://stripe.com/) integration that extends revenue tracking for the [Affiliates](/docs/affiliates/introduction/) feature. ![WinWinKit illustration showcasing Stripe integration](@assets/changelog/stripe-integration.png) We're excited to add [Stripe](https://stripe.com/) integration that extends revenue tracking for the [Affiliates](/docs/affiliates/introduction/) feature. If your payments are processed through Stripe, or if in addition to the mobile apps you offer a web app, enabling this integration allows you to track revenue across all platforms. --- # Refer a Friend Source: https://winwinkit.com/changelog/#refer-friend > 2025-10-27 — We're finally introducing a referral program for WinWinKit! ![WinWinKit refer a friend illustration](@assets/blog/refer-friend.png) We're finally introducing a referral program for WinWinKit! **Earn 100 FREE USERS for each referral!** Find your referral code in the dashboard, share it among your network, and receive free users worth $20 for your project for each referral! Every referred project receives 100 free users too. It is truly a win-win! Our referral program is proudly powered by [WinWinKit](/). Read more in our [blog post](/blog/meet-refer-a-friend/). --- # Reward Affiliates per User and Conversion Source: https://winwinkit.com/changelog/#affiliates-rewards-per-claim-and-conversion > 2025-10-16 — We're expanding options for rewarding affiliates. ![WinWinKit screenshot with affiliate rewards per claim and conversion](@assets/changelog/affiliates-rewards-per-claim-and-conversion.png) We're expanding options for rewarding affiliates. In addition to revenue percentage, you can now reward a fixed amount per user and per conversion. The rewards can be used in combination or separately, giving you the flexibility to create a tailored campaign for your app and affiliates. To improve conversion tracking, we've introduced the `is_trial` flag for users, enabling you to track conversions only for those who are not in trial. Learn more about the [is trial flag](/docs/users/introduction/#is-trial). Find more details about the new rewards in [the documentation](/docs/affiliates/introduction/#affiliate-rewards) and in our guide, [Setting up Affiliates with RevenueCat](/docs/guides/setting-up-affiliates-with-revenuecat/). --- # Docs, Guides and Blog Source: https://winwinkit.com/changelog/#content-pages > 2025-10-09 — We've refreshed our [docs](/docs/), started creating [guides](/docs/guides/) and began our [blog](/blog/) while making it more accessible and consistent. We've refreshed our [docs](/docs/), started creating [guides](/docs/guides/) and began our [blog](/blog/) while making it more accessible and consistent. This means a lot more content is on the way! ![WinWinKit content navigation with deep links for the Usage app](@assets/changelog/content-pages.png) --- # Google Play Promo Codes Source: https://winwinkit.com/changelog/#googleplay-promo-codes > 2025-08-26 — We’ve added support for [Promo Codes](https://developer.android.com/google/play/billing/promo), enabling rewards for Android users with a free-of-charge subscription trials. ![WinWinKit illustration for promo codes support](@assets/changelog/promo-codes.png) We’ve added support for [Promo Codes](https://developer.android.com/google/play/billing/promo), enabling rewards for Android users with a free-of-charge subscription trials. --- # Affiliates Source: https://winwinkit.com/changelog/#affiliates > 2025-08-08 — We're beyond excited to announce the launch of Affiliates feature. ![WinWinKit screenshot with affiliates](@assets/changelog/affiliates.png) We're beyond excited to announce the launch of Affiliates feature. Affiliates is a new way to empower growth of your app by partnering with bloggers, influencers, and content creators to promote your app. - Configurable affiliate rewards - set what commission they get and for how long - All supported user rewards are ready for rewarding the new users to improve signup conversion: - for example, offer a discounted premium for users arriving from affiliates - Unlimited affiliates - work with as many as you want - Public [affiliate form](/docs/pages/affiliate-form/) for letting affiliates signup themselves via a web page - literally anyone can become an affiliate and earn commission by promoting your app - see an example [here](https://usage.wwk.link/affiliate-form). - Automatic tracking of the revenue done with RevenueCat integration - Automatic payout to the affiliates handled by WinWinKit. Learn more about [Affiliates](/docs/affiliates/introduction/) and [Affiliate Form](/docs/pages/affiliate-form/). --- # RevenueCat Rewards Source: https://winwinkit.com/changelog/#revenuecat-rewards > 2025-07-01 — We've added support for two new reward types that tie into RevenueCat: ![WinWinKit screenshot with RevenueCat rewards](@assets/changelog/revenuecat-rewards.png) We've added support for two new reward types that tie into RevenueCat: - **Entitlement**: Reward users with [RevenueCat entitlements](https://www.revenuecat.com/docs/getting-started/entitlements). - **Offering**: Reward users with a specific [RevenueCat offering](https://www.revenuecat.com/docs/offerings/overview). Both reward types are fully configurable with referral logic in WinWinKit and can be rewarded for a specific period of time too. Head to Settings -> Integrations -> RevenueCat to enable the new reward types. Learn more about [Entitlement](/docs/rewards/revenuecat-entitlement/) and [Offering](/docs/rewards/revenuecat-offering/) rewards. --- # Code Link Page Source: https://winwinkit.com/changelog/#code-link-page > 2025-06-06 — We've made it easier to discover the Code Link in the dashboard - now it has lives under Pages on the sidebar. We've made it easier to discover the Code Link in the dashboard - now it has lives under Pages on the sidebar. ![WinWinKit screenshot with deep links for the Usage app](@assets/changelog/code-link-page.png) Learn more about [Code Link](/docs/pages/code-link/). --- # Deep Links Support Source: https://winwinkit.com/changelog/#deep-links-support > 2025-06-06 — We've added support for configuring deep links that open the app directly from the Code Link page. ![WinWinKit screenshot with deep links for the Usage app](@assets/changelog/deep-links-usage.png) We've added support for configuring deep links that open the app directly from the Code Link page. It enables creating a streamlined user experience and allows configuring deep links per supported platform. Additionally, we've added the ability to preview deep links and programs directly in the dashboard - simply select the configurations you want to preview. Learn more about [Deep Links](/docs/pages/code-link/#deep-links). --- # RevenueCat Integration Source: https://winwinkit.com/changelog/#revenuecat-integration > 2025-05-30 — We've added support for [RevenueCat](https://www.revenuecat.com/) integration, enabling automatic tracking of users' conversions and churn. ![WinWinKit illustration showcasing referral](@assets/changelog/revenuecat.png) We've added support for [RevenueCat](https://www.revenuecat.com/) integration, enabling automatic tracking of users' conversions and churn. Head to Settings -> Integrations -> RevenueCat to connect it. --- # App Store Offer Codes Source: https://winwinkit.com/changelog/#appstore-offer-codes > 2025-05-26 — Growing your app’s subscription base just became much easier! ![WinWinKit illustration for offer codes support](@assets/changelog/offer-codes.png) Growing your app’s subscription base just became much easier! 🎉 We’ve added support for [Offer Codes](https://developer.apple.com/app-store/subscriptions/#offer-codes), enabling a whole new way for attracting new and engaging existing users in promoting your app. Offer Codes are Apple’s native way to reward users with a free or discounted subscription offer. They’re powerful, but usually difficult to set up and manage across real campaigns. With WinWinKit, that’s now handled automatically! You can create referral programs where: - Offer Codes are generated and assigned when needed - Logic and delivery are fully managed inside the platform - Users get the right reward at the right time — without any extra tooling or backend work. Learn more about [Offer Codes](/docs/rewards/appstore-offer-code/) rewards. --- # Meet WinWinKit Source: https://winwinkit.com/changelog/#meet-winwinkit > 2025-04-04 — We’re excited to share that [WinWinKit](https://winwinkit.com) is now available for everyone! ![WinWinKit illustration showcasing referral](@assets/changelog/meet-winwinkit.png) We’re excited to share that [WinWinKit](https://winwinkit.com) is now available for everyone! [WinWinKit](https://winwinkit.com) is built on the simple concept of a referral code. Each user of the app users gets a unique referral code that can be used to invite new users for a reward. What rewards are, when they apply, which party receives what, is entirely under your control and can be set up with a few clicks. Why add referrals? - Referrals are a great way to engage users in the promotion of your app. - Referrals unlock a new organic marketing channel. - Users interacting with the referral become more attached to the product. [WinWinKit](https://winwinkit.com) provides a hassle-free way to add a referral to your app. Setting up a referral program takes just a few clicks and minimal integration!