Back-end
13 minute read

Pay in, Pay out: How to Create a Marketplace

Konrad is a skilled software engineer who has delivered many web and mobile applications. He is a full-stack developer focusing on JavaScript.

In today’s 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.

eCommerce businesses have a much easier time acquiring customers, and clients can find online retail shops or service providers 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 between two main approaches to conducting business.

Marketplaces act either as brokers, charging providers a commission for their services, or as 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 processed either directly between sellers and buyers or through a third-party payment provider.

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 payments through the platform, a third-party payment processor is required.

In this scenario, responsibility for defective products can be shifted to the actual sellers, since the 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 the 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 since it acts as a distributor.

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 of Payment Processors

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
Cards Cards Cards Cards
Wires ACH Wires Wires
  Checks    
  Wires    


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, have different cultures and languages, and often prefer different local payment methods.

Some providers try to reconcile 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 eCommerce businesses.

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 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 for 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.

Stripe

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

Payout Methods

Wires

Once again, international SWIFT wires are the easiest and most accessible option to use. The cost of a transfer is going to be a factor when deciding whether to use this method or not.

TransferWise

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

PayPal

PayPal is the most popular payment platform used in most countries around the globe. They charge a fee for each payment, so they might become quite expensive over time.

USA

Broker

Dwolla

Dwolla allows you to easily accept and send ACH payments using nothing but bank accounts. It’s developer-friendly with a lot of possibilities on how to use it.

WePay

WePay is a powerful platform underpinned by 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 to broker marketplaces. It’s specially 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, and 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, which 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

This is one of the easiest ways of sending money electronically. Unfortunately, US banks charge high fees for both sending and receiving it. For that reason, they should be used only when transferring large amounts of money.

Checks

Using checks is one of the simplest ways of transferring money in the US. 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 eCommerce platforms in Europe and is a safe choice.

MANGOPAY

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

Adyen

Adyen is a less-known payment processor provider that supports all 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, the 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.

UK

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 to everyone and easy to use. It’s the most convenient method of accepting large payments in a distributor model.

Sage Pay

Sage Pay 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 to the UK market and 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 and is 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 of the chargeback procedure. Sometimes, a customer doesn’t recognize a 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 isn’t solved, they might dispute this card transaction with their bank. If the financial institution finds that the customer was right, 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 unauthorized or the amount debited differed from the authorized amount. You can find out more here.

Such risk doesn’t occur when accepting wire transfers. Therefore, wire transfers may 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. Compared to foreign-based providers, local companies often offer better cooperation, easier communication, and more trust in you.

Additionally, in case of serious problems or losing access to your money, it is always easier to start legal action against a local company than a foreign organization.

Alternative Crypto Method - USD Coin

Cryptocurrencies are becoming increasingly 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 at a 1:1 ratio.

It can be sent quickly and inexpensively anywhere in the world, which is a clear advantage that makes it a perfect alternative to the slow and often expensive international transfers.

It’s also very 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, the standard transaction cost in the 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 the varying time and price of transfers, they seem like a risky choice. Furthermore, the effort and cost to acquire cryptocurrency to start with can be an additional problem, especially in some parts of the world.

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

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 eCommerce marketplace using the distributor business model. We will adapt it to the 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.

The marketplace implementation is publicly available on GitHub.

Marketplace Design

Marketplace Design

The 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 a 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.

Upon activating 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!

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

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

This simple marketplace can be used anywhere where a 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 the 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.

Dashboard

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.

Unpaid Invoice

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.

Card Payment

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.

Card Payment Processing

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.

Payment via Bank Transfer

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.

Invoice Printout

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

Paid Invoice

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

Paid Payout

Payout Printout

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

Payout Printout

The Code

This web application is created using TypeScript, the scalable answer to JavaScript. This language is used on both the client- and 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 the Bootstrap library and SCSS for managing styles.

Code architecture on both client- and server-side follows a 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 for customers. We can choose our approach from 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 the basic implementation described in this article. I hope you will find it useful and that it will help you grow your business.

Understanding the basics

What is the difference between eCommerce and a marketplace?

A marketplace connects final clients with multiple vendors, whereas an eCommerce website is usually run by a single vendor.

What is a marketplace retailer?

A marketplace retailer is a company selling physical goods to the final customers through an online marketplace (e.g., Amazon, eBay).

Can I create my own payment processor?

If you plan to start a marketplace, then it’s a better idea to use one of the payment processors already available on the market. It would be a lot cheaper and faster to do so. If you prefer to process payments yourself, you can use a distributor business model, where you will act as a final seller.

How do payment processors make money?

Payment processors make money by charging a commission on each transaction they process. The fees they charge usually depend on the payment method used by a client.

What is the difference between a payment gateway and a payment processor?

A payment gateway is a tool for securely capturing payment details. A payment processor processes the actual payment between the buyer’s, seller’s, and a marketplace’s bank.