Microservices and Payments: What You Need to Know
Digital commerce experiences are increasingly stepping outside the bounds of the legacy desktop-first websites. To make newer touchpoints such as mobile apps, in-store digital, interactive display, rich content, and IoT natively shoppable or support one-touch, gesture or voice-enabled transactions, merchants need to extend payment processing anywhere.
The key to achieving omnichannel commerce is API-driven systems that allow applications to share and process data. Many organizations have adopted ecommerce microservices as a flexible way to extend, customize and scale their commerce functionality to fit the new world of shoppable touchpoints.
Microservices are small applications built around specific business functionality decoupled from other pieces of your commerce platform. Their independence and dedicated APIs allow them to integrate with diverse touchpoints and be scaled, updated, and removed without impacting site performance, the database, or code of your core commerce platform. They’re particularly beneficial when you want to satisfy unique use cases without the risk of “breaking your build.”
But is building a payments microservice on your own the right way to satisfy unique requirements within emerging consumer touchpoints?
Third party payment solutions are already microservices-like
There’s good reason why ecommerce platforms typically don’t ship with native payment processing and require integration with third parties for merchant accounts and payment gateways. Payments are too critical a service to lock into. As the industry continually evolves with new payment types, best practices for fraud and PCI compliance, privacy, and security, it’s essential to have the choice and flexibility to swap in and out payment processors as required. Your payments vendor is responsible for delivering innovations such as mobile wallet, express checkout, cryptocurrency, mPOS and more, and if you ever outgrow your solution, a switch is relatively easy.
Get hands on with an Elastic Path Free Trial
Start building the commerce experience your unique business demands with a free Elastic Path Commerce Cloud account. Get in touch with us and we will setup a Free Trial store for you for six weeks.Sign up for a free trial
You never want payments tied to your ecommerce platform’s upgrade cycle and risk falling behind on critical updates. Nor do you want an update to your platform, such as adding a new product attribute to your catalog potentially breaking payments, or an interruption in payment processing taking down your whole site.
The good news is your third-party payments service already functions like a microservice, with its own code, data, and API. Deployed alongside your commerce platform, it can extend to new touchpoints without taking your core commerce code with it and can pass back data with the right integrations. Depending on your payments vendor, there may be quite a bit you can do with the APIs they provide.
However, you don’t own the code with payments-as-a-service, nor can you make updates independent of your vendor. In the rare case that market solutions can’t provide what you need for your unique use cases, you may opt to build a layer between your processor and your commerce platform to fill the gap.
Already have an existing payment provider? Learn more about our accelerators for popular solutions.
Elastic Path PayPal Accelerator
Elastic Path Stripe Accelerator
When you want more power from payments
As a majestic commerce unicorn, you may desire to (for example):
- Allow customers to scan QR or barcodes in store to pay via their preferred stored payment methods within your app.
- Offer payment flexibility for your customers with Buy Now, Pay Later.
- Set up recurring payments to facilitate your subscription-based model.
- Concurrently deploy multiple payment vendors to cater to your customers' currency or other local preferences in different geographies.
- Process your own or third-party virtual currency (loyalty points or store “bucks”) as full or partial payment, and be able to reverse transactions based on promotional rules properly.
- Accept credit-based payments across multiple users within a B2B account, e.g., a stock images subscription that can be consumed across a team, with accounts topped up mid-billing cycle with one click.
- Create specific checkout flows for distributors, B2B customer segments, or geographies that accept non-standard payment types.
No matter how strategic these may be to your eCommerce plans, you do not want to build and maintain a payments service from scratch in-house! It’s simply too risky, and there are enough third-party solutions to take care of the critical features.
Instead, you may choose to build custom functionality into a microservice API layer that sits between your payments application and commerce platform. This allows you to create, test, and iterate on this code independent of your payment processing and merchant account with less risk. Rather than directly call the payments service, your touchpoints can communicate through the business logic of an API layer that you control.
And if it fails or your strategy evolves? Just remove it. It’s never been easier than with one click enabled by pre-integrations on your eCommerce solution of choice. That’s the beauty of microservices. Turn your payments into a catalyst for success rather than a hinderance to your customers.
Payment microservice precautions
While this workaround sounds simple, there’s more to microservices than just developing custom code. Your IT environment needs to be set up to support microservices, including an API gateway and framework to support service discovery, messaging, monitoring, and more. This takes time to build and often carries a learning curve. Setting up this infrastructure can take longer than development of microservices themselves.
What’s more, your IT team likely needs to support DevOps if they don’t already and have experience with deploying, testing, and maintaining microservices. The overhead doesn't justify the effort for organizations just looking to fill a feature gap within a single service.
Until your organization requires a complete transition to a microservices architecture, *update link: https://www.elasticpath.com/blog/ecommerce-microservices-architecture* it’s best to work with your payments vendor’s API or your API-driven, headless commerce platform when extending transactional capabilities to new experiences. Ready to make the switch to a microservices based architecture? Check out our re-platforming guide.
Like what you’re reading?
Check out some of our other great content here
Get actionable insights on ecommerce trends and best practices
You'll receive a welcome email shortly.