Question

Revenuecat to sqlite

  • 2 April 2022
  • 1 reply
  • 45 views

Badge +4
  • New Member
  • 0 replies

We have a webhook created in php that does three things when it receives a json notification from the api

1. Updates the user expiry date in the sql database
2. Inserts the payment information in the database
3. Sends payment notification to admin email via Mailjet api

There is a test environment where we send test json notifications to the server and everything all tasks are successful during tests.

The issue is that on live apps on other users phones, these three tasks are successful only during initial purchase by the user, on renewal after a month, only one task is successful: inserting the payment info into the database, the others do not work. So there is a discrepancy in payment information and user expiry date which of course restricts access to services 

We need someone who knows php, and is familiar with google and appstore subscriptions, these two are actually managed by revenuecat.com


1 reply

Userlevel 5
Badge +9

Hey Sri,

It’s difficult for us to jump into a system that we’re not familiar with, but I can explain how to troubleshoot RevenueCat so that you can find the issue in your system:

  1. For every event that occurs, like a purchase event, or a renewal event, a webhook event should be generated in RevenueCat and sent to your servers. You should first determine what webhook or data is missing from your database, and then check in RevenueCat to see if the webhook was sent from RevenueCat and if there were any errors. Find the customer's profile in RevenueCat, then click on the event that’s missing from your servers, and check the event details to see if a webhook was sent.
  2. One helpful tip while you figure out the webhook issue is to make a request to RevenueCat’s API whenever you receive a webhook. That way you can be sure you’re getting the correct data to update your servers and you don’t need to worry too much about whether the webhook is an initial purchase, renewal, or something else.

Let me know if those don’t help and we can discuss this further!

Reply