How to access plan connection Id in member plan added webhooks when it's only included in cancellation actions?
Hey, I'm currently testing my webhooks and noticed that the plan connection Id is only included in the member plan canceled action but not in the member plan added action. Therefore, its hard to get this into the database in my backend as it checks for the plan connection id.
Also, in the docs it says "Member plan created" while in the dev tools its called "member plan added". Is this the same thing with just different names?
Thank you in advance!
Comments
6 comments
Hey Felix Gräf, I just tested the Member plan added webhook and it seems to render the plan connection when I assign a plan to the member (screenshot attached)
Did it not attach the plan connection in your test? 🤔
And yes I believe essentially both the names mean the same, i.e. when a plan is added to a member, it will send an event.
Hey, thanks for the quick reply. Yes, the planId comes along but not the Plan Connection Id.
You will see it in the plan canceled webhook payload
Ahh yes, now I can see that. Based on the documentation, it says when multiple plans are added, it will have an array of plan connections along with detailed data.
But apart from that, after a plan is added and a webhook is triggered, if I fetch the member, I can see that the member data seems to be giving us Plan Connection ID.
Does this help?
Yes, this already helped. Does the webhook itself (member plan added) send the plan connection id along? Because I dont receive it in the payload. Or do I need to write another function with JWts to fetch the members' plan connection Id ?
As far as I checked, the member plan added does not seem to provide the connection id info, so I am guessing the latter would help you to get that info
Hi,
The missing plan connection ID in the "member plan added" action is problematic if your backend depends on it.
Please sign in to leave a comment.