Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

sarfaraz1212's avatar

The resource ID cannot be null or whitespace. Stripe Checkout

  $checkout_session = $stripe->checkout->sessions->create([
        'line_items'  => $lineItems,
        'mode'        => 'payment',
        'success_url' => route('checkout.success', true) ."?&session_id={CHECKOUT_SESSION_ID}",
        'cancel_url'  => route('checkout.cancel',true),
        ]);

"?&session_id={CHECKOUT_SESSION_ID}", if i use this to add the session ID in the url. I get the following error

The resource ID cannot be null or whitespace.

without adding the session id it work's fine. Maybe i am formatting it wrong?

0 likes
0 replies

Please or to participate in this conversation.