Payout Webhooks

Payout webhooks are sent to your server via the payout webhook url specified on your dashboard. As soon as a transfer is confirmed Marasoft Pay sends you a webhook that contains all the data for that transfer.


How to Integrate

1. Set up your server for receiving webhooks

Code Sample
    <?php

    // Retrieve the request's body and parse it as JSON
        $input = @file_get_contents("php://input");
        $event = json_decode($input);

    // Do something with $event
        http_response_code(200); // PHP 5.4 or greater
    ?>
    // Using Express
        app.post("/my/webhook/url", function(req, res) {

    // Retrieve the request's body
        var event = req.body;

    // Do something with event
        res.send(200);
    });

2. Set the payout webhook url on your dashboard to the endpoint that was set up


3. Sample response for payout webhooks

Sample Response
{
    "beneficiary_account_number": "0230926956", 
    "transfer_amount": "1000", 
    "transfer_reference": "ref_FEBKWMKFYZ4", 
    "status": "success", 
    "created_at":"2022-05-16 09:48:36"
}