Skip to main content
Solved

Inconsistent identifiers for non-subscription transaction between purchaser info and webhooks

  • October 7, 2021
  • 1 reply
  • 103 views

Forum|alt.badge.img+6

Hey there, I was wondering what the best way to keep track of (have a unique id) non-subscription purchases is, that is usable both in frontends, and in webhooks.

 

When accessing purchaser info after making a transaction in javascript, it gives a `revenueCatId` for each transaction, and no transaction id. However the webhooks only return `id` and `transaction_id`, with the former seeming to be related to the webhook event, and none of these ids matching each other.

 

Because of this we have no way of knowing if an event from a webhook is the same transaction as is in someone’s app. Is there any way of getting a unique id for a transaction everywhere?

Best answer by sharif

I can understand how that’s a confusing experience! The revenueCatId in the SDK corresponds to the id property of the Non-Subscription object of the GET /subscribers endpoint. So when you receive a webhook, just make a request to the endpoint using the app user ID in the body of the webhook to get the id of the purchase, which you can save and later compare to the revenueCatId in the SDK.

View original
Did this post help you find an answer to your question?

1 reply

sharif
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 513 replies
  • Answer
  • October 8, 2021

I can understand how that’s a confusing experience! The revenueCatId in the SDK corresponds to the id property of the Non-Subscription object of the GET /subscribers endpoint. So when you receive a webhook, just make a request to the endpoint using the app user ID in the body of the webhook to get the id of the purchase, which you can save and later compare to the revenueCatId in the SDK.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings