Skip to main content

Client-side Installation & Usage

Installation#

Add Connect to your project like this:

index.html
<script src="https://checkout.sendcashpay.com/lib/lib.bundle.js"></script>

Usage#

To initialise Connect:#

SendcashPay.init({    siteName: "<your site or app name>",    siteUrl: "<your site url>",    siteLogo: "<url to your logo>",    publicKey: "<your Sendcash Pay public key>"})

Displaying the Connect pop-up#

const result = await SendcashPay.connect({    userId: "<a unique identifier for your user>"})

Response#

After your user is done linking their financial account(s), result will contain information about the accounts connected. Here's an example:

{  "data": {    "connectUserBank": {      "id": "<your user's unique id>",       "username": "12345678900",      "slug": "zenith",      "bankLoginConnection": [        {          "accountNumber": "12345678900",          "balance": "17775.85"        }      ]    }  }}

Next steps#

In the next section(s) we'll cover all the server side APIs you can use to get balance & transaction data or to initiate a bank transfer on behalf of your user.