I'm working on an headless e-commerce that uses Shopify Buy SDK to generate a cart.
I'm trying to create two different kinds of cart: one is a regular cart where all products are paid at full price, the other asks the user to pay only a deposit on the products for which this option is available.
The deposit logic is implemented via the Shopify Script Editor App but in there, there is no way to identify what kind of cart the user is currently in. I've tried to pass customAttributes to the cart itself or query parameters to the checkout url but I have no idea how to access either of the two within the app
I don't think I fully understand your use case, but in general I understand custom properties / attributes are thought to be shown in the shop cart and the shop admin order page. They are even deletable by shop operation personal.
I would suggest to use a Order Metafield instead. This way more suited for programmatic access and use.