Hi @james-,
Yes, you’re correct, the subscription ID is not returned in webhooks at this time. With the app user id of the customer, you can query this endpoint to get the list of subscriptions for this customer. Then, loop through the items
array for the specific subscription (you can search by matching the store_transaction_identifier
from the webhook to the store_subscription_identifier
in the items
array).
In the webhook, we receive a transaction_id
that matches the store_subscription_identifier
. This process works correctly.
However, I have a question regarding the trial plan implementation. Currently, when a user registers, the mobile team calls the backend API for user registration. As part of our backend logic, the user is first registered, and then a trial plan is automatically assigned. This is our current flow.
However, we are now planning to implement in-app purchases for mobile using RevenueCat. Given this change, how can we handle the trial plan assignment to a user on register via the backend while integrating with RevenueCat’s in-app purchase system?
Hi @james-,
If you’re implementing the RevenueCat SDK, you can decide if you’d like to use our Paywalls or to use your own custom paywall and manually call the purchase method. In either case, trials will be automatically applied automatically to eligible users whenever possible (Google allows for more differentiation, more info at that link).
Does that seem to be the information you’re looking for? Let me know if I seem to be misunderstanding the flow you’re hoping to provide for customers.
@kaitlin We receive the transaction_id
from a webhook and then we call this API. However, the store_transaction_identifier
in the API response is not immediately updated—it gets updated after about 1 minute. How can we handle this scenario?
Please update on this query ASAP.
@kaitlin please provide update
Hey @james-,
Are you finding that the customerInfo has not been updated when you poll the V1 GET /subscribers response right after receiving a webhook? Or are you finding that the V2 GET /subscriptions array does not have the updated transaction id immediately? I just want to be sure I understand - the link you sent along seems to be for the delete customer endpoint.