#36korrawit40

1 messages · Page 1 of 1 (latest)

sharp valveBOT
#

Hello 36korrawit40, we'll be with you shortly! Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
• 36korrawit40, 3 days ago, 73 messages

severe peak
#

Hello! I'm not sure what you mean by passing knowledge of an entitlement - can you elaborate

keen sundial
#

Sure. A customer buys a specific subscription product, we need to pass a piece of meta data to our auth system that indicates that the user gets access to an additional feature set.

#

Currently, we create users based on a post event on a webhook which creates them in our auth system. As we add subscription levels, accessible features in our app need to be lit up.

#

Our auth system handles that, but we need to pass along an indicator of which sub the customer has to flag features via auth

#

I can see a subscription Id on the user in the pay load, I'm exploring for the call pattern that traces that Id to a price id which is the sub owned.

severe peak
#

Ah, so based on getting a specific event you want the ability to trace back which price the subscription is subscribed to?

keen sundial
#

yep and drop a peice of meta data on the user via the webhook that tells auth what it need to do

#

(Based on rules we have set in auth)

severe peak
#

Which specific webhook event are you looking for?

keen sundial
#

Looking at the payload it would be the subscription create event.

#

This is the top portion of the Json

#

Hang on a sec, i'm looking that wrong Jload

#

Here it is: {
"id": "evt_1O2KrZEkm2lS5ri26jtSSSzD",
"object": "event",
"api_version": "2022-11-15",
"created": 1697578297,
"data": {
"object": {
"id": "sub_1O2KrVEkm2lS5ri2EAEUfUq9",
"object": "subscription",
"application": null,
"application_fee_percent": null,
"automatic_tax": {
"enabled": false

#

We need to configure our webhook to reach out and get the price_[string] which denotes the product

severe peak
#

Gotcha - so if you look at the full payload of that event you should see the price nested within items

keen sundial
#

Confused...give me a sec. Do you mean the create sub payload or the full playload put together by our webhook>

severe peak
#

The paylod for the webhook event

#

That event is a customer.subscription.created and in the payload it includes the whole subscription

keen sundial
#

The create payload as we get it now doesn't contain items

severe peak
#

You mean the response you get back from the API? Or a different webhook event?

keen sundial
#

oh geeze, your right I was looking at an update post

#

Ok I see it now in several places customer.subscription.created

#

Thank you. 🙂