Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
Hi,
I successfully created a webhook subscription using Webhook Rest and Currently, I'm using the tunnel to test my Custom App in my localhost using ngrox (free version but with ngrox cloud edge which gives me a static URL)
I want to catch the Orders/Paid webhook event after a complete purchase (checkout) in my development store.
But I only received other webhook events like Orders/Updated and Product/Create. I tried a couple of times and no Orders/Paid sent to my ngrok endpoint/tunnel.
My Test flow is:
Development store > Select a product > Add to Cart > Go to Checkout Page > Enter shipping address > Select Shipping option > Continue to Payment > Enter Bogus Gateway Card > Click Pay > Then I received a Order #XXXX confirmed email
After a couple of tests using the flow above. I decided to try adding a webhook on the admin side:
Admin > Settings > Notifications > Webhook Section > Create Webhook > Save > Click Send tests notification > Then I received a test notification in my ngrok endpoint.
I wonder how orders/page is being triggered, and when and why is not being triggered within my full user flow tests
--------------------------------------------------------------------------------------------------------------------------------------------------
here's my subscription fetch from the subscriptions endpoint: GET: /admin/api/2023-04/webhooks.json
[
{ "id": 1084990259258,
"address": "https://f43e7c5d95e0-18104951948975261370.ngrok-free.app/api/Product/Create",
"topic": "products/create",
"createdAt": "2023-08-02T05:25:33+08:00",
"updateAt": "2023-08-02T05:25:33+08:00",
"format": "json",
"apiVersion": "2023-04" }, { "id": 1085029056570,
"address": "https://f43e7c5d95e0-18104951948975261370.ngrok-free.app/api/Order/Confirmed",
"topic": "orders/paid",
"createdAt": "2023-08-02T22:09:32+08:00",
"updateAt": "2023-08-02T22:09:32+08:00",
"format": "json",
"apiVersion": "2023-04" }, { "id": 1085086957626,
"address": "https://f43e7c5d95e0-18104951948975261370.ngrok-free.app/api/Order/Update",
"topic": "orders/updated", "createdAt": "2023-08-03T19:45:23+08:00",
"updateAt": "2023-08-03T19:45:23+08:00",
"format": "json",
"apiVersion": "2023-04" } ]
Ngrok running in my local machine:
My endpoint code: Just logging the webhook data I received (if ever I received it) and return a response code 200 OK
Solved! Go to the solution
This is an accepted solution.
I found the solution to this issue.
To make the orders/paid event fire up. You should check your Admin > Orders page (in my case, a lot of transactions I maid are just authorized and not yet paid that's why no orders/paid event was sent to my endpoint
To trigger the orders/paid event you just need to click Capture payment button
This is an accepted solution.
I found the solution to this issue.
To make the orders/paid event fire up. You should check your Admin > Orders page (in my case, a lot of transactions I maid are just authorized and not yet paid that's why no orders/paid event was sent to my endpoint
To trigger the orders/paid event you just need to click Capture payment button