#chetan.orahi
1 messages · Page 1 of 1 (latest)
Hello chetan.orahi, 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.
• chetan.orahi, 3 hours ago, 9 messages
hi, what's the question exactly?
I dig up little bit into my code and the webhooks.
in_1O1m2dAIETFv7HjWNbI5bP8C
Here's the invoice id.
customer.subscription.created
upon getting this event we use
\Stripe\Subscription::update(
$data->id,
[
'metadata' => [
'subscriptionId' => $subscription->id,
],
]
);
this is our locally created id. But, it likes upon renewal and in some cases this event is not coming. Due to which we are unable to set the id.
So, when we receive customer.subscription.updated
```json
"metadata": {
"transactionId": "",
"trialPeriodDays": "0",
"userId": ""
}
We are not getting that key here.
not sure I follow. You're saying you update the subscription and a customer.subscription.updated webhook event did not get called?
or you're saying that there is no subscriptionID in the metadata? well then what I would say is that the value of $subscription->id in 'subscriptionId' => $subscription->id, must be null, so you should debug that
I also don't understand why you'd put the subscription's own ID into metadata, you can get the ID directly 😅
That is primary key of our subscription table.
The thing is probably either this stripe's update api is not working or I am not getting these customer.subscription.created webhook event
if you look at https://dashboard.stripe.com/subscriptions/sub_1O1m2dAIETFv7HjWoBn9L1ng you can see customer.subscription.created was created and sent and you recieved it (https://dashboard.stripe.com/events/evt_1O1m2fAIETFv7HjWDyZtTcwo) , but there is no log of you sending an update request
so presumably there is a bug in your code and the code you shared earlier never actually happened and make that call
It is not always happening. It is happening only sometime. Mainly on the renewals.
Hi! I'm taking over from my colleague. Please, give me a moment to catch up.
I am not sure I am following what's the exact problem. Could you please share an example update Request ID req_xxx? https://support.stripe.com/questions/finding-the-id-for-an-api-request
What's $data->id?
Are you with me?