For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
Hello everyone,
I'm working on customizing the checkout process in Shopify to integrate customer credits from Vista. co. The goal is to make an API call to redeem credits when the customer clicks the "Complete Order" button, ensuring the order is not created if the API response is false due to potential downtimes or errors.
I've implemented this using the Checkout UI extension (mention specific technology or library, e.g., React), but I'm struggling to trigger the API call properly at the correct checkout step. I’ve tried using useBuyerJourney() without success.
Can anyone help identify how to trigger this API call only at the 'Complete Order' step? I would greatly appreciate any specific insights, code snippets, or examples of managing API calls during this checkout stage.
Thank you for any assistance you can provide!
Have you considered using useBuyerJourneyCompleted()? This hook indicates when the buyer has successfully submitted their order. You can utilize it to trigger your API call at the right moment, specifically when the order is being completed.