How to create a payment gateway in 2026: Full guide

Shermaine Tan
Manager, Growth Marketing
Key takeaways:
A payment gateway is a complex, multi-layered financial infrastructure system, not just a checkout form.
Building one from scratch involves PCI DSS certification, acquiring bank relationships, and a dedicated engineering team, with costs typically starting at $500,000 and timelines of 12–24 months.
For most businesses, partnering with a payment service provider such as Airwallex delivers the same capabilities at a fraction of the cost and time.
When most people search for how to create a payment gateway, they're asking a technical question: what does it actually take to build one? The architecture, the compliance requirements, the cost, the timeline.
This guide answers that question honestly. We'll walk through what a payment gateway is under the hood, the key components you'd need to build, the steps involved in developing one from scratch, and what it realistically costs.
We'll also explain why, for most businesses, the conclusion at the end of that research is the same: using a payment service provider is the faster, lower-risk, and more cost-effective path to accepting payments globally.
What is a payment gateway, and how does it work?
A payment gateway is the infrastructure layer that sits between a customer's payment method and the banking system.
When a customer enters their card details at checkout, the gateway captures that data, encrypts it, routes it to the right processor, receives an authorisation decision, and returns the result to the merchant, all in seconds.
Every transaction then goes through three stages:
Authorisation
Capture
Settlement
After this, funds typically land in the merchant's account within one to three business days.
It's worth distinguishing the gateway from the payment processor, since the two are often confused.
The gateway handles data capture, encryption, tokenisation, and routing — no transaction reaches the processor without passing through it first. The processor handles the financial transaction itself, communicating between the acquiring bank and the issuing bank.
A payment service provider (PSP) like Airwallex typically bundles both into one product.
For a deeper look at how gateways work and how they compare to processors, see our guides on what is a payment gateway and payment gateway vs payment processor.
In this article, we focus on the technical and operational reality of building one from scratch, and what that means for most businesses.
What does it actually take to build a payment gateway?
Before getting into the build process, it helps to understand what a payment gateway actually consists of at a technical level. Here’s a quick overview:
Component | What it does | Key challenge |
|---|---|---|
API layer | Merchant-facing interface for submitting transactions and receiving responses | Must handle versioning, rate limiting, idempotency, and multi-merchant isolation |
Payment UI and data capture | Checkout form or hosted page where customers enter payment details | Raw card data must never touch the merchant's servers — directly affects PCI DSS scope |
Routing and orchestration engine | Decides which acquirer to use, manages retries and cascade fallback | Core of approval rate optimisation; months of engineering to build well |
Encryption and tokenisation | Replaces card data with secure tokens at point of capture | Reduces PCI scope; key management is an ongoing operational responsibility |
Fraud detection | Real-time risk scoring on every transaction | Requires continuous tuning — not a one-time build |
Settlement and reconciliation | Manages capture, settlement batching, and matching gateway records to acquirer reports | Poor reconciliation creates financial discrepancies and audit risk |
Merchant portal and back office | Dashboard for transaction management, disputes, reporting, and configuration | A separate frontend product that sits on top of the gateway infrastructure |
API layer
This is the external interface of the gateway: the mechanism through which merchants submit transactions, receive responses, and listen for events via webhooks.
A production-grade API layer needs to handle versioning, rate limiting, idempotency (ensuring duplicate requests don't create duplicate charges), and multi-merchant isolation. Every integration a merchant builds connects here.
Payment UI and data capture layer
This is the checkout form or hosted payment page the customer interacts with. It needs to be designed so that raw card data never touches the merchant's own servers.
It must also support 3D Secure authentication flows, tokenisation for returning customers, and localisation for different markets and currencies.
Routing and orchestration engine
This is the brain of the gateway. It decides which acquirer or processor to route each transaction to, handles retry logic when transactions fail, and manages cascade fallback if one processor is unavailable.
At scale, the routing engine is where approval rate optimisation happens: small improvements in routing logic can meaningfully reduce failed transactions and increase revenue.
Encryption and tokenisation module
Sensitive card data must be replaced with secure tokens immediately at the point of capture. This reduces the amount of your system that falls within PCI DSS scope and enables recurring billing without storing raw card numbers.
Managing encryption keys securely is an ongoing operational responsibility.
Fraud detection layer
A production gateway needs real-time fraud scoring on every transaction: velocity checks, device fingerprinting, behavioural analysis, and either rule-based or machine learning-based risk assessment.
Fraud logic isn't a one-time build; it requires continuous tuning as fraud patterns evolve.
Settlement and reconciliation engine
Once transactions are authorised, the gateway needs to manage capture, settlement batching, and reconciliation, matching what the gateway recorded against what acquirers and banks report. Poor reconciliation creates financial discrepancies and audit risk.
Merchant portal and back office
Merchants need a dashboard to view transactions, manage disputes, access reporting, and configure settings. This is a separate frontend product sitting on top of the gateway infrastructure.
Each of these components needs to be built, tested, secured, and maintained independently, and they all need to work together reliably under production load. This is what you're committing to when you decide to build a payment gateway from scratch.
How to build a payment gateway
Building a payment gateway is much more than writing code. Alongside the engineering effort, you'll need to navigate compliance, banking partnerships, card network requirements, and ongoing operations. Here's what the process typically looks like:
Phase 1: Plan your payment gateway
Before writing any code, define exactly what your gateway needs to support. This includes the markets you'll operate in, the currencies and payment methods you'll accept, the acquiring banks you'll connect to, and the regulatory requirements you'll need to meet.
These decisions shape your architecture, development timeline, and budget, so it's worth investing time upfront to get the scope right.
Phase 2: Build the core platform
With your requirements defined, you can begin building the gateway itself. This includes your backend infrastructure, APIs, databases, payment processing services, checkout components, tokenisation, payment routing, fraud detection, and reconciliation engine.
Because payment infrastructure is expected to operate with minimal downtime, your platform should be designed for high availability, scalability, and resilience from the outset.
Phase 3: Meet compliance and certification requirements
Compliance isn't something you add at the end of development; it should influence your architecture from day one.
The first major milestone is achieving PCI DSS compliance, which governs how cardholder data is stored, processed, and transmitted. Depending on your transaction volume, certification can involve formal security assessments, penetration testing, and ongoing audits.
You'll also need to complete the certification programmes required by card networks such as Visa and Mastercard before your gateway can process live card transactions.
Phase 4: Connect to the payments ecosystem
To move money, your gateway needs direct integrations with acquiring banks. Each connection typically involves commercial agreements, technical integration, certification, and testing before it can go live.
Building multiple acquiring bank connections also allows your routing engine to improve resilience, optimise approval rates, and provide failover if one processor experiences issues.
Phase 5: Test, launch, and maintain
Before launch, thoroughly test every part of the payment flow, including authorisation, settlement, reconciliation, fraud detection, failover, and performance under load. Most providers roll out gradually to minimise risk while monitoring live transactions.
Launching is only the beginning. Payment gateways require continuous maintenance to keep pace with evolving PCI DSS requirements, card network rules, fraud patterns, new payment methods, and API changes from banking partners.
How long does it take to build a payment gateway?
For most organisations, building a production-ready payment gateway takes 12–24 months before it can process its first live transaction.
While software development is a major part of the project, compliance and third-party integrations are often the biggest factors affecting delivery timelines. For instance:
PCI DSS certification alone can take six to twelve months, depending on the scope of your gateway and any remediation work required.
Integrating with acquiring banks typically takes three to six months per connection.
Certification with card networks such as Visa and Mastercard adds further time before you can process live transactions.
Although many of these activities can run in parallel, they can't be accelerated indefinitely because they rely on external parties.
A basic gateway supporting a single market, single currency, and one acquiring bank may be ready in around 12 months.
By comparison, a production-grade gateway with multiple acquirers, multi-currency support, intelligent routing, and advanced fraud detection is more likely to take 18–24 months or longer.
How much does it cost to build a payment gateway?
Building a payment gateway involves much more than software development. You'll also need to budget for compliance, banking integrations, infrastructure, security, and ongoing operations.
Cost component | Estimated cost |
|---|---|
Engineering team (backend, security, DevOps, QA) | $200,000–$400,000 |
PCI DSS certification (including QSA and remediation) | $50,000–$200,000 |
Acquiring bank integrations (3–5 connections) | $80,000–$250,000 |
Card network certifications (Visa, Mastercard) | $30,000–$80,000 |
Infrastructure (servers, databases, CDN, monitoring) | $50,000–$150,000 per year |
Anti-fraud tooling | $20,000–$60,000 per year |
Legal and compliance | $30,000–$100,000 |
Estimated first-year cost | $500,000–$1,000,000+ |
Estimated ongoing annual cost | $150,000–$300,000 |
A minimal, single-market gateway may cost around $160,000–$250,000 in development alone. Once certification, infrastructure, acquiring bank integrations, and operational costs are included, a production-ready gateway typically exceeds $500,000 in its first year.
One expense that's frequently underestimated is PCI DSS remediation. Security assessors often identify architectural issues that must be resolved before certification is granted, resulting in additional engineering work and longer delivery timelines.
Ongoing maintenance is another significant consideration, with annual costs typically amounting to 15–30% of the original development investment.
Should you build your own payment gateway?
Building a payment gateway only makes sense for a relatively small group of organisations: typically those where payment infrastructure is part of the core product rather than simply a way to accept payments.
This approach is most suitable for:
Payment service providers (PSPs) and fintechs offering payment processing to merchants.
Payment orchestration platforms that need complete control over transaction routing.
Large enterprises processing extremely high transaction volumes, where reducing payment processing costs can justify the investment.
Businesses with highly specialised compliance, routing, or infrastructure requirements that existing providers cannot support.
Why most businesses use a provider instead
For most businesses (including eCommerce retailers, SaaS companies, marketplaces, and businesses expanding internationally), building a payment gateway is unlikely to be the most practical option.
Instead, a payment service provider gives most businesses the payment capabilities they need, without the 12–24 month build timeline, seven-figure upfront investment, or ongoing operational burden.
Here’s an overview of the differences:
Build your own gateway | Use a provider like Airwallex | |
|---|---|---|
Time to first live transaction | 12–24 months | Days to weeks |
First-year cost | $500,000–$1,000,000+ | Transaction-based fees, no build cost |
PCI DSS compliance | Your responsibility to build, certify, and maintain | Handled by the provider |
Acquiring bank relationships | You negotiate and integrate each one | Handled by the provider |
Fraud detection | You build and continuously tune | Handled by the provider |
Ongoing maintenance | Handled by your team | Handled by the provider |
Payment methods | Each integration is a separate build cycle | 160+ available immediately |
Time your team spends on payments | Significant and ongoing | Minimal |
Accept payments in 180+ countries with Airwallex
For businesses that want to accept payments globally, Airwallex Payments gives you the capabilities of a production-grade gateway without any of the build complexity.
Airwallex is PCI DSS Level 1 certified and provides the payment infrastructure, fraud prevention tools, payment routing, and acquiring network businesses need to accept payments globally.
You get access to 160+ local payment methods and 130+ currencies, with conversion-optimised checkout, no-code payment links, and plugins for platforms like Shopify and WooCommerce. For businesses that need more control, a full API and mobile SDKs let your developers build a fully customised checkout experience.
Rather than spending months building and maintaining payment infrastructure, your team can focus on growing the business while using a gateway that's already operating at production scale.
Frequently asked questions (FAQs)
What is the difference between a payment gateway and a payment processor?
A payment gateway handles data capture, encryption, tokenisation, and routing; it's the layer that securely transmits payment information from the customer to the processor. A payment processor handles the financial transaction itself, communicating between the acquiring bank and the issuing bank to authorise and settle funds. Most payment service providers like Airwallex bundle both into a single platform. For a full breakdown, see our guide on payment gateway vs payment processor.
How long does it take to build a payment gateway from scratch?
Most custom gateway builds take 12–24 months before processing a first live transaction. PCI DSS certification alone typically takes six to twelve months, and acquiring bank integrations run three to six months each. The engineering is rarely the bottleneck; compliance and external integration timelines are.
How much does it cost to build a payment gateway?
A full custom gateway build typically costs $500,000–$1,000,000+ in the first year, covering engineering, PCI DSS certification, acquiring bank connections, card network certifications, infrastructure, and legal costs. A minimal single-market MVP starts at around $160,000–$250,000 in development costs alone, before compliance and infrastructure are factored in. Ongoing annual maintenance adds a further 15–30% of the initial build cost each year.
Do I need PCI DSS certification to build a payment gateway?
Yes. Any gateway that handles cardholder data must comply with PCI DSS: the current active version is v4.0.1. The level of certification required depends on your annual transaction volume, with Level 1 (over 6 million transactions per year) requiring an annual on-site assessment by a Qualified Security Assessor. Compliance is an ongoing obligation, not a one-time milestone.
Can I build a payment gateway and still use a provider like Airwallex?
Yes, these aren't mutually exclusive. Some larger businesses build custom gateway infrastructure for specific use cases while using a provider like Airwallex for their primary payment acceptance. Airwallex also offers platform APIs and embedded finance solutions for businesses that want to integrate payment capabilities directly into their own products.
What is the easiest way to start accepting online payments?
For most businesses, the fastest and most cost-effective route is to use a payment service provider. With Airwallex, you can start accepting payments in minutes using no-code payment links or pre-built plugins for platforms like Shopify and WooCommerce, with no build cost and no compliance overhead. See how Airwallex Payments works.
View this article in another region:AustraliaEuropeNew ZealandUnited KingdomUnited StatesGlobal
This publication does not constitute legal, tax, or professional advice from Airwallex nor substitute seeking such advice, and makes no express or implied representations / warranties / guarantees regarding content accuracy, completeness, or currency. This publication is not intended to be relied on for the purpose of making a decision about a financial product and users should verify details independently. This advertisement has not been reviewed by MAS. It is for general information only.
All comparisons and information contained in this publication reflect only Airwallex’s own research using public documentation on the stated dates and have not been independently validated.
Product features, pricing and other details are subject to change. All third-party names, products, and logos are trademarks of their respective owners and are referred to for identification and compatibility purposes only. If you would like to request an update, feel free to contact us at [[email protected]].
Airwallex (Singapore) Pte. Ltd. (201626561Z) is licensed as a Major Payment Institution and regulated by the Monetary Authority of Singapore.

Shermaine Tan
Manager, Growth Marketing
Shermaine spearheads the development and execution of content strategy for businesses in Singapore and the SEA region at Airwallex. Leveraging her extensive experience in eCommerce, digital payment solutions, business banking, and the cross-border industry, she provides invaluable insights that guide businesses through the complexities of global commerce. Specialising in crafting relevant and engaging content that resonates with business owners, her work is designed to drive growth and innovation within the fintech and business economy space.
Posted in:
Online paymentsShare
- What is a payment gateway, and how does it work?
- What does it actually take to build a payment gateway?
- How to build a payment gateway
- How long does it take to build a payment gateway?
- How much does it cost to build a payment gateway?
- Should you build your own payment gateway?
- Why most businesses use a provider instead
- Accept payments in 180+ countries with Airwallex


