By Nima Dorostkar, Trading Systems Engineer — MT5, FIX & broker software · Updated
Payment gateway integration for brokers
Every deposit lands.
Every withdrawal is accounted for.
A deposit that fails is a client who trades somewhere else. Brokers and prop firms connect several payment service providers (PSPs) for cards, bank transfers, local methods, and crypto, and each one has its own API, callbacks, fees, and ways of failing. We build the layer that makes them behave as one cashier inside your client portal, mobile app, and trading terminal.
The hard part is not the payment page. It is what happens after it: crediting the right trading account exactly once, approving withdrawals safely, and proving every evening that the providers, your ledger, and the trading platform agree. That layer is part of every forex CRM and prop firm platform we build, and it can be added to the CRM you already run.
In short
- Nima Dorostkar's team integrates payment service providers into broker and prop firm platforms: card, bank transfer, local payment method, and crypto deposits and withdrawals in one cashier.
- The payment layer routes each deposit to a suitable provider, retries a declined payment through the next one, and credits the trading account on MetaTrader 5, cTrader, or another platform exactly once.
- Withdrawals run through approval rules, and a daily reconciliation matches every provider, the ledger, and the trading platform.
- A payment layer with its first providers typically takes 2–4 months, and the broker owns the source code.
What we build
Payment gateway integration:
what's included.
One cashier, every method
Cards, bank transfers, local payment methods, and crypto and stablecoin deposits behind one deposit and withdrawal flow, in the portal, the app, and the terminal.
Routing & cascading
Each payment goes to a provider chosen by method, currency, and country, and a declined payment is retried through the next provider automatically.
Exactly-once crediting
Provider callbacks are verified, and the deposit is written to MT5, cTrader, or your platform as a single balance operation — a retry or a duplicate callback never credits twice.
Withdrawal approvals
Rules by amount, method, client risk, and KYC status, payout to the method the money came from, and a second approver for the finance desk.
Reconciliation & ledger
A double-entry ledger behind every movement, and a daily automated match of provider statements, the ledger, and platform balances, with differences flagged the same day.
Fraud & chargeback signals
Unusual deposit velocity, device and card-to-client mismatches, and deposit-then-withdraw patterns flagged to compliance before a withdrawal is approved.
At a glance
What each payment method needs from the integration
| Method | Why clients choose it | What the integration has to handle |
|---|---|---|
| Cards | Instant and familiar | 3-D Secure, declines and cascading, chargebacks, refunds to the same card |
| Bank transfer | Large amounts | Matching incoming transfers to clients, slower settlement |
| Local payment methods | The way people already pay in their country | A different provider and flow in each country |
| Crypto and stablecoins | Fast, and available almost everywhere | An address per client, confirmations, network fees, and sender information where the rules require it |
| Internal transfer | Moving money between a client's own accounts | The same ledger and platform balance operations, with no provider involved |
How we build it
Engineered for
real money, from day one.
- 01One adapter per provider
Each PSP sits behind the same internal interface, so adding or replacing a provider is a contained change, not a rewrite.
- 02Card data stays with the provider
Hosted fields or a redirect keep card numbers out of your systems, which keeps your PCI DSS scope small.
- 03Money moves are idempotent
Every deposit and withdrawal carries one unique reference from the first request to the platform balance operation, so timeouts and retries are safe.
- 04Tested with failures
Declines, duplicate and late callbacks, and provider outages are rehearsed on staging before a provider goes live.
Platforms & technology
- MetaTrader 5
- cTrader
- DXtrade
- Match-Trader
- Card PSPs
- Local payment methods
- Crypto & stablecoins
- Webhooks
- PostgreSQL
- Go
Questions
Payment gateway integration FAQ
How do forex brokers integrate payment providers?
A broker connects each payment service provider's API to its client portal and back office. The payment layer creates the payment, receives and verifies the provider's confirmation, and writes the deposit to the client's trading account on MetaTrader 5, cTrader, or another platform as a balance operation. Withdrawals run the other way, through approval rules. Most brokers connect several providers and route between them.
What is payment cascading?
Payment cascading is automatically retrying a declined payment through another payment service provider. If the first provider declines a card deposit, the payment layer sends it to the next provider set up for that method, currency, and country, so the client is not left to start again.
Can deposits credit MT5 accounts automatically?
Yes. When a provider confirms a payment, the payment layer posts the deposit to the MetaTrader 5 account through the Manager API or Web API as a balance operation, tied to the payment's unique reference so it can never be applied twice. The same approach works for cTrader, DXtrade, and Match-Trader through their own APIs.
Can brokers accept crypto and stablecoin deposits?
Yes. Crypto deposits are usually taken through a crypto payment provider that issues an address per client and reports confirmations. Stablecoins have become a major funding method in some regions: one global CFD broker, Eightcap, reported stablecoins at up to 40% of deposits in LATAM and Southeast Asia. In the EU, crypto-asset transfers must carry sender and recipient information under the travel rule, with the EBA's guidelines applying from 30 December 2024.
Does a broker need PCI DSS compliance to take card deposits?
PCI DSS applies to every business that accepts card payments, but how much of it applies depends on how card data is handled. When the card form is hosted by the payment provider, card numbers never reach the broker's systems and the broker's own scope is much smaller. Since 31 March 2025, the 51 requirements that PCI DSS v4.0 introduced as future-dated have been mandatory.
How long does a payment integration take?
A payment layer with cashier, routing, approvals, reconciliation, and its first providers typically takes 2–4 months as a focused project. After that, each new provider is a contained addition, because every provider sits behind the same internal interface.
Start a project
Talk to an engineer about
payment gateway integration.
Tell us what you run today and what you need. You'll hear back from a senior engineer with questions, a proposed architecture, and a realistic timeline.