Link to deployed version of this app
Embedded Finance allows you to add a full range of finance features to your online experience. This showcase is a collection of code samples highlighting how to connect and use Embedded Finance APIs.
You can:
- Spin-up a sample application with UI that demonstrates the main use case for each endpoint. For example, making a transaction.
- Explore the API resources using a Postman Collection.
- Register as a developer and use the showcase application to send requests to live endpoints in our external UAT environment. You must set up SSL authentication for this option.
There are three main directories for you to access:
/app
for the showcase UI and server experience./postman
for the Postman Collection./embedded-finance-sdk
for the Embedded Finance SDK/emddeded-components
for the Embedded UI Components
A TS/JS application with a client and server used to demonstrate how to integrate with our APIs on frontend applications.
All your actions on this application are served by mock data included in the app codebase.
Get straight to the API endpoints in action, make calls and see responses. To use the Postman collection, import the collection file to Postman and follow the included setup instructions to access all possible calls to the Embedded Finance API. You will need certificates to run these calls.
Embedded Finance SDK provides a set of tools to validate payment data based on the given country, handle complex conditional logic, and ensure a smooth implementation of UI. Currently published to NPM as @jpmorgan-payments/embedded-finance-sdk
This is the core UI application written in TS/JS with the React framework. This application illustrates the various capabilities of Embedded Finance, using mocked responses stored within the codebase.
Such capabilities include:
- Making payments.
- Requesting a debit card.
- Adding a recipient. A recipient is someone you can make a payment to.
- Checking an account balance.
- Authenticating with ForgeRock using forgerock-javascript-sdk
- To test this locally, you will need to define
VITE_FR_URL
andVITE_FR_CLIENT
in./app/client/.env
- To test this locally, you will need to define
Check out the features directory to explore the the components and hooks that explore these features.
If you would like to hit the API's using your own credentials you will need to run this codebase following the instructions within the readme. This code allows you to hit J.P. Morgan UAT APIs.
Install and run a TS/JS application with a client and server used to demonstrate how to integrate with our APIs on frontend applications.
This example requires Yarn.
To start our client code with mocked responses:
-
Clone this repo
-
Install the
client
folder:
cd app
cd client
yarn install
- Start the UI:
yarn start
- Open a browser and navigate to the locally deployed app using the URL provided in the command line. Usually
localhost:3000
.
You have deployed the showcase Embedded Finance app. Follow the onscreen instructions to explore the finance functionality available.
If you are interested in going further with Embedded Finance APIs, you can join the developer community at J.P. Morgan, and get access to the UAT environment.
This process can take a few days, and in order to make calls to the UAT, you must provide some SSL certificates.
To register as a developer with J.P. Morgan's APIs, visit developer.payments.jpmorgan.com.
Once you have completed onboarding, and you have the correct certificate files ready, you can upload them to your server.
Warning Do not commit certificate files to your codebase. They must be stored on your server.
- Create a folder called, for example,
certs
that is included in.gitignore
. - Add your certificate files in the new folder.
- Open
server.js
and check that the below lines match where your certs are:
agent: new https.Agent({
key: fs.readFileSync('certs/jpmc.key'),
cert: fs.readFileSync('certs/jpmc.crt'),
passphrase: process.env.PASSPHRASE,
rejectUnauthorized: false,
}),
- If your SSL certs have a passphrase create a
.env.local
file and include it here, otherwise delete this line. - Inside your Embedded Finance project, run:
cd server
yarn install
yarn start
You can now send API calls to the Embedded Finance CAT environment.