Integration Methods

There are two methods of integrating and access the Vesicash escrow Service.

Using the Vesicash Widget

General Setup

Add the script below to your website.

<script src=”https://vesicash.com/widget/index.js”></script>

Creating Transaction

Add a button like below on the page(on your website) where you want your users to start creating escrow transactions:

<button onclick=”yourOwnMethod()”>Create Escrow Transaction</button>

Also add the following script to your web app. The Vesicash widget will be called by the yourOwnMethod() you declared.

<script>
function yourOwnMethod(){
initiateEscrowTransaction({
access_token: "<YOUR ACCESS TOKEN>",
sender_firstname: "<optional>",
sender_lastname: "<optional>",
sender_email: "<optional>",
sender_phone: "<optional>",
recipient_firstname: "<optional>",
recipient_lastname: "<optional>",
recipient_email: "<optional>",
recipient_phone: "<optional>",
redirect_url: "<compulsory>",
});
}
</script>

Getting Transaction

In order to allow your customers to access their transactions from the widget, add a button like below on your dashboard where you want your users to access their escrow transactions.

<button onclick=”yourGetTransactionsMethod()”>See Escrow Transactions</button>

Note: You have to passuser_email to the following fetchTransactions() method.

<script>
function yourGetTransactionsMethod(){
fetchTransactions({
access_token: "<YOUR ACCESS TOKEN>",
user_email: "<compulsory>",
});
}
</script>

Using the Vesicash API endpoints directly

Subsequent parts of this documentation details everything you need to use the API endpoints directly.