how to get the subscription id from a session stripe
$stripe = new \Stripe\StripeClient(YOURSTRIPE_SECRETKEY);
$stripe_customer = $stripe->customers->retrieve($payerid, [ 'expand' => ['subscriptions'] ]);
$stripe_status = $stripe_customer->subscriptions->data[0]->status;