Send quantity and dynamic succes url to Stripe

Following up on Teodor’s tutorial on Stripe checkout with custom products:

How can I send the right quantity to Stripe? I tried to get it through the query, although I am quite sure that doesn’t make sense because it’s stored in the data store instead of the products db table:
image
How can I get the quantity value from the lineItems array per line and pass it on to stripe?

Also I would like to know how to set the success_url (if set in AC Stripe element as dynamic attribute)
as a dynamic value to the SC Create Checkout Session? I tried using a variable calles succes_url (see screenshots below), but that didn’t work. What’s the right variable name to use in the SC for this dynamic attribute?
image
image

Thanks for any help in advance.

Community Page
Last updated: