Question

What' the Webhook event type for promo codes?


Badge +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? 

 

 


2 replies

Userlevel 3
Badge +7

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.

 

 

Badge +4

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”. 

Reply