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:
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?

Thanks for any help in advance.

@Teodor could you give some guidance on this topic? Thanks.

Please check:

Now you can join the query results and the data store results and use the joined set as line items.

1 Like

Thanks @teodor, although I used the currently available custom checkout form in the end, which suits even better in this case and makes the use of this suggested method unnecessary. Thanks anyway :+1: