Pay In and Pay Out: How to Create a Marketplace

Konrad Gadzinowski
Published on 10 Feb 2020
All Software Development Articles

In the current, mobile era of the internet, we tend to shop online more often than ever before. We can attribute it to the fact that it’s infinitely easier to compare products from different sellers online, often from the comfort of our sofa.


As a result, we tend to shop at online marketplaces that connect various providers of goods and services with potential clients. Businesses have a much easier time acquiring customers, while clients and can find shops with the best reviews, without much risk of getting tricked into a bad deal.


Marketplace Business Model


In this new world of centralized sales, we can distinguish two main approaches of conducting business. 


Marketplaces either act as brokers, charging providers a commission for their services, or they act as a final sellers, adding their own markup to vendor pricing.


Marketplace Types


Broker

Broker system


In a broker system, the marketplace operates as a marketing company. It charges vendors a commission for each generated sale. Payments are either processed directly between sellers and buyers, or a third-party payment provider is used. 


In most countries, in this system, the marketplace can’t really process payments directly, as an intermediary, unless it obtains a finance business license required to do so. Therefore, in order to process the payments through the platform, a third-party payment processor is needed.


In this scenario, responsibility for defective products can be shifted to actual sellers, since marketplace acts merely as a sales platform.


Distributor

Distributor business model

When the marketplace acts as a distributor, it effectively buys goods or services from its vendors and sells them to their clients for a profit. 


It’s the most traditional business model. Payment processing in this scenario is easy and can be simply done by the platform itself. All purchases from sellers can be deducted from marketplace income and all sales can be considered revenue. In theory, businesses operating according to this model can generate much greater revenues, since all operations are going through their books.


It’s also worth noting that an online marketplace takes all responsibility for defective products on itself, since it acts as a distributor.


Most Popular Payment Methods


Depending on the country, different payment methods and providers might be used. To simplify the current state, let’s go through some of the possible payment processors, depending on a marketplace business model.


Overview


Selected payment processors in the broker model.


Global USA EU UK
Hyperwallet Dwolla PayU Paybase
Braintree WePay Mangopay Nochex
PayPal for Marketplaces Stripe Connect Adyen Safecharge


Selected pay in methods in the distributor model.


Global USA EU UK
Wires ACH credit Wires Wires
TransferWise Checks Paymill SagePay
Stripe Wires Paylane Worldpay
PayPal Authorize.net
Square


Selected payout methods in the distributor model.


Global USA EU UK
Wires ACH credit Wires Wires
TransferWise Checks
PayPal Wires

Global


Serving a global audience is never easy. Different countries use different currencies and legislative frameworks, they have different cultures, languages, and often prefer different local payment methods. 


Nevertheless, some providers try to reconcile all these differences and potential obstacles. 


Broker


Hyperwallet


Hyperwallet is an enterprise payout solution, used by some of the most popular online brands out there. It is a great fit for large, established marketplaces. 


Braintree Marketplace


Braintree is a scalable payment solution for marketplace businesses. It supports all the biggest markets and can help you create a marketplace that supports North America, Europe, and Oceania.  


PayPal for Marketplaces


PayPal is definitely the most popular global payment platform. It grew on the back of eBay and doesn’t need much of an introduction. It’s supported in almost every country, the API is easy to implement, and you can create an account very quickly.


Distributor


Pay in Methods


Wires


Bank wires using the SWIFT network are the most reliable method available worldwide. Unfortunately it’s also often the most expensive option of sending money.


TransferWise 


TransferWise allows you to create borderless accounts. It gives you an option to send and receive local payments in a large number of countries. Fees paid for local transfers are often small and you have an easy option to convert currencies between each other.  


Stripe


Stripe is a debit and credit card processor, that is available in all the biggest countries. It also allows processing of ACH debit payments in the USA. It allows you to quickly create an account and start work on your application.


Payout Methods


Wires


Once again international SWIFT wires are the most accessible, easy option to use. Cost of a transfer is going to be a factor when deciding to use this method or not.


