Skip to content

Latest commit

 

History

History
55 lines (37 loc) · 2.54 KB

README.md

File metadata and controls

55 lines (37 loc) · 2.54 KB

Crezco Demo App

A Next.js demo app which allows a user to:

  • Onboard to Crezco
  • Create an Invoice
  • Create Crezco payment link and QR
  • Recieve realtime notification of payment via websockets and a webhook

Learn more here — https://documentation.crezco.com/docs/partner/docs/Tutorials/F%20Full%20Onboarding.md

Prerequisites

To make the demo work:

  • A Crezco sandbox API key

To get realtime updates of payment status

How to use

Create an .env.local file using .env.example as a template

yarn dev Starts the development server.

yarn build Builds the app for production.

yarn start Runs the built app in production mode.

User journey

  1. User is passed to Crezco to create an account - pages/index.js#L30-L32
  2. User is passed back to demo app with user UUID as query param
  1. User inputs invoice details - pages/create-invoice.js
  1. Pay demand details presented to user — pages/invoice/[id].js

NB: When using the demo, be sure to choose Yapily Mock as your bank, it requires no logins.

Further reading