Skip to content

A collection of examples to demonstrate how to use the trustshare api

Notifications You must be signed in to change notification settings

trustshare/examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation




Example Integrations
Simple borderless payments infrastructure for marketplaces.
Embedded fintech done right - whether that's escrow, credit, banking or payments.
Design your payment flow with our borderless API.

Home | Documentation | Dashboard

📖 Documentation

See our in-depth documentation to learn more about how you can integrate with our platform.

🚀 Quick start

Open in StackBlitz

To make the most of these examples, you will need to sign up or log in to the dashboard to acquire a private API key used to instantiate the API client. You can use our handy getting started guide that describes setting up your organisation on the dashboard.

This repository comprises multiple examples of integration approaches for specific use-cases of the trustshare API. To get started, clone the repository and use yarn to install the required dependencies:

yarn

N.B. This repository leverages yarn workspaces. All commands should be run from the root.

🌳 Environment Variables

Each example needs your trustshare API keys to run.

Rename the .env.example.js file to .env.js and fill in the API keys for the string values.

This file is used to load each projects environment with your API keys.

👨🏽‍🍳 Recipes

The following recipes provide a glimpse into simple integrations using the trustshare API. For more in-depth support please refer to your Slack developer support channel.

🛒 Basic Checkout

The basic checkout example sets up a payment intent on the server side. The intent is then consumed by the client to open the trustshare checkout. It uses an example of a shopping cart, where items are passed in to the intent.

View Example

🔗 Payment Link

A payment link Payment Intent provisions a short, shareable link that can be used to direct your users to pay. It offers the same settlement mechanism as other Payment Intents and therefore can describe a checkout to many sellers from a single buyer.

View Example

🧾 Invoice

An invoice Payment Intent provisions an invoice, to be fulfilled now or in the future. It offers the same mechanism to describe settlements to multiple sellers from a single buyer.

An invoice Payment Intent requires a "controlled" Project to be created up front via the Create Project endpoint. You can find more information on Projects here

An invoice intent still requires confirmation by a user via the Client SDK, however no UI will be displayed to the user. Here, we show an example of how an invoice can be handled by once it has been created.

View Example

📱 React Native

The expo example shows an integration path for React Native users. The example uses our package @trustshare/react-native-sdk as a convenient way to implement a checkout or verification flow.

View Example

🙋‍♂️ Verification

The verification example creates a verification for a user. trustshare offers facilities for verifying the identities and carrying out due diligence on customers which transact on the platform.

View Example

👨‍👩‍👧 Multiple Participants In a Single Project

The system allows you to take control of projects by creating them up front. These are known as 'controlled' project. This example shows how a controlled project can be used to define a payment flow with multiple participants all paying into the same project.

Controlled project are very powerful and unlock many different flows. For example, you could issue a Project for a repeat buyer on your system so they have a consistent set of account credentials to pay into.

View Example

➡️ Direct Checkout

A direct checkout facilitates a payment between 2 parties. The example sets up a direct checkout. No server side intent is needed for direct checkouts.

View Example

About

A collection of examples to demonstrate how to use the trustshare api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published