How can I hold product variant inventory after authorizing buyer credit card using Checkout API?

zerrick
Shopify Partner
16 0 5

I am creating a sales channel app in which we are using Checkout API.
https://shopify.dev/docs/admin-api/rest/reference/sales-channels/checkout

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.

Replies 2 (2)

policenauts
Shopify Partner
206 10 66

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

zerrick
Shopify Partner
16 0 5

@policenauts unfortunately I don't have any more firm answers than when I submitted the original ticket. We're still searching for the best solution.