Skip to main content

Hi,

I'm looking to integrate IAPs some user generated content.

Similar question was already answered in context of subscriptions, but how about expireable content?

 

Can I have generic Google & Apple in app products, like product_19, product_39, and have it link to a few different $39 products in app that users can buy, and the access to it lasts for 30 days. Would RevenueCat be able to handle that and distinguish between products?

 

Thank you,

Marin

Hey @marin!

RevenueCat can definitely help with this type of setup, however it’ll also take some custom work on your own server to keep track of the content and when the consumable purchases should expire.

You’ll want to use consumable products so that you can purchase several of the same products, however RevenueCat doesn’t support setting expirations for consumable products. The good news though is that RevenueCat can validate your transactions and send events in a consistent format to consume from your server.
In this case, I’d recommend listening to webhooks, and watching for initial purchase events. When you receive an event, store the product, user, and expected expiration date (based on your own logic) in your database. When fetching content for your app, you could then only return content that is still considered valid.

Of course, this is describing it pretty simply, but let me know if that makes sense!


Hey @marin!

RevenueCat can definitely help with this type of setup, however it’ll also take some custom work on your own server to keep track of the content and when the consumable purchases should expire.

You’ll want to use consumable products so that you can purchase several of the same products, however RevenueCat doesn’t support setting expirations for consumable products. The good news though is that RevenueCat can validate your transactions and send events in a consistent format to consume from your server.
In this case, I’d recommend listening to webhooks, and watching for initial purchase events. When you receive an event, store the product, user, and expected expiration date (based on your own logic) in your database. When fetching content for your app, you could then only return content that is still considered valid.

Of course, this is describing it pretty simply, but let me know if that makes sense!

 

Thank you for responding.

 

Does RevenueCat allow sending arbitrary ID along with event, like my backend's item ID, for example:

 

Event

Type: Renewal

product_id: product_29

Price: $29

UserId: 5437bea9-fbf7-4305-8418-2b5f62f4a356

ItemId: 3c0b5d0b-d39f-4f3a-ac1c-a8fc29278414


Reply