#mathankumar-webhooks

1 messages · Page 1 of 1 (latest)

fresh valve
wet steppe
#

but in local how can i check payments?

fresh valve
#

what are you looking to check for payments?

wet steppe
#

I need to update the current start and end period to my product db when subscription renewal happens!

fresh valve
#

you could look at the customer.subscription.updated event for the new start and end period

wet steppe
#

and also how can i stop loop in webhook?

fresh valve
#

what loop are you referring to?

wet steppe
#

I made a customer.subscription.updated webhook event, when I updated the subscription from my product and I received data from webhook that's my problem!

#

i just need that event when i change something in stripe not from my product

fresh valve
#

i'm sorry but i'm not able to understand what's the issue you're facing and what you're trying to achieve here. Maybe try rephrasing to explain in detail :

  1. the data / information that you need
  2. what you're seeing currently
  3. what you expect to happen instead
wet steppe
#

For example, I made a customer.subscription.updated webhook event for getting data if any changes happen in stripe website not stripe API changes from my product (ex :- changing subscription from my product using stripe API)

#

if straightly changing some data in stripe I want that event that's all not API changes !

fresh valve
#

to clarify, you want the customer.subscription.updated event to only be sent if the change originates from the Stripe Dashboard?

wet steppe
#

?

fresh valve
#

to rephrase - do you want only want the customer.subscription.updated event to be sent to your server if the change originates from your website or the Stripe Dashboard?

wet steppe
#

the Stripe Dashboard !

fresh valve
#

ah i see, so unfortunately there's no way to trigger webhooks only upon changes from the Stripe Dashboard. Typically webhooks are meant to be used to notify you when a change happens anywhere (and not from a specific origin such as only the API or only the Dashboard)

wet steppe
#

so its works like a loop!

fresh valve
#

i'm not seeing how it works like a loop?

wet steppe
#

For example, if I change the plan using stripe API, and also I received that changes form webhook ?

#

So what i do?

fresh valve
#

then you would update your database accordingly as well

wet steppe
#

I updated its not a problem if I change a plan i made my own logic but its problem if the plan renewal happen there are same plan id how can do my logic?

fresh valve
#

i'm guessing that you're updating your database when you receive a response from a API request that you've made as well.
Some options :

  • make updates to your database only based on the webhook events.
  • you can also make a comparison when receiving the webhook i.e. is there any difference for a particular piece of data? If the datetime when that particular field is last updated is very close to when you received the webhook event (and the values are different), you would retrieve the object and then update that field with the response. Otherwise, of the the datetime when that particular field is last updated is earlier than when you receive the webhook event, then update that field based on the value in the webhook event
wet steppe
#

Okay, it's helpful...!