Commerce Layer will be proud to sponsor the next JAMstack Conf in London — 09-10 July, 2019 🎉 Stay tuned!


Payment gateway

An ecommerce service that authorizes, processes and validates payments

Generally speaking, a payment gateway refers to the technology that:

  • reads payment cards
  • sends customer information to the merchant acquiring bank for processing.

Payment gateways facilitate different kind of transactions by the transfer of information between a generic payment portal - it could be a website, a mobile phone or whatever else - and the front end processor or the acquiring bank.

In the specific case of credit cards, the gateway allows merchants to accept payments by connecting payment processors (the service charging the card) and merchant account providers (the service providing your payment systems).

Nowadays, there are quite a lot of gateways you can use for your online transactions. Some of them are available all around the world (and all around the web). Some other are country-specific and work only for businesses located in particular zones.

Within Commerce Layer now, you can configure your gateways for credit card and PayPal payments. This setup is quite straightforward, all you need to do is:

  • select one (or more) gateway type among the available ones
  • provide all the credentials requested by the selected external service.

The list of payment gateways you can connect to includes:

  • Stripe
  • Braintree
  • PayPal
  • Manual Gateway

And more to come. If you can’t find your preferred gateway in this list, feel free to contact us so that we can add it as soon as possible.

Besides, there’s a test gateway useful, as the word suggests, to perform some payment tests.

As you can imagine, each of these services requires different credentials. For Stripe:

  • the name that identifies this resource within your organization
  • a login

For Braintree:

  • merchant
  • merchant account (optional, you need to specify a mechant account when you deal with multicurrency, since Braintree requires a separate gateway per currency. See here for more information)
  • public key
  • private key

For Paypal:

  • client ID
  • client secret
  • mode

An exception is the Manual Gateway, which just requires to flag/unflag Require capture before shipping. The manual gateway is needed to manage offline payments such as wire transfers.

Each payment gateway is then associated with a Payment Method, which the customer can select in the checkout process.


As mentioned above, if you want to be able to accept some online payment for your orders, you have to set up at least one payment gateway. Configuring a more extensive list of payment gateways for your Organization can be helpful in many different respects. Having many payment gateways can affect the way you design your business model.

Let’s dive into a bunch of examples to better understand what we’ve just said.

Risk Management

Each payment gateway comes with his specific services and provides his specific solutions to handle the common ones (secure PCI compliance, seamless checkout experience, data security). There’s at least one key factor to consider when choosing a payment gateway. That is, how it protects your business and deals with sensitive issues, such as risk management and fraud prevention.

Payment risk is the risk оf loss due to a default оn a contract, оr mоrе generally, thе risk оf loss due tо ѕоmе “payment event.” Primarily if you handle a high volume оf online payments, you’re inevitably going to face it. Delays and blocks during the payment processor, in the worst case, to be perceived as a source of fraud саn rebound on your business and its reputation.

The truth is that every payment method involves risks. If you run an online business and process payments on your website, the major ones are fraud and operational risk. The good news is that, when you choose the proper payment gateway, you don’t have to manage all the risk by yourself. That’s because almost every payment gateway somehow cares about this matter. This can happen at various levels of detail. Some of them base the validation only on a credit card check. Some others need a verified user account connected to a bank account so that they can guarantee a higher level of control on the risks. A few even take full responsibility in any case of fraud or malfunction.

Consequently, each payment gateway applies its rates when providing the service. Usually, a percentage after each transaction applies. The rates depend on the agreement between your Organization and the gateway provider itself.


Increasing the number of payment gateways can have a positive effect. If your customers can choose between many payments, they are more likely to finalize the process down to the checkout.

Payment Gateways vs. Markets

The basic setup to start selling on Commerce Layer is:

  • to create one Market
  • define some payment methods selecting the related payment gateway.

If your online business grows, it may be you want to start selling in different countries. As already said, some payment gateways are country-specific, or they better perform in some zones. Nothing says you can’t use them when you sell to those countries. Put it another way, the need for using a particular payment gateway for a particular zone could be a good reason to add a new market.

Payment Method