Thank you @dmytro_bondarev for the reply in topic #2364. That topic is closed, so I am clarifying the remaining question here.
We understand your explanation of the Merchant API /api/order/{id}/refund. We need the contract for the opposite HTTP direction, at the endpoint configured under Payment processors → Custom → Refund URL:
Staff clicks Refund in SBPay Payments → SBPay calls OUR configured Refund URL → our server refunds the original Stripe/PayPay payment → our server sends an HTTP response BACK TO SBPay.
We are implementing the server receiving that callback. Could you please confirm:
- Our response to SBPay: Which exact HTTP status, Content-Type and body must OUR server return for success, failure and a provider refund still pending? Is an empty 200 or 204 accepted for this callback, or is a specific JSON body required? Please provide a synthetic callback request/response example, including its request method and Content-Type.
- Transport: Does SBPay follow the HTTP redirect from a Google Apps Script ContentService endpoint to
script.googleusercontent.comand evaluate its final response? What is the callback timeout, and does SBPay automatically retry after a timeout/lost response? - Recording the same refund: Does accepting our callback response automatically update the SBPay order and SimplyBook invoice? If Stripe completes later, what supported call records that same refund without invoking our Refund URL again? Please state if asynchronous completion is unsupported.
The empty response from the Merchant API in your previous answer does not by itself specify what our callback server must return. A callback handler example or a link to that exact contract would be sufficient.
This is a documentation question only. Please do not change any account or perform a refund. No live identifiers or secrets are needed. Thank you.