I am creating a sales channel app in which we are using Checkout API.
Our requirement is that after authorizing (but not capturing/charging) the buyer's credit card during checkout, we need to hold the variant inventory (i.e. reduce the variant inventory by 1) for that buyer for up to 24 hours, until our campaign ends.
1) If the purchase is completed, the app will complete the order automatically and capture/charge the buyer’s credit card.
2) If the purchase is canceled, the app will cancel the credit card authorization and increment the inventory of variant automatically.
Note: I found a way where I can access store products and update the variant inventory by adding some additional codebase in my sales channel app. However, I am looking for a way where I don't add the burden of adjusting the inventory management system which is already managed by Shopify.
Does anyone have any tips or suggestions for how to do this? Thanks in advance.
I'm curious about this too, my guess is there is no mechanism built in and you will have to write your own logic like you already have using the InventoryLevel API endpoint: https://shopify.dev/docs/admin-api/rest/reference/inventory/inventorylevel