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
closeOffering
createAccount
createLink
createMaaSUser
createParty This webhook is triggered when a new party is created.
createTrade
deleteExternalAccount
deleteLink
deleteOffering
deleteTrade This webhook is triggered when a previously created trade is deleted (trade status is updated to “CANCELED”).
editTrade
externalFundMove
getAccount
requestAiVerification This webhook is triggered when Accredited Investor Verification is requested for an Investor’s account in TransactAPI.
updateAccount
updateAccountArchiveStatus
updateAiRequest This webhook is triggered when the Accreditation Verification request status has been updated. (Ex: From ‘Need More Info’ to ‘New Info Added’) This method is used when new information has been uploaded to the request.
updateAiVerification This webhook is triggered when the Accreditation Verification status has been updated. (Ex: From ‘ Pending’ to ‘Need More Info’)
updateCCFundMoveStatus
updateDocuSignStatus This webhook is triggered when the eSign status for a subscription document has been updated (Ex: ‘Out for Signature’ to ‘Signed’).
updateEntity
updateExternalAccount This webhook is triggered when an update external account is updated.
updateExternalFundMoveStatus This webhook is triggered when the Transaction Status for ACH is updated. (Ex: From ‘Pending’ to Submitted’)
updateKycAml
updateMaaSUser
updateParty This webhook is triggered when a party is updated.
updatePartyEntityArchivestatus
updateTrade
updateTradeArchivestatus
updateTradeDocArchivestatus
updateTradestatus
updateTradeTransactionType
updateNdaDocuSignStatus
uploadAccountDocument
uploadPartyDocument
uploadTradeDocument
uploadVerificationDocument