Revenue Cat
Implementation Guide
Developer Demo
Display our demo page in your app to test during development https://median.dev/revenue-cat
Initialize SDK
Initialize with a public apiKey
and appUserID
Provide a callback function or otherwise a promise is returned.
↔️Median JavaScript Bridge
median.revenueCat.configure({ 'apiKey': '<my_api_key>', 'appUserID': '<my_app_user_id>' }) // Return value: { "success": true | false }
Check if Initialized
Check if the Revenue Cat SDK is initialized before making other function calls.
Provide a callback function or otherwise a promise is returned.
↔️Median JavaScript Bridge
median.revenueCat.isInitialized({'callback': function}); // Return value: { 'initialized': true | false, 'apiKey': STRING // available only if initialized is true }
Get Offerings
Provide a callback function or otherwise a promise is returned.
↔️Median JavaScript Bridge
median.revenueCat.getOfferings() // Return value: [ ]
Make a Purchase
Provide a callback function or otherwise a promise is returned.
↔️Median JavaScript Bridge
median.revenueCat.purchase({'identifier':STRING}) // Return value: { "success": true | false }
Restore Purchases
Provide a callback function or otherwise a promise is returned.
↔️Median JavaScript Bridge
median.revenueCat.restorePurchases() // Return value: { "success": true | false }
Updated 17 days ago