Flow Merchant

Flow Merchant

Flow Merchant is a payment processor like Stripe but decentralized, it allows users to receive funds, accurately log the transactions from the blockchain and send transaction notifications.

The problem Flow Merchant solves

Flow Merchant's primary goal is to solve the problem of receiving and organizing payments for businesses that require payment in cryptocurrencies, this product is also integrated with Increment Finance to help creditors to perform a quick token swap to pay Merchants in their desired currency. Businesses can use our platform in two ways:
Before anyone can use our platform, they need to create an account with us and create a Flow Merchant profile (This creates the required crypto-currencies vaults).

  1. By using our Dashboard: With a few clicks, users can generate a payment link from their dashboard, this payment link would be sent to their client after payment is made. The transaction will be logged from the blockchain into our system and we will send an email notification with transaction details to the Merchant.

  2. By using our API: We provide a simple and easy-use RESTful API, that is easy to use and developer friendly, we also have a nodejs package published on npm that simplifies the process.
    Here is how it works,
    The user navigates to the Integrations page, and on that page, they will see their public and secret key, the secret key is needed to make authorized calls to our backend server to request payment (generate transaction reference, link, and details),
    after generating this link the client software will redirect its user to the generated payment link where they can make payment once payment is made, we log the transaction and send a post request to the client webhook URL, so that they can update their systems appropriately.
    A complete guide to how this works can be found here https://flow-merchant.gitbook.io/flow-merchant/

Challenges I ran into

The biggest challenged i faced while building this product was with the indexer, initially, the indexer listen to events on the blockchain but this wasn't effective as some events were missed, so i had to rebuild it in such away that it queries the blockchain at regular interval storing the last block height and using it for the next query with this method events are really missed.
Coming from a solidity background, the flow Fungible Token standard was a bit strange to me and hard to grasp for a while, but after doing several research, reading the fungible token documentation, and looking at the contracts, scripts, and transactions source codes, I was able to create three custom fungible tokens, interact with them and integrated fungible token vault into my smart contract.
Another challenge I encountered was working with Increment Finance, a DEX on the Flow Blockchain, I needed to use their service for token swaps, I read their documentation, but then I couldn't find a URL to their Testnet for me to test their functionalities and create pairs needed for this project, so I joined their discord and asked for the URL to their Testnet and I enjoyed using their platform, I created several pairs needed for this product to work.

I also asked for help several times on the Hackathon question and support channel and I got useful answers.