in

stripe subscription code not giving error when card having insufficient fund


i am facing a issue with custom stripe subscription code. My issue is like when a card having insufficient fund then stripe subscription code is not giving me any error.

My code is this.

StripeCharge::create ([
            "amount" => $amt * 100,
            "currency" => "usd",
            "source" => $request->stripeToken,
            "description" => $description

    ]);
        $customer = StripeCustomer::create(array(
            'email' => $emailid,
            'source'  => $request->stripeToken,
           // 'description' =>  $description
        ));

        $plan = StripePlan::retrieve(
            $priceid,
            []
        );

        StripeSubscription::create(array(
            "customer" => $customer->id,
            "items" => array(
                array(
                    "plan" => $plan->id,
                ),
            ),
        ));



Source: https://stackoverflow.com/questions/70606158/stripe-subscription-code-not-giving-error-when-card-having-insufficient-fund

Becoming a Better Tech Leader with Coaching

WhatsApp Releases Two New Notifications Related Features for iOS Devices