In my application, when a user signs up, a customer is created in stripe
. A subscription is also created for that customer on trial basis. When that trial period ends, the customer is charged. I have a web-hook
for events happening in stripe so whenever charge.succeeded
occurs, I make some changes in my database. I need to retrieve the customer id form the event object that is posted
from the stripe. and I am doing it like this:
$stripeCustomerId = $event->customer;
Now when I checked in stripe dashboard, everything is fine, customer status is changed from trialing to active, and the web-hook returns the object fine. But I am unable to get customer id from that object. What am I missing here? Any help?