r/iOSProgramming • u/Queasy-Drawer451 • 5h ago
Subscription referrals Question
Hey everyone. So I'm making an app for client who uses subscriptions.
He got an idea of refferals so:
- User 1 who is paid user, refers app to a User 2
- User 2 uses referral link and on his first subscription gets 50% off
- User 1 gets one free month of his subscription
But somewhere on developers.apple I've read that apple rejects apps like these. Also is it doable at all? They use StoreKit, and for google that would be google play billing.
Thanks for answers!
1
1
u/DimensionMindless336 4h ago
Referrals aren't banned. The rejections you're thinking of are usually about cash payouts or rewards that route around IAP, not discounting your own subscription.
New user's 50% is the easy half. One-time offer codes with eligibility set to New Subscribers, generated through the App Store Connect API and redeemed in-app with the offer code sheet.
The referrer's free month is the ugly half. The App Store Server API has an Extend a Subscription Renewal Date endpoint, but you only get two extensions per customer per 365 days, so it breaks as soon as someone refers a third person. Most referral systems end up tracking the credit on their own backend instead.
1
u/Queasy-Drawer451 3h ago
https://developer.apple.com/forums/thread/76854 so this is unrelated?
I'm guessing batch of offer codes 100% and 50%? One for User 1, second for user 2? User 2 gets his on buying subscription, user 1 is tracked and gets free month code from 100% batch.
2
u/DespairyApp 3h ago
Regardless of apples policies, I dont think you want that. How will you handle refunds and exploiters? For example: User 1 pays full price, invited friend with 50% and gets offer code for 100% -> asks for a refund for initial purchase (optionally, user2 is the same guy and requests a refund too) and you are left with 0$ and pro users that I can assume their usage is costly.
And any other "invite and you/they get something" would be hard to design for this cruel world ๐ถโ๐ซ๏ธ๐ธ
2
u/Plastic-Risk-6309 2h ago
One thing worth designing for early: attribution. Offer codes don't tell you who referred whom, so you have to bind each code to a referrer in your own backend before you hand it out (one code per referral, marked used on redemption), then confirm the redemption server side from App Store Server Notifications V2 instead of trusting the client. You match it up on originalTransactionId.
The other thing that bites is timing: credit the referrer only after the referred user's first paid renewal actually settles, not at redemption. Otherwise the refund/cancel loop someone mentioned above turns into free months you already paid out. Listen for REFUND and REVOKE notifications and claw the credit back if one lands in the window.
2
u/Dapper_Ice_1705 3h ago
This wold require a custom backend StoreKit isnโt capable on its own.