An example LiveChat Agent App Extension that offers in-app payment using Billing API.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
public
readme_assets
src
.gitignore
README.md
package.json
yarn.lock

README.md

An example LiveChat Agent App Widget using LiveChat Billing API to offer in-app payment.

The app shows current weather in website visitor's location. It also offers a payment of $1.25 for an additional feature: displaying the icon of the current weather.

Installation

yarn install
yarn start

How to use

This app is an Agent App Widget.

It cannot be opened directly in the browser window. It must be installed on your LiveChat account and loaded inside LiveChat agent app.

To do this:

  • Create new app in LiveChat Developers Console. Choose "Web app" as an app type.
  • In Authorization page, enter the address your app will be deployed to ("Redirect URI whitelist" field). For example: https://my-company.com/livechat-widget/
  • Copy the values of "Client Id" and "Redirect URI whitelist" to your app's config files (available in /src/config/ directory).
  • Check "offer in-app payments" scope from the "Access scopes" list.
  • In Building Blocks, enter your "Widget source URL" for Agent App Widgets feature. It should be the same as previous "Redirect URI whitelist" value, for example: https://my-company.com/livechat-widget/
  • Finally, in "Private installation", install the app on your LiveChat account.

From now on, when you sign in to LiveChat agent app, you will see a new widget loaded in the right sidebar. This is your app!

Once your app is ready, you can offer it in the LiveChat Marketplace to all LiveChat customers. You can do this in the Distribution page in LiveChat Developers Console.

Tech stack

React (via create-react-app)