Payment Callback (Webhook)
MugglePay can send webhook events that notify your application any time order status has been paid.
Depending on how you fulfill your payment, you will be informed about the status changes after the payment has been authenticated. You might also use webhooks as the basis to:
Update a customer’s membership record in your database when a subscription payment succeeds
Email a customer when a subscription payment fails
Log an accounting entry when a transfer is paid
This is the ONLY thing needed on the backend to keep track of the Payment status.
Request
Callback data is sent in POST method.
Content-Type: application/json
Authentication will be the token provided in CreateOrder.
MugglePay sends payment notification while your application returns response 200 (OK) HTTP status code. You should respond in json format with content:
Pay attention to
token
. Thetoken
sent in the body, is provided by merchants. Merchants will use it to validate the callback request (to prevent fraud attemps callbacks).
Example
Data Structure
Retry Time
The MugglePay server attempts to send callbacks multiple times until the send is either successful or the MugglePay server gives up. The MugglePay server attempts retries using an exponential back on the following schedule:
1-minute delay
2-minute delay
4-minute delay
8-minute delay
16-minute delay
32-minute delay
64-minute delay
128-minute delay
256-minute delay
Retry attempt times double for up to 3 days
Last updated