Webhook Overview

Introduction

TransactAPI has webhooks which help you get notifications when TransactAPI methods respond with success. By using these webhooks, this alleviates the need to request a "get" method continuously to check on a status.

What is an webhook?

A webhook (also called a web callback or HTTP push API) is a way to exchange real-time information and updates automatically within two systems. Webhooks receive calls through HTTP POST requests only when the connected external system has a data update. APIs will place calls for data whether there's been a data update response, or not. This makes webhooks much more efficient for both provider and consumer. While webhooks are an effective tool, they require an Internet connection between the data source and the web server to function. Additionally, a script must be present on the server at the destination URL and it must be able to recognize and parse the POST data. If the Internet connection or script is not available, the webhook will not work.

Step to create webhook and notification

1) Add the script URL in your admin panel under webhook menu in the dashboard for a particular API method. You can enable/disable notifications to be sent through email and SMS.
Screenshot
2) Add notification and add email and/or SMS notification in your admin panel under notification list menu in the dashboard.
Screenshot

Sample Code

                                                                                if ($conn->connect_error) {
                                                                                    die("Connection failed: " . $conn->connect_error);
                                                                                }
                                                                                if (isset($_POST['partyId'])) {
                                                                                    $partyId = $_POST['partyId'];
                                                                                    $offeringId = $_POST['offeringId'];
                                                                                    $orderStatus = $_POST['orderStatus'];

                                                                                    $insert = mysqli_query($conn, "INSERT INTO checkworld (partyId,offeringId,orderStatus) VALUES ('$partyId','$offeringId','$orderStatus')") 
                                                                                              or die(mysqli_error($conn));
                                                                                    print_r($insert);
                                                                                }
                                

Webhook Method List

Method Description
cancelOffering This webhook is triggered when an offering is cancelled via \"cancelOffering\" method.
closeOffering This webhook is triggered when an offering is closed via the \"closeOffering\" method.
createAccount
createLink This webhook is triggered when a link is created.
createMaaSUser This webhook is triggered when a new user is created in the Marketplace-as-a-Service (MaaS) platform.
createParty
createTrade
deleteExternalAccount This webhook is triggered when a linked bank account has been deleted from the associated account.
deleteLink This webhook is triggered when a link is deleted.
deleteOffering This webhook is triggered when an offering has been deleted via the \"deleteOffering\" method.
deleteTrade This webhook is triggered when a previously created trade is deleted (trade status is updated to “CANCELED”).
editTrade This webhook is triggered when trade information has been edited via the \"editTrade\" method.
externalFundMove
getAccount
requestAiVerification This webhook is triggered when Accredited Investor Verification is requested for an Investor’s account in TransactAPI.
updateAccount
updateAccountArchiveStatus
updateAiRequest
updateAiVerification
updateCCFundMoveStatus
updateDocuSignStatus
updateEntity
updateExternalAccount This webhook is triggered when an external bank account is updated.
updateExternalFundMoveStatus
updateKycAml This webhook is triggered when the KYC/AML questions have been answered and the \"updateKycAml\" method has been invoked.
updateMaaSUser This webhook is triggered when updates to the Marketplace-as-a-Service user have been updated.
updateParty
updatePartyEntityArchivestatus This webhook is triggered when a party is archived.
updateTrade This webhook is triggered when a trade is updated.
updateTradeArchivestatus This webhook is triggered when a party is archived.
updateTradeDocArchivestatus This webhook is triggered when a document for a trade is archived.
updateTradeStatus This webhook is triggered when the trade status has been updated.
updateTradeTransactionType
updateNdaDocuSignStatus This webhook is triggered when the NDA Docusign signature status has been updated.
uploadAccountDocument This webhook is triggered when a document is uploaded and attached to an account.
uploadPartyDocument This webhook is triggered when a document is uploaded and attached to a party.
uploadTradeDocument This webhook is triggered when a document is uploaded and attached to a trade ID.
uploadVerificationDocument This webhook is triggered when a document is uploaded for accreditation verification.