💳 Healthcare IT · Payments · Acquiring · Reconciliation

Payment gateway integration

Collecting membership fees and other payments in a medical association platform with a reliable multi-acquiring architecture and reconciliation down to the last cent, part of the medical information systems platform.

Payment gateway integration is the association's single payment layer, with multi-acquiring, recurring payments, refund processing, transaction idempotency, and daily reconciliation with providers and the bank statement. A financial operation has to balance to the last cent, not just "roughly go through": the platform is built to this standard as a design requirement, not an operational idea.

🧭 Context

Why the payment layer is critical infrastructure for an association

Tens of thousands of members pay fees and pay for services, which adds up to hundreds of thousands of transactions a year. Without reliable payment layer integration, the association either loses money to reconciliation errors or drowns in manual mismatch handling. Finance is never "approximate": every cent must be posted, recorded, and available for audit.

Payment flow

Hundreds of thousands of transactions a year: fees, conferences, additional services. A volume that manual processing simply cannot handle.

Multi-acquiring

If one provider is unavailable, payments switch to a backup. Dependence on a single acquirer is a critical risk for the association's finances.

To the last cent, or not at all

Every cent must be posted, recorded, reconciled, and available for audit. This is a design requirement, not a "nice to have".

⚠️ Pain points

What usually breaks in a payment integration

⚠️

Double charges

Without idempotency, repeated clicks on the "pay" button, duplicate callbacks from the provider and cron job retries lead to double charges. Refunding money to a customer is an expensive procedure that hurts the organization's reputation.

🏦

Mismatches with the bank

The website shows "paid", but the money never reached the association's account. At the end of the month the accounting team sorts out hundreds of such cases by hand, until the system reconciles the platform with the bank statement automatically.

💔

The provider is down and everyone waits

When all payment logic is hard-wired to one provider, that provider's unavailability means every payment stops. A member of the association cannot pay the fee, and technical support can do nothing.

🔁

Recurring payment disaster

A cron job ran twice or hung halfway through the list: half the members were charged twice, the other half not at all. Without idempotency and status control, fixing this manually takes weeks.

⚙️ Approach

Architecture of the payment layer

The payment layer is a "single gateway" abstraction over multiple providers, with idempotency at the database level, an asynchronous workflow for recurring charges, and daily reconciliation against every source of truth.

1. A single gateway interface

The platform core talks to an abstract gateway through a stable contract: create a payment, check its status, issue a refund. Behind the interface sit the specific provider adapters.

2. Idempotency

Every payment has a unique operation key. Repeated calls with the same key produce the same result. The database is protected by a unique constraint, and the application checks the status before sending the request to the provider.

3. Recurring charges through queues

Subscription charges are placed in a queue once a day, and a worker processes the records in batches with idempotency keys and retries on temporary errors.

4. Webhook plus status polling

Providers send a callback when a status changes. The platform receives the webhook, verifies the signature, and updates the status. In parallel, a background worker polls "stuck" statuses so a lost callback does not leave transactions in limbo.

5. Daily reconciliation

Every morning the platform fetches the report from the providers and compares it with the internal database. Discrepancies go to the administrator's queue. In parallel, the platform reconciles against the bank statement.

6. Reports for the accounting team

Registers of payments and refunds, reports on provider fees and disputed operations, a revenue forecast, exports in 1C/SAP format. The accounting team does not re-enter data.

📊 Proof in production

How it works with tens of thousands of payers

In SLAtech's flagship case, the payment layer handles membership fees on a national platform through multi-acquiring with daily reconciliation. Transaction idempotency protects against double charges, and a dunning workflow handles failed recurring attempts.

Multi-acquiring

Fault tolerance through multiple providers with automatic failover

18 years

Of continuous operation of the module without a rewrite

Open the case studies section

❓ FAQ

Frequently asked questions about payment gateways

Which payment scenarios does the platform support?

One-time payments (annual fee, conference, additional services), recurring payments (automatic charging of the fee on the anniversary date), split payments (one payment across several postings: general fee, regional, section), refunds (pro rata when leaving the association, full when cancelling a recurring charge within the window). All are linked to the membership and fees module.

Which payment providers are integrated?

The architecture is designed for multi-acquiring: several providers run at the same time, and the choice for a specific payment depends on the country, card type, and availability. A typical set: acquiring by major banks, SBP (the Russian Faster Payments System), Apple Pay/Google Pay through the acquirer, international providers for members abroad. Adding a new provider is a separate module behind the single gateway interface.

How is payment idempotency ensured?

Every payment has an idempotency key, a unique operation identifier. If the user clicked "pay" twice, or the browser lost the connection and repeated the request, or the provider sent a duplicate callback, the system will execute exactly one transaction. It is implemented at the database level through unique constraints and at the application level through checks before the request is sent to the provider.

How are refunds processed?

A refund is initiated through the administrator interface, with the reason and amount required. The system checks that the original transaction has sufficient funds, as well as the provider's refund period and limit. Once approved, the refund is sent to the provider through the relevant API, and its status is tracked until final completion. Asynchronous responses from the provider are handled through a callback or periodic polling.

How is platform data reconciled with the bank statement?

Every day, the platform receives reports from providers detailing all transactions. The reconciliation module matches every record against the internal database. Discrepancies go to the administrator's queue: "the provider shows a payment we do not have", "we have a payment the provider has not confirmed". Reconciliation with the bank statement sits on top of reconciliation with the provider: what actually reached the association's account, and whether it really matches the fee calculations.

Which reports are available to the accounting team?

The standard set: a register of payments for a period, broken down by type and payer, a register of refunds, a report on provider fees, on unallocated and disputed payments, monthly revenue trends, a revenue forecast. Exports in 1C/SAP formats let the accounting team load the postings into the accounting system without manual re-entry.

🔗 Related areas

What connects to the payment layer

💳

Membership and fees

The main consumer of the payment gateway: the module for collecting annual fees with membership categories and a dunning workflow.

Learn more

🔒

Personal data protection

Payment data is a separate category with special requirements for storage, masking, and processing.

Learn more

🔑

SSO and role model

Which administrators are allowed to initiate refunds and view financial reports is defined through the role model.

Learn more

Need a reliable payment layer for your medical organization?

We will show you working multi-acquiring and a reconciliation architecture serving tens of thousands of payers, and discuss integration with your providers and your accounting system.