Development discussions around Shopify APIs
1) Shopify send refund request to my refund endpoit
2) Gateway does the refund
3) If everything went well send response to Shopify's callback url with completed status
4) Return with 200 OK
From user point of view, it will say "Refunded 0.0" and only after a refresh is made to a page it will say that refund was successful. Why is this happening?
Up please! Need solution.
Up please
Hey, still need a solution. Could someone from Shopify staff give their input please.
Hey @martabel.
If you're only performing the asynchronous callback, the flash notification in the bottom of the screen will say that $0.00 was refunded, because Shopify doesn't know yet that you've confirmed any refund amount as a gateway based on the response your gateway sent.
When you receive a refund request, you are expected to both respond with response values under a 200 status, and perform an asynchronous callback with those same response values (just in case something happened preventing your initial response from making it to Shopify).
Does this make sense? Hope it helps.
Cheers.
Alex | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
So I need to response to Shopify request with the same values I send to async callback and this would fix it?
Shopify sends a POST JSON request to your refund url with the Request Values.
Note
Your server must reply with a 200 HTTP OK or the order will be canceled.
This is really unclear. It states I should send 200 HTTP ok and then callback. Also there is no format here, what format should I use etc.
I sent the values as JSON and as Form values both ways did not work. Still says 0.0 euros. Callback should be after the return ?
@martabel wrote:Shopify sends a POST JSON request to your refund url with the Request Values.
Note
Your server must reply with a 200 HTTP OK or the order will be canceled.
This is really unclear. It states I should send 200 HTTP ok and then callback. Also there is no format here, what format should I use etc.
I agree that the docs are not as clear as they can be, for sure. In my experience, sending the async callback after responding with a 200 status (with the same JSON) has been successful.
If you give me a shop, API key, and a recent time frame, I can check logs and see what might be happening.
Cheers.
Alex | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi,
We still have the same issue, we succeed to do the callback request, but the flash notification still showing "Refund 0.00".
We responding 200 ok, and after this doing the callback.
What are we missing ?
Looking forward to your quick reply
Hello @martabel
How are you ?!
Did you succeed to update the flash notification during refund with callback request ?
Thank you, have a good day
Photo by Marco Verch Sales channels on Shopify are various platforms where you can sell...
By Ollie May 25, 2023Summary of EventsBeginning in January of 2023, some merchants reported seeing a large amo...
By Trevor May 15, 2023With 2-Factor Authentication being required to use Shopify Payments, we’re here to help yo...
By Imogen Apr 26, 2023