We’ve now added support for Webhook call back. This means you can set a notification URL to be notified of a transaction status change. What is a Webhook? A WebHook is an HTTP callback: an HTTP POST that occurs when something happens; a simple event-notification via HTTP POST. A web application implementing WebHooks will POST a message to a URL when certain things happen.
How it works
Under Settings in the right hand menu, there is now a place to enter your call back URL. This should be a publicly accessible URL that can accept a POST. For testing we suggest Requestb.in. The payload is a Form format and looks like this:
We fire the POST any time we have status change, which will either be from Pending to Success or Pending to Failed. They payload contains the:
- Amount – Thai Baht amount
- Order ID – Match with your topup request
- Status – Failed or Success
The major benefit here is not having to poll the server to see if a request has been completed. The webhook will fire on that event, letting your URL know about the status change.