TransferWise


TransferWise allows you to pay your providers in almost any country. It’s relatively inexpensive and allows you to use different currencies.


PayPal


PayPal is the most popular payments platform. It can be used by people in most of the countries around the globe. They charge a percent from a payment, therefore they might become quite expensive over time.


United States


Broker


Dwolla


Dwolla gives you the ability to easily accept and send ACH payments, using nothing but bank accounts. It’s developer friendly, giving you a lot of possibilities on how to use it.


WePay


WePay is a powerful platform, underpinned by a Chase bank. It’s designed for broker marketplaces, making it a perfect fit for a US only platform.


Stripe Connect


Stripe Connect is a very developer friendly solution, that is adapted for broker marketplaces. It’s specifically designed to meet US market needs.


Distributor


Pay in Methods


Wires, ACH credit, checks


When it comes to accepting payments, the easiest way is to just accept bank-to-bank solutions. Paper checks, ACH credit and wire payments are easily available. Despite availability, the time and cost involved in processing might be a serious issue. 


Authorize.net


Authorize.net allows you to accept payments through credit, debit cards, as well as an ACH debit (eCheck). It’s a well known Visa company.



Square


Square offers a whole range of solutions for both in-store and online sellers. It does offer good API for developers, but they seem to only offer accepting payments through debit and credit cards.


Payout Methods


ACH Credit Transfers


The easiest way to send payouts at scale is through ACH credit transfers. Those are provided by banks, that are part of NACHA and can be extremely cost effective. ACH payments have a limit of $25,000 per transaction. 


Chase bank offers this payment system as an additional option.


Wells Fargo offers it as Direct Pay.


Some time ago, Airbnb co-founder Nathan Blecharczyk, wrote about this payment system in his Do-it-yourself ACH direct deposit article. 


Wires


It’s one of the easiest ways of sending money electronically. Unfortunately, US banks charge high fees for both sending and receiving them. For that reason, they should be used only in case there is a need to transfer larger amounts of money.


Checks


One of the simplest ways of transferring money in the US, is by using cheque. Unfortunately it’s slower and more troublesome than other methods.


European Union


Broker


PayU


PayU is a well established marketplace payment provider. It’s used by some of the biggest local marketplaces in Europe and it’s a safe choice.


Mangopay


Mangopay is a marketplace payment processor available in all EU countries. It seems to be well adapted for the needs of an EU-wide market platform.


Adyen


Adyen is a less known payment processor provider that supports all of the EU countries. It uses local payment methods, which is an additional advantage. 


Distributor


Pay in methods


Wires


Wires are very popular in the Eurozone, as well as in non-Eurozone countries. It’s because they are, for the most part, free to send and work really fast, usually delivering same-day transfers. Euro payments are sent using the SEPA network.


Paymill


Paymill allows you to start accepting card payments online. Its biggest focus is on payments in euros.


PayLane


Paylane can provide you with access to online card payments, as well as a gateway for bank-to-bank payments. It’s especially well adapted to the needs of the Polish market.


Payout methods


Wires


Within the European Union, SEPA wire transfer is all you need when it comes to payouts. They are fast, usually same-day and often free, even for international transfers. 


United Kingdom


Broker


Paybase


Paybase is a London-based marketplace payment provider. They provide eMoney accounts with individual sort codes and account numbers.

Nochex 


Nochex is an enterprise solution for marketplace platforms. They provide custom solutions for UK based customers.


SafeCharge


Safecharge provides payment solutions for UK based marketplaces. They offer decent API documentation for developers.


Distributor


Pay in methods


Wires


Bank transfers are a free and fast method of sending money in the UK. They are accessible for everyone and easy to use. It’s the most convenient method of accepting larger payments in distributor model.


SagePay


SagePay is a UK-focused payment provider. It supports both in-store and online merchants. Unfortunately, their developer guide is not accessible publicly.


Worldpay

Worldpay can provide you with online card payments. They are well adapted for a UK market and they do provide easy to follow developer guides.


Payout methods


Wires


When it comes to payouts within the UK, wire transfers are really all you need. They are free, fast and easily available. They will allow you to pay anyone in the United Kingdom.



Potential Risks


When choosing your payment processor partner, you should check their reputation before you start working with them. Even some of the biggest providers have terrible reviews. 


The best example might be PayPal, which is known for blocking user accounts without any warning, and freezing money stored there for up to six months.


Stripe is a company that has arguably the best technology available on the market. It’s known for being very developer friendly. Unfortunately, they also have a history of blocking accounts in the middle of the night without any warning.


For these reasons, it might be wise to keep your payment implementation generic, so that it will be easy to switch providers, if you happen to get shut down overnight.


When processing card payments, you need to be aware about the chargeback procedure. Sometimes a customer doesn’t recognize card transaction or is dissatisfied with the service or product. In such cases they might contact the seller and try to resolve the issue. 


If the problem wasn’t resolved, then they might dispute this card transaction with their bank. If the financial institution finds that the customer was right, then the money for this transaction is taken out of the seller’s account. Payment processor companies don't like chargeback disputes because they are liable for all reimbursed transactions. Therefore, they are quick to drop high-risk merchants.


ACH payments are also prone to chargebacks if a transaction was unauthorised or the amount debited was different than the authorized amount. You can find out more here.


Such risk doesn’t occur when accepting wire transfers. Therefore, wire transfers might be the safest method when accepting large payments.


Local is Often Better


Because of problems that might occur when cooperating with payment processor companies, it might be better to work with local providers.


Often local companies can have better cooperation with you, can communicate with you easier and can have more trust in you, compared to providers based in other countries.


Additionally if some serious problems arise and you will lose access to your money, it is always easier to start a legal action against local company, than a foreign organization. 


Alternative Crypto Method - USD Coin


Cryptocurrencies are getting more and more popular, though they are still not a common choice for online payments. Because of serious price fluctuations and volatility concerns, most cryptocurrencies are not suitable for day-to-day financial transactions. 


Still, it might be worth looking into stable coins. One such example is the USD Coin (USDC). It’s an Ethereum powered coin that is redeemable with USD in 1:1 ratio.


It can be sent quickly at low cost to anyone in the world, which is a clear advantage. It makes it perfect alternative to often expensive and slow international transfers.


It’s also really easy to start accepting payments in USDC, by simply using Coinbase Commerce.


There are some serious downsides to cryptocurrencies, as they still have a stigma of being used for illegal transactions. That might cause additional scrutiny and investigations when redeeming them to fiat currency in larger amounts. What is more traditional banks in the US are known to close bank accounts of people who use cryptocurrencies.


At the time of writing, according to ETH Gas Station single, standard transaction cost in Ethereum network is around $0.007 and takes less than five minutes to settle. Those are very attractive parameters. One might wonder if cryptocurrencies might be a good fit for microtransactions. Unfortunately because of varying time and price of transfers, they seem like a risky choice. Furthermore, effort and cost to acquire cryptocurrency to start with can be an additional problem, especially in some parts of the world. 


Because of these reasons, an alternative cryptocurrency approach might not be ready for prime time just yet.


Update on 16th March 2021


In just a year the average ETH transaction cost rose to around $19. That basically renders this cryptocurrency unusable. 


As of today, the only truly usable cryptocurrency that offers instant and free transactions is Nano.


Simple Marketplace Payment Implementation


With all the information presented so far, let’s go ahead and create an actual marketplace for demonstration purposes! It will be a simple, generic marketplace, using distributor business model. We will adapt it for US market, but it could be easily accommodated to work with other countries as well. As a payment method, we will accept: - ACH credit transfers - Wire transfers - Credit and debit cards using Stripe Stripe was chosen as the payment processor because it’s available in many countries, its developer guide is great, and it takes just a few minutes to create an account. As a result, their services are easily available to a wide range of potential users. As a payout method, we will simply use ACH payments, which - as mentioned before - can be easily provided by banks or TransferWise.


