carlbarrdahl / reef-payment-api

🥇 Winner of Reef Payment API in DeFi & Cross-chain Interoperability Hackathon

Home Page:https://reef-payment-api.web.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reef Payment API

Merchant payment API gateway on a Firebase function.

Works like this:

  1. Merchant signs in with Google (can be extended to other providers)
  2. Merchant generates API key and configures wallet address
  3. Customer navigates to Merchant Shop and initiates a payment
  4. Payment API generates random wallet and returns address and checkoutUrl
  5. Customer navigates to checkoutUrl and sends payment to generated address
  6. Payment API transfers incoming payment (minus tx fee) to configured wallet address and returns a success message and navigates to redirectUrl
  7. Transactions to address is visible in Merchant Admin UI

Future improvements

  • Refund payments (this must be done in the browser with the merchant wallet signed in with polkadot ext.)
  • Admin UI to manage merchants

Screenshots

Admin UI

Merchant Shop

Checkout page

Created as a submission to DeFi & Cross-Chain Interoperability Hackathon

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

Start the http api emulator

cd functions
npm run serve

API is now available at: http://localhost:5001/reef-payment-api/us-central1/api

Instructions

About

🥇 Winner of Reef Payment API in DeFi & Cross-chain Interoperability Hackathon

https://reef-payment-api.web.app

License:MIT License


Languages

Language:JavaScript 92.9%Language:HTML 7.1%