I am struggling for this for two days, I want to differentiate between subscription assignment and manually deducting the charge from Stripe. charge.succeeded webhook is called both times. In webhook call, I need to differentiate between Subscription assignment and Charge deduction for a particular amount.
Subscription Assignment is using below code.
$subscription = \Stripe\Subscription::create(array(
"customer" => $customer_id,
"plan" => $stripe_plan_id,
));
And charge deduction is using below code.
$charge = \Stripe\Charge::create(array(
'amount' => $price ,
'currency' => 'usd',
'customer' => $customer_id
)
);
If anyone has any idea please suggest the way. Thank you !!