Re: Testing payments in development store does not trigger Orders Paid webhook event

Solved

Testing payments in development store does not trigger Orders Paid webhook event

glenxkiE
Shopify Partner
2 1 0

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:
glenxkiE_0-1691065423393.png

 

My endpoint code: Just logging the webhook data I received (if ever I received it) and return a response code 200 OK

glenxkiE_1-1691066457768.png

 



 

Accepted Solution (1)

glenxkiE
Shopify Partner
2 1 0

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

 

glenxkiE_1-1691110686563.png

 

To trigger the orders/paid event you just need to click Capture payment button

glenxkiE_2-1691110764893.png

 

 

View solution in original post

Reply 1 (1)

glenxkiE
Shopify Partner
2 1 0

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

 

glenxkiE_1-1691110686563.png

 

To trigger the orders/paid event you just need to click Capture payment button

glenxkiE_2-1691110764893.png