POST /referee-redeem
Referee Endpoints
POST /referee-redeem
Redeem a metacode and get a platform-specific promo code
POST
POST /referee-redeem
Redeem Metacode
Validates a metacode and issues a platform-specific promo code to the referee. This is the core of the metacode flow.Request
string
required
Unique identifier for the referee in your app (must match RevenueCat app_user_id)
string
required
The metacode entered by the user (case-insensitive)
string
required
Platform for the promo code:
ios or androidExample Request
Response
string
The platform-specific promo code to redeem in App Store or Google Play
string
Platform the code is for:
ios or androidstring
Human-readable instructions for redeeming the code
string
Direct URL to the store redemption page
object
Information about the referrer
Example Response
Usage in Mobile App
Error Responses
What Happens Behind the Scenes
1
Validate Metacode
System finds referrer by
referrer_slug matching the metacode2
Anti-Fraud Check
Verifies referee hasn’t already redeemed a code for this campaign
3
Assign Code
Atomically assigns code from referee pool for specified platform
4
Map Attribution
Sets
codes.redeemed_by_uid = referee_uid for RevenueCat matching5
Create Event
Creates referral event with status
code_assigned6
Return Code
Returns platform-specific promo code with redemption instructions
Best Practices
Always use the same
referee_uid that you use with RevenueCat (app_user_id)Convert metacode to lowercase before sending to handle user input variations
Show clear instructions and a “Copy Code” button in your UI
Handle all error codes gracefully with user-friendly messages
Testing
Use the test metacodetest123 in development to verify your integration without consuming real codes.