Marketplace implementation is publicly available on Github.

Marketplace Design

Marketplace supports admin users that are able to issue invoices and payouts. They also have access to the dashboard, where they are able to see the list of transactions and search through them. At the top of the dashboard you can typically find the financial summary of all transactions.


Guest users have access to the landing page and are able to view and pay invoices as well as view payouts.


After the first start of the application, the user is prompted to create an administrator account. After that they need to set up Stripe API keys and bank account details for ACH credit and wire payments.


At this point, we can start issuing transactions!


Administrator can easily create invoices and payouts from the dashboard. Information about them will be sent to specified email address. Alternatively, an invoice or payout URL can also be shared manually with the recipient. 


Customers can easily pay the invoices using debit or credit card. It supports 3D Secure payments, which shields sellers from chargeback, in the event that a stolen card was used.


This simple marketplace can be used anywhere where distributor business model makes sense. Here are some examples of such businesses:


- Accounting services.

- Marketing services.

- Construction services.

- Cleaning services.

- Various B2B businesses.

- Car rentals.

- House rentals.

- Wholesalers.


Despite simple design, it can greatly improve the lives of small business owners


Marketplace Walkthrough


Dashboard


On the main page, we can see a list of all transactions as well as a table with a financial summary. From here, the user can add new invoices and payouts and edit the existing ones.





Unpaid Invoice


Once a new unpaid invoice is created, the client is presented with an option to pay either through a card payment or a bank transfer.




Card Payment


Card payment is a convenient way to pay the invoice. Once this option is selected, the user is presented with a dialog where they need to specify a few details and confirm the transaction.




Processing Card Payments


Once the card payment is confirmed, we need to wait until it’s processed by the payment processor. During this process, the invoice page is blocked with a spinner loader to indicate that everything is going smoothly and that the transaction will settle soon.




Payment via Bank Transfer


If the client decides to pay with a bank transfer, they will be asked for bank account information, which should be sufficient to either send ACH or wire transfer. It can be easily copied with a button to the right in each row.




Invoice Printout


Invoices can be printed using the print button in the top right corner. It can be useful for accounting purposes or to execute a bank transfer in a branch.




Paid Invoice


Once an invoice is paid, the payment option is removed to avoid duplicate payments. A clear green status label is displayed.




Paid Payout


The payout design is similar to the invoice. The status indicator and all the data are clearly visible.




Payout Printout


Payouts can also be easily printed with the print button in the top right corner. Printouts can be used for documentation purposes.




Code


This web application is created using TypeScript, the scalable answer to JavaScript. This language is used on both the client and the server side. You have an option to run this application in development and production mode. When in production it will start multiple threads to use as many cores as possible.


As a database, it uses MongoDB. It’s a very popular NoSQL solution for storing documents.


On the UI front, it uses Bootstrap library and SCSS for managing styles. 


Code architecture on both client and server side, follows modular pattern. This approach was described in the following article Creating Truly Modular Code with No Dependencies. It makes code maintainable and easy to reuse by other people.


All the details are available in the project readme file, so that it will be easy to deploy this application to production as well as continue development on your own.


Summary


The traditional online marketplace business structure is very popular because it provides a fast and safe shopping experience to customers. We can choose our approach by going with one of the two most popular models: broker or distributor system. 


Depending on the country that you want to operate in, you can go with a payment processor that best suits your needs. In some cases, a bank account alone will be enough, but if you are catering to an international or global audience, you will need more payment options.


To kick off your journey with online marketplaces you can use a basic implementation described in this article. I hope that you will find it useful and it will help you grow your business.


NOTE: I have originally published this article a while ago on Toptal blog.

About the Author
Konrad Gadzinowski
Konrad is a highly skilled software developer who has delivered numerous web and mobile applications. He has created software for multiple small and larger companies, helping them generate combined revenue of millions of dollars.