Giter VIP home page Giter VIP logo

issuing-treasury's Introduction

Stripe Issuing and Treasury: An Embedded Finance starter application

This sample demonstrates a basic web application with embedded finance features built on Stripe’s Issuing and Treasury APIs.

Issuing and Treasury sample app card details screenshot

Demo

See the sample app live at https://baas.stripe.dev

If you choose not to skip onboarding with prefilled info, then follow these steps when redirected to the Stripe Connect Onboarding form:

  • Enter “000 000 0000” for phone number and any fake email address
  • Click “Use test code” when prompted for SMS verification
  • Click “Skip this step” when prompted to verify your identity

Features

  • Onboard and verify business customers 🔍
  • Issue cards 💳
  • Display full card numbers with PCI compliance 🔢
  • Create financial accounts 🏦
  • Simulate test payments ⚡
  • Review transactions 📃

For details of more features see the Issuing and Treasury sample app documentation.

Prerequisites

Deploy the web application on Render

You can immediately deploy this sample app to a unique, public URL (for example: https://issuing-treasury-xyz1.onrender.com) with no coding required by using Render.

Click the button below to get started:

Deploy to Render

Local development

You can also clone this repo and run it locally by following the steps below.

Clone the repo

Clone this repo and then run these steps inside it.

git clone https://github.com/stripe-samples/issuing-treasury.git && cd issuing-treasury

Node.js installation

Install the required Node.js runtime. You can install it directly from the Node.js website but we recommend using a Node version manager. Most version managers can read the required version off of .node-version and install it.

If you're using the nodenv Node version manager (setup instructions for nodenv), use:

nodenv install

If you're using the popular nvm Node version manager (setup instructions for Node Version Manager), use:

nvm install

Dependency installation

Once Node.js is installed and activated, install the application's dependencies using:

npm install

Environment variables file setup

Replicate .env.example as .env using:

cp .env.example .env

Update .env to reflect:

  • NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: Your Stripe publishable test mode API key (starts with pk_test_...).
  • STRIPE_SECRET_KEY: Your Stripe secret test mode API key (starts with sk_test_...).
  • NEXTAUTH_SECRET: For JWT encryption by NextAuth.js (learn more). Use openssl rand -base64 32 to obtain a new one.
  • NEXTAUTH_URL: Your application URL, for local use you can keep the default "http://localhost:3000".
  • CONNECT_ONBOARDING_REDIRECT_URL: Your application URL, for local use you can keep the default "http://localhost:3000".

Database setup

On Mac, follow these instructions to install Postgres:

brew install postgresql@14
createuser -s postgres

You'll find more about the why you need the createuser step here.

Next, create the database with:

npx prisma db push

If it errors out (perhaps due to permission issue running the Prisma CLI), simply run the included script:

./db/setup-database.postgres.sh

This script creates a local Postgres issuing_treasury database.

Application launch

After necessary setups, launch the application with npm run dev.

Note: This application serves as an example and should not proceed to production deployment as it is.

Customizing your UI with the Devias Material UI theme

This sample uses the free Devias UI kit under an MIT license, which seamlessly integrates with Material UI and React.

You can easily customize aspects of the theme like the color palette by modifying the code in /src/theme.

To build a full-featured, production-ready application we recommend the Devias Pro version, which offers additional layouts, advanced React components, pre-built dashboards, and essential TypeScript support that ensures your code remains clean, robust, and scalable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.