Looking at the stripe docs for embedded checkout you can return the session ID in an url param after the checkout completes:
Then setup the redirect URL, which will be loaded after a successful or cancelled payment. You can see that it contains the dynamic {CHECKOUT_SESSION_ID} which is the Checkout Session ID:
Yes. I know. But I wanted to do it solely on the server side without the passing of params from a return URL. My question was not precise enough.
I actually found a way:
While looking at the server logs, the session id is already being generated.
You can retrieve it form the Create Checkout Session as a binding:
Maybe you could put the retrieve all checkout sessions action sorted by last created right after the Create Checkout action then get the id of the first record from there?
No no. It does work now! I just had to select the 'id' binding from the 'Create Checkout Session'! That's how I can gather the session_id even before the checkout is completed.