#chetan.orahi

1 messages · Page 1 of 1 (latest)

cedar crystalBOT
#

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

deft dock
#

hi, what's the question exactly?

frozen panther
#

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.
deft dock
#

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 😅

frozen panther
deft dock
#

so presumably there is a bug in your code and the code you shared earlier never actually happened and make that call

frozen panther
deep grove
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

#

What's $data->id?

deep grove
#

Are you with me?