Software
Payment Architecture and Payment Gateway Integration
Checkout is where your product meets money, and where a bug costs the most. We build the payment software that connects to licensed banks and payment institutions, with security, error handling, reconciliation and conversion planned from day one.
Short answer
Payment architecture is the software design that connects a digital product's card, wallet, subscription, refund and reconciliation flows to the infrastructure of licensed banks and payment institutions in a secure, measurable and fault-tolerant way. UNIT İstanbul designs and builds these integrations under its Unit Software brand; it holds no funds, processes no payments and works on licensed providers' infrastructure.
What is payment architecture, and when does it need separate attention?
Payment architecture is the software structure that decides how a payment is initiated, how the cardholder is authenticated, how the result is written into your system and with what assurance, and how refunds and accounting entries are tracked. Behind a single pay button, order, stock, invoicing, notification and reporting systems all work together.
The standard payment plugin of an off-the-shelf e-commerce platform is enough for most simple shops. Designing the payment flow separately becomes necessary when:
- You run a recurring billing model such as subscriptions, memberships or usage-based billing.
- You operate a marketplace or service platform that sells products from more than one seller.
- Payments are taken on the website, in the mobile app and through the call centre against the same customer account.
- You work with more than one bank or payment institution and want to route transactions by cost and approval rate.
- Reconciliation is done by hand, refunds are tracked over email and accounting records do not match collections.
What does UNIT İstanbul do in payment infrastructure, and what does it not do?
Providing payment services, processing card data and holding customer funds are licensed, regulated activities in Türkiye and in the other markets we work in. UNIT İstanbul is not a payment institution, an electronic money institution or a bank. We design and build the software that connects to the infrastructure offered by institutions that hold these licences.
| Area | Licensed bank or payment institution | Us, as Unit Software |
|---|---|---|
| Processing card data and authorisation | Carries it out and is responsible for it | We build an integration that never touches card data |
| Holding and transferring funds | Holds funds in its accounts and pays out to sellers | We manage transfer instructions and records in the software |
| Merchant agreement and risk approval | Reviews the application | We prepare the technical documentation and the testing process |
| Regulatory compliance | Meets its licence obligations | We build the software to the conditions set by the provider and your legal adviser |
We do not give legal opinions on how the relevant payment regulations apply to your business; we recommend clarifying those questions with your legal adviser and the licensed institution you will work with. On the software side, we turn those decisions into technical requirements.
Bank virtual POS integration or a payment institution?
A virtual POS is the service a bank gives a merchant so it can accept cards online. Payment institutions put a single interface in front of many banks and payment methods; onboarding and integration are faster, but the balance between fees and control is different. Which one suits you depends on your transaction volume, your instalment needs and your team's operational capacity.
| Option | When it fits | What to watch |
|---|---|---|
| A bank's own virtual POS | High volume and a strong relationship with specific banks | Every bank means a separate integration, separate reports and separate reconciliation |
| Integration through a payment institution | You need a fast start, multiple payment methods and marketplace features | Provider lock-in; ask about the terms for moving stored cards |
| Multiple providers with a routing layer | Approval rate, cost and redundancy against outages matter | An extra software layer that needs broader testing and monitoring |
Whichever option you start with, we build a payment layer that separates provider-specific code from your own business logic. Adding or replacing a provider later then does not mean rewriting your order and accounting code.
How should the cardholder authentication (Three-Domain Secure) flow be built?
Cardholder authentication is the step in which the bank asks the cardholder for a one-time code or a banking app approval before approving the payment, widely known as Three-Domain Secure. The user briefly moves to the bank's screen; if the flow is not built carefully, an order can stay unconfirmed even though the money has been taken.
- Before payment, the order is saved with a unique identifier and a pending status.
- The payment request is initiated from the server; the amount and currency come from the order record, not from data sent by the browser.
- The user is redirected to the authentication screen or it opens inside the page; on mobile it is designed to complete without leaving the app.
- On return from the bank, the result is processed based on a server-side verification call to the provider or a signed notification, not on the user's browser.
- The order is confirmed, stock is reduced and notifications are sent; this step completes on the server even if the user closes the return page.
How do you store cards and reduce PCI DSS scope?
PCI DSS is the card industry security standard that every organisation processing, transmitting or storing card data must follow. The most effective way to reduce the compliance burden is to make sure card numbers never reach your servers at all.
- Hosted payment fields: Card details are entered into secure fields the provider embeds in your page, or on its payment page; your system receives only a token.
- Tokenisation: Repeat payments with a saved card and subscriptions use the token issued by the provider instead of the card number.
- No security codes stored: The code on the back of the card is never written to a database, log or error record.
- Log masking: Card, identity and contact data are masked automatically in request and response logs.
- Access separation: The payment service's keys are kept in a separate secrets store, permissions are granted per person and keys are rotated regularly.
This approach also affects which PCI DSS self-assessment questionnaire applies to you; we recommend making the final assessment with your provider and, where needed, a qualified assessor. Processing of personal data and retention periods are set up in line with your KVKK (Turkish data protection law) privacy notice.
How are subscriptions, marketplaces and split payments designed?
Subscriptions and recurring payments
With subscriptions, the real work starts after the first charge. The renewal schedule, when and how often a failed charge is retried, how the customer is told that their card has expired, and how the remaining period is calculated on upgrades and downgrades all need written rules. When these rules are designed independently of the code and can be changed from the admin panel, the product team can test pricing without waiting for a developer.
Marketplace and sub-merchant payments
In a marketplace the customer pays once, and the amount is split into items such as seller shares, the platform commission and shipping. The split and the payouts to sellers are run by the licensed payment institution's sub-merchant infrastructure; on the software side we build seller onboarding, commission rules, the payout schedule, recalculation of the split after partial refunds and seller reports. Set-ups that may require a licence, such as paying sellers from the platform's own account, should be clarified with your legal adviser at the outset.
How are refunds, cancellations and reconciliation managed?
A cancellation (void) reverses a transaction in full before the end-of-day settlement; a refund pays back all or part of a settled transaction to the card. A chargeback starts with the cardholder's dispute at their bank and requires gathering evidence. These three cases should be modelled as separate states in the software.
Reconciliation is the comparison of payment records in your system with the provider's reports and the amounts that reach your bank account. A reconciliation service that pulls provider reports automatically, flags unmatched records and posts entries to your accounting or ERP system greatly reduces the manual checks your finance team does. We plan broader accounting and ERP integrations together with our enterprise software work.
How are in-app payments and financial flows integrated?
If you sell digital content and subscriptions in a mobile app, the app stores' rules on using their own purchase systems come into play; for physical goods and services you can use card payments or digital wallets. Making this distinction at the start of product design reduces the risk of rejection in store review. We describe our approach to apps as a whole on the mobile app development page.
Adding banking features to your app, such as account information, payment initiation, international money transfers or bill payments, is possible through the open banking and payment interfaces offered by licensed institutions. In these integrations, user consent, session duration, how exchange rates are shown and a clear statement of which institution carries out the transaction are part of the screen design.
How are payment errors, timeouts and fraud handled?
The most dangerous situation in payments is a transaction with an unknown outcome: the request was sent, and the response timed out. Blindly retrying the payment can lead to a double charge. A robust payment infrastructure is built on these principles:
- Every payment request is sent with an idempotency key, so even if the same request arrives twice, only one transaction is created.
- Payment states are managed with an explicit state machine; beyond pending, approved, declined, cancelled and refunded, no intermediate state is left undefined.
- Transactions with an uncertain outcome are queried with the provider in the background and moved to the correct state automatically.
- Provider notifications are accepted only after their signature is verified, and out-of-order or duplicate notifications are processed safely.
- Fraud controls combine the provider's risk engine with your own business rules, such as limits on repeated attempts, account age and delivery address mismatches.
- Approval rate, decline codes, response times and notification delays are monitored, and the team is alerted as soon as a threshold is crossed.
How is payment conversion measured and improved?
The payment screen is the last step of a funnel and deserves its own measurement. When reaching the payment page, entering card details, moving to the authentication screen, returning from authentication and approval are tracked as separate events, you can see where the drop-off happens. Translating bank decline codes into messages the user understands and offering an alternative payment method can win back part of that loss.
Our roots as a marketing agency help here: we set up payment events in the same language as ad and analytics measurement and plan from the start how revenue data flows correctly back to campaigns. We run improvements across the whole funnel together with our CRO and analytics team; for the e-commerce site as a whole, see our web and e-commerce service.
What determines the cost of a payment infrastructure project?
Cost is driven mainly by the number of providers to connect, the payment model (one-off, subscription, marketplace), the number of channels (web, mobile, call centre), the depth of accounting and ERP integrations and the state of the existing system. Access to the provider's test environment, the merchant approval process and the provider's pre-launch tests also shape the timeline. After discovery, we set out the scope, deliverables and maintenance terms in a written proposal. You can find our other software services and references on the Unit Software page, or get in touch to talk about your project.
How we work
Discovery and flow map
We review your payment model, channels, existing provider agreements and your finance team's processes, and draw every payment, refund and reconciliation flow on a single map.
Provider and architecture decision
We compare virtual POS, payment institution and multi-provider options with their reasoning, and document an architecture and data model in which card data never enters your system.
Building the payment layer
We develop the provider-independent payment service, the state machine, idempotency, the notification handler and the admin screens.
End-to-end testing
In the provider's test environment, we test successful, declined, timed-out, refunded and cancelled transactions together with the user experience on web and mobile.
Controlled go-live
We complete the provider's live environment approval, open payments to limited traffic first and check reconciliation results with your finance team.
Monitoring and maintenance
We monitor approval rates, error codes and reconciliation differences, and apply provider interface changes and security updates under a regular maintenance plan.
What we deliver
- Payment, refund and reconciliation flow map
- Provider options comparison and architecture decision record
- Provider-independent payment service and data model
- Cardholder authentication and tokenised card storage integration
- Admin screens for subscription, marketplace or split payment rules
- Automated reconciliation service and accounting or ERP export
- Payment funnel measurement plan and monitoring dashboard
- Test scenarios, go-live checklist and technical documentation
- Maintenance plan covering security and provider updates
Get a quote
How does the quote process work?
It starts with a message. We prepare the rest, and no work begins until you have seen in writing what you pay for, why, and how much.
Message us
Tell us briefly about your business, your goal and your website, on WhatsApp or by email.
Free initial analysis
We review your search visibility, how AI answers mention you and any ad accounts you run, and prepare a one-page summary.
Strategy call
We go through the summary together and agree on priorities, goals and the metrics we will track.
Written proposal
We send a proposal that spells out scope, deliverables, timeline and fee. We start once you approve it.
Request a quote
Fill in the form; we will review your goal and current position and come back to you with a written proposal.
Service:Payment Architecture
Frequently Asked Questions
- Is UNIT İstanbul a payment institution?
- No. UNIT İstanbul is not a payment institution, an electronic money institution or a bank; it holds no funds and processes no payments. As Unit Software, we design, build and maintain the software that connects to the infrastructure of licensed banks and payment institutions. You sign your merchant agreement directly with the institution you choose.
- Which provider do you recommend for virtual POS integration?
- We do not recommend one provider for everyone. Your transaction volume, instalment needs, subscription or marketplace model, acceptance of foreign cards and your team's operational capacity are assessed together. During discovery we compare the options with their technical and operational reasoning and present them in writing so that the decision stays with you.
- Can we store card details in our own database?
- It is technically possible, but it significantly increases the PCI DSS compliance burden and is unnecessary for most businesses. Saved-card payments and subscriptions can run on tokens issued by the provider (tokenisation). The card's security code is never stored under any circumstances. We build the architecture so that card numbers never reach your servers.
- Can you add a new payment provider to our existing e-commerce site?
- Yes. After reviewing your existing code and platform, we add the new provider, ideally through a provider-independent payment layer. That makes it easier to add another provider or remove one later. During the transition we follow a controlled plan in which the old and new providers run side by side.
- What happens if a payment was taken but no order was created?
- In a well-built payment architecture this is caught automatically. Transactions with an uncertain outcome are queried with the provider in the background, provider notifications are processed on the server and the order is moved to the correct state. Unmatched records are flagged in the reconciliation report and the team is alerted, so the issue is seen before a customer complains.
- Do we need a payment institution licence to run a marketplace?
- That depends on whose account the money passes through and how payouts to sellers are made; the answer is set by the relevant payment regulations and your legal adviser. The common approach is to run split payments and seller payouts on a licensed payment institution's sub-merchant infrastructure. We build the seller, commission and payout software that works with that infrastructure.
- Is taking payments in a mobile app different from a website?
- Yes. Digital content and subscriptions sold inside an app fall under the app stores' own purchase rules; for physical goods and services, card payments or digital wallets can be used. Completing card authentication without leaving the app and showing the correct payment status during network drops also need to be designed specifically.
- Does a payment project need maintenance afterwards?
- It does. Providers update their interfaces and security requirements regularly, cards and authentication methods change, and new payment methods appear. The maintenance plan covers tracking provider changes, security updates, monitoring approval rates and errors, and regular checks of reconciliation differences. We define the scope in writing in the proposal.
Let us measure
your visibility today.
We map your current search visibility and your standing inside generative engines. Free, one page, real data.
