Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
Hi Shopify Team,
Is it possible to cancel or deny checkout (using ShopifyAPI), after customer passed checkout. And prevent payment process.
F.e. if customer has Fraud tag.
Thanks,
Alex
Hi @Alex_Beacon,
Nick here from Shopify.
Great question. While it's not possible to directly prevent a payment after the customer has gone through the checkout process, there are a couple of workarounds to help prevent this or modify it after a customer has checked out. Let's take a look at them below:
Hopefully, this helps!
All the best, Nick
To learn more visit the Shopify Help Center or the Community Blog.
Hey Nick,
Thanks for your response! I'm a developer of the app, and I want to Merchant who will use my app to be able to cancel the order if Customer has some tag. And my system will do it automatically.
I can cancel the order after webhook for "orders_create" were triggerd and using ShopifyAPI to cancel the order.
But how can I refund the order? Cause Shopify API documenation says that I need to specify the location_id of the items that were in that order.
So how can I get these location_ids ? Or can I refund the order without location id?
Thanks,
Alex
Hey @Alex_Beacon,
No problem at all. I understand what you're asking but I am not comfortable with direct API related questions personally. I did, however, discover you do need to have the location_ids of the items in the order to issue a refund from within an app.
From looking into this further, this is because of the multi-location inventory. If your app is to comply with multi-location inventory it must include the location_ids which you can read more about here.
Hopefully, this at least gives you more information as to why this might be.
To learn more visit the Shopify Help Center or the Community Blog.
Thanks!
Probably I should create topic about getting location_ids of the items in the order!
No problem at all. Yes, that makes sense to create a topic more specific to exactly this and going into detail of it.
Hopefully, someone with more knowledge than myself will see it and be able to add value for you.
To learn more visit the Shopify Help Center or the Community Blog.
Arigato can also cancel high-risk orders, FYI. 🙂
Here's a workflow for cancelling high-risk orders
And one for blocking problematic IP addresses