Skip to main content
Solved

When INITIAL_PURCHASE webhook on offer code redemption


Forum|alt.badge.img

If a user redeems an offer code (iOS) without the app installed, when does the INITIAL_PURCHASE webhook fire?

 

I’m having an issue where the INITIAL_PURCHASE webhook is firing without the user id being set. I set the user id when the user signs in/up so I’m trying to understand when the webhook is firing. This is only a problem for trials (offer code redemptions).

It would be nice if the webhook would re-fired when the user id was updated. 

Best answer by sharif

Hi @1vmgm,

You're likely getting an initial purchase webhook when the customer makes a purchase outside of the app. That can include changing subscriptions in settings, purchasing directly from the App Store, or redeeming a coupon code in the App Store.

If you want to prevent that, I recommend not calling configure on the SDK until the customer logs in. That way, right when they log in the SDK processes the offer code purchase on the device.

View original
This post has been closed for comments

3 replies

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

Hey @1vmgm,

I’m checking on some things with the team and will get back to you soon!


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

Hi @1vmgm,

You're likely getting an initial purchase webhook when the customer makes a purchase outside of the app. That can include changing subscriptions in settings, purchasing directly from the App Store, or redeeming a coupon code in the App Store.

If you want to prevent that, I recommend not calling configure on the SDK until the customer logs in. That way, right when they log in the SDK processes the offer code purchase on the device.


Forum|alt.badge.img
  • Author
  • New Member
  • 1 reply
  • October 16, 2024

That makes sense, thanks!


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