Can anyone help point me to where this error maybe coming from please…
Background I am following this great blog/article Learn How to Add Subscriptions and Protected Content With Stripe wow, helped me a lot and 99% there yet just getting an issue with Stripe webhook processing on subscription updates.
I am getting this error in Stripe “Webhook Error: Cannot read property ‘split’ of null”
Stripe support says it must the code thats receiving the webhook and what are they splitting on.
On searching on demo source code it maybe looks to be around this area in handle-subscription-change.js “maybe”:
// take the first word of the plan name and use it as the role
const plan = subscription.items.data.plan.nickname;
const role = plan.split(’ ').toLowerCase();
Can anyone help me out with why Stripe is posting the “400 (Bad Request)” to any subscription updates please.
Thank you and appreciate any help