Skip to main content
Question

What' the Webhook event type for promo codes?

  • March 2, 2023
  • 2 replies
  • 165 views

Forum|alt.badge.img+4

The [docs](https://www.revenuecat.com/docs/webhooks#webhook-events) don’t mention about the event type when a promo code is used for a subscription. 

 

As soon as the user redeems a code, I want to get a webhook event so that I can update user’s data on my backend. How can I then do it? 

 

 

This post has been closed for comments

2 replies

Forum|alt.badge.img+7
  • Dedicated Contributor
  • March 2, 2023

Hi,

This is a great question.

When the promo is purchased, a webhook will come in with the following fields,

"period_type": "PROMOTIONAL",
"type": "NON_RENEWING_PURCHASE"

When it expires,

"period_type": "PROMOTIONAL",
"type": "EXPIRATION"

When it comes to syncing customer information to your database, we do recommend using the webhooks only as a trigger to call our API. You can find more information about this here.

 

 


Forum|alt.badge.img+4
  • Author
  • New Member
  • March 3, 2023

Thanks for the answer. 

Does it also mean that the user won’t be charged once the subscription (via promo code) expires? I think they must be charged as there’s no such thing as “Free subscription” but “Free trials to subscription”.