#RevenueCat Implementation

6 messages · Page 1 of 1 (latest)

safe bone
#

Has any of you had any experience of implementing subscriptions using revenueCat on the backend side, via nest ? They offer webhooks and apis calls to perform the check, so I am interested if you performed any of these ?

wheat pasture
safe bone
#
  1. Did you use both webhooks and api calls (as recommended in their docs) , or just one way to validate dubscription ?
  2. Their docs specify that you should return the response and defer the processing, so here comes the question, did you use something like bullmq to process the data that came from webhook ?
  3. What was your db schema ? Did you store the subscription itself, the hook response ?
  4. How you and the client side managed the fact that the webhook can come up with a delay of 60 seconds ?
wheat pasture
# safe bone 1. Did you use both webhooks and api calls (as recommended in their docs) , or j...

yeah, i used both webhooks and api calls. webhooks handle the real-time updates, and the api's mainly for syncing or double-checking in case a webhook is delayed or missed. I queue the webhook data with BullMQ and process it async. In the db I just store the subscritption info (userid, productid, status, expiry, etc.) plus the last webhook payload for reference. on the client side, we always rely on what the backend says, the webhook delay doesn't really matter then.

safe bone
#

okay, got you, thanks a lot. Would love if you could share some pieces of code you used, but if not possible, not a problem, thanks a lot

wheat pasture