#strike_dev_

1 messages · Page 1 of 1 (latest)

wet viperBOT
#

Hello! 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.

north jetty
#

Hi, let me help you with this.

#

What's exactly the challenge?

sturdy vapor
#

I don't know how to check subscription status with webhooks

#

And I want to upadate my database (subscription_status column) with webhooks from stripe.

#

I can provide my webhook code if you want to?

north jetty
#

The webhook notifications related to Subscriptions, e.g. subscription.created will have the Subscription in it's payload. You can check the status there.

sturdy vapor
#

Okay ty, but how do I retrieve the status from the webhook?

wet viperBOT
north jetty
#

event.data.object.status will contain the status.

sturdy vapor
#

So when the case is "subscription.created" i need to update the status like this right? js switch (event.type) { case 'subscription.created': UpdateDb(..........., event.data.object.status)

#

or do I need to do it with any other cases as well?

hexed moss