Payment Gateway Integration: Methods, PCI Scope, and Cost
Payment gateway integration is more than dropping in an API. Here's how the methods differ, how each sets your PCI DSS scope, the architecture for reliable payments, and what it costs.

On this page

Payment gateway integration is the work of wiring a payment gateway into your product so it can take money reliably. Vendor quickstarts make it look like an afternoon, and the API call that charges a card really is that quick. The engineering sits around it: choosing an integration method that sets how much of the PCI DSS standard you answer for, designing a payment flow that never double-charges when the network hiccups, verifying webhooks, reconciling your books daily, and handling the long tail of declines, timeouts, and 3-D Secure challenges. The wrong method leaves you running a compliance program you didn't need. The wrong architecture loses or duplicates money in production.
A gateway's own documentation covers that gateway. It won't compare the integration methods for you or explain how each one changes your PCI footprint. This guide does both for online payment gateway integration (web checkout, subscriptions, invoices), and then covers payment gateway API integration, reliability, and cost in the framing we use to scope and build one.
The short version
- Payment gateway integration means wiring an existing gateway into your product to take money reliably; the API call that charges a card is the easy part, and the real work is the method choice, PCI scope, reliability, and reconciliation around it.
- Three integration methods trade design control against compliance weight: a hosted or redirect page keeps card data off your servers, embedded iframe fields tokenize the card in the browser, and a direct API puts raw card data on your own server.
- Your integration method is the biggest lever on PCI DSS scope: a hosted page or a fully provider-served iframe can qualify for the lightest SAQ A, a payment form your own page or scripts control maps to the middle SAQ A-EP, and direct card handling means the full SAQ D program.
- Reliable payments rest on an explicit payment state machine, idempotency keys that make retries safe, and the outbox pattern that keeps your database and the gateway from drifting apart.
- Webhooks must be signature-verified, treated as at-least-once, and handled out of order, while daily reconciliation against an append-only ledger proves your books and the bank agree to the cent.
- Total payment gateway integration cost splits into one-time engineering ($6,000 to $14,000 for a single hosted gateway, $15,000 to $35,000 for an embedded tokenized API checkout, and $40,000 to $85,000+ for multi-gateway orchestration at senior CEE rates) and ongoing processor fees (2.9% + $0.30 blended cards, Interchange++ enterprise markup, and 0.8% capped ACH).
What payment gateway integration is, and how it differs from building a gateway
Payment gateway integration means connecting an existing payment gateway to your application so it can authorize, capture, and report on transactions, without you running the card-network machinery. You are the merchant; the gateway is the service that talks to the processors and the card networks; integration is the wiring between your checkout, your backend, and that service.
The distinction that trips people up is integration versus building a gateway. Payment gateway development, building one from scratch, means becoming the thing that connects directly to acquirers and card networks, holds the certifications, and runs the fraud and routing engines, which almost no product needs and which makes sense only for payment companies whose core product is the gateway itself, a distinction we break down in our payment processing software guide. For everyone else, the smart version of the job is building the right logic around a gateway you didn't write.
What is a payment gateway
A payment gateway is the service that takes a customer's card details, encrypts them, and passes the transaction to the banking networks for an approve-or-decline decision. It sits between your checkout and the acquiring bank, so your systems never speak the low-level ISO 8583 card-originated transaction messages those networks use. In practice most teams reach a gateway through a provider that bundles more than raw connectivity: tokenization so you store a reference instead of a card number, fraud screening, a dashboard, and webhooks that tell you what happened after the sale.
How a payment flow works end to end: authorization, capture, settlement
A payment flow runs in three distinct phases that behave very differently: authorization checks and holds the funds, capture tells the bank to take them, and settlement is the later batch transfer of money into your account. Treating these as one step is the source of a surprising number of payment bugs, because each phase can succeed or fail on its own, and the gaps between them are where money goes missing if you aren't tracking state.
Authorization is the real-time check. Your server asks the gateway to verify the card and place a hold for an amount, the request reaches the issuing bank, and you get back an approve or decline in roughly a second. An approval is a promise, not a transfer: the funds are reserved but no money has moved yet. Capture is the instruction to collect on that promise. Most checkouts capture immediately, but you can authorize now and capture later, the shipped-goods or hotel-style flow: confirm the card at order time, take the money at fulfillment. An uncaptured authorization eventually expires and releases the hold.
Settlement is the part that confuses founders because it runs on bank time, not internet time. Your application sees an approved capture instantly, but captured transactions are batched, usually daily, and the funds take a day or more to land in your acquiring account, net of fees and sometimes net of reversals. When your gateway also processes bank-to-bank debits under the Nacha ACH Operating Rules, settlement and return windows stretch even further across multiple business days. This delay is why the ledger and reconciliation below matter: "the gateway said yes" and "the money is in our account" are different events on different clocks, and a correct system records both. Refunds and chargebacks ride the same rails in reverse on their own schedule, so any model that treats a payment as one instantaneous event misreports your real position.
Hosted vs API vs direct payment gateway integration: an engineering trade-off table
The three integration methods (hosted, embedded API, and direct API) trade design control against compliance weight and engineering effort almost linearly, and picking among them is the most consequential early decision in any payment gateway integration. The table lays the trade-offs side by side.
These methods form a ladder, and you want the lowest rung that still meets your product needs. To integrate a payment gateway in a website quickly, start with a hosted page and climb only when the product asks for it. Embedded fields, such as the Drop-in and Components patterns in the Adyen online payments integration guides, are the default for products that want their own branded flow without owning card data, since the provider's iframe collects the sensitive number while your page owns everything around it. Direct API is a deliberate, heavy choice you make only with a concrete reason and the team to support it. Almost every "we need full control" instinct is satisfied by embedded fields at a fraction of the compliance cost.
How your integration method sets your PCI DSS scope
Your integration method is the biggest factor in how much of the PCI DSS standard you must comply with, because PCI scope follows the card data and each method routes that data differently. The Payment Card Industry Data Security Standard, published by the PCI Security Standards Council, defines Self-Assessment Questionnaire (SAQ) types that match different ways a merchant takes payments. Which SAQ applies is decided by your architecture, not your intentions, so the method you pick effectively chooses your compliance burden.
The methods map onto the questionnaires, with one nuance on iframes. A fully hosted or redirect integration, where card data never reaches your servers, corresponds to SAQ A, the smallest scope at roughly two dozen requirements, because you've outsourced all handling and storage of card data. A provider-hosted iframe can also qualify for SAQ A when every element of the payment page comes directly from the PCI-compliant provider, as the PCI SSC's SAQ A eligibility update spells out. SAQ A-EP, a middle tier of around 190 requirements, applies when your own page or scripts can affect the payment form before the data reaches the processor: merchant-built JavaScript, a direct post, or an iframe your code creates. That tier keeps your website in scope, including the client-side script requirements 6.4.3 and 11.6.1 of PCI DSS v4.0.1, mandatory since 31 March 2025. A direct API integration that collects card data on your own server lands you in SAQ D or a full Report on Compliance, which is 250 to 300+ requirements depending on how you count them.
Treat those counts as approximations, not official totals. The SAQ that applies depends on who controls the payment page, so confirm it with your provider's compliance guide and your acquirer before you commit to an architecture.
Keep the card number out of your systems and your PCI scope collapses. There's rarely a product reason to accept SAQ D, and the gap between A-EP and D is enormous in audit effort, in the controls you must run, and in the breach surface you expose, so our default is to architect every integration so the raw card never lands on a server we control. One point on language, because it's frequently muddled: as an engineering partner we build to PCI DSS v4.0.1, implementing the controls and producing the evidence an assessment needs, but we cannot hand you a certification. You achieve that with your own assessors; anyone claiming to make you "PCI certified" on your behalf is blurring a line that matters.
Reliable payment gateway integration: payment state machine, idempotency keys, and the outbox pattern
A reliable payment integration is built on three load-bearing pieces: an explicit payment state machine, idempotency keys that make retries safe, and the outbox pattern that keeps your database and the gateway from drifting apart. Payments are a distributed-systems problem: the network can fail at the worst moment, after the gateway processed the charge but before you learned the result, and a system that doesn't plan for that ambiguity will eventually take money it cannot account for.
Start with the state machine. A payment isn't a boolean, it's a lifecycle, and modeling it as an explicit set of states with allowed transitions is what keeps it correct, following the same asynchronous state-machine model popularized by Stripe Payment Intents. A workable set is created, authorized, captured, failed, refunded, and a deliberate requires_action for flows that bounce into a 3-D Secure challenge. Every transition is driven by a concrete event, an API response or a webhook, and illegal transitions are rejected rather than silently applied. When a payment is stuck, the state tells you exactly where it stopped.
Idempotency keys are how you make retries safe. Every request that moves money carries a unique key you generate, and the gateway uses it to guarantee the operation runs once even if it arrives twice (Stripe documents the mechanism under idempotent requests). The scenario this defends against is common: your charge call times out, you don't know whether it went through, so you retry, and without a key you've just charged the same payment twice. With the key, the second request returns the result of the first, so no money-moving call should leave your systems without one.
The outbox pattern solves the dual-write problem. You need to both update your database (mark the order paid) and trigger an external action (call the gateway, or publish an event onto a Redpanda vs Kafka stream), but with no shared transaction across a database and an external API, a crash between the two leaves them inconsistent. The outbox fixes this by writing the intent to an outbox table inside the same database transaction as your business change, so either both commit or neither does, and a separate worker reads the outbox and performs the external call, retrying until it succeeds. Your database stays the source of truth, and combined with idempotency keys this lets a payment survive a crash at any point without losing or duplicating money.
On Chaindoc, an eIDAS-qualified e-signature platform, we wired Stripe Connect so an agreement, a KYC identity check, and payment collection close inside one regulated flow, where an authorization, a payout to the right party, and an identity verification all have to agree and survive failures without leaving the document in an ambiguous state. The state machine, idempotency, and outbox discipline above are what make a flow like that auditable instead of fragile, and the same patterns underpin any custom software development where correctness under failure is the requirement. The signing half of that build, tiers, identity binding, and audit evidence, is covered in our guide to e-signature software development.
Webhooks done right: signature verification, retries, and out-of-order events
Webhooks are how a gateway tells your system about things that happen after, or outside of, your original request: an HTTP call to your server reporting that a payment captured, a dispute opened, or a payout settled. Handling them correctly means verifying every signature, treating delivery as at-least-once, and never assuming events arrive in order, because the naive handler that trusts the payload and processes it once is wrong in three ways, each of which has bitten teams in production.
Verify the signature first, before you read the body as truth. A webhook endpoint is a public URL anyone can POST to, so an unverified handler that marks an order paid on receipt can be fooled by anyone who finds the URL. It's a textbook case of broken authentication in the OWASP API Security Top 10 (2023). Gateways sign each event with a secret shared only with you (the Stripe webhook docs show the pattern), and your handler must recompute that HMAC signature over the raw request body and check the timestamp tolerance before doing anything else.
Delivery is at-least-once, so your handlers have to be idempotent. Gateways retry webhooks until they get a success response, so network blips cause the same event to arrive more than once, and a handler that isn't idempotent will ship the order or credit the wallet twice. The fix is to record each processed event ID and ignore repeats, so the second delivery is a no-op. Events also arrive out of order: a captured event can land before the authorized event that logically precedes it. This is why the state machine matters: rather than blindly applying whatever arrives, you check whether the transition is legal from the current state and hold or reconcile anything early.
The teams that get payments right treat the gateway call as the easy hour and spend their effort on the reconciliation, the idempotency, and the question of who owns each failure. The charge succeeds in a second. Making sure your books and the bank agree to the cent every day is the actual build.
Reconciliation and ledgering: matching payment gateway events to your records
Reconciliation is the daily discipline of proving that your records and the gateway's records agree to the cent, and it rests on keeping an append-only ledger as your internal system of record for money. Your application database tracks orders and payment states, but it isn't a financial ledger, and treating it as one is how discrepancies hide until an audit drags them out. A ledger is a separate record where every money movement is an immutable entry: you never update or delete a financial fact, you only append corrections, which is what makes the books auditable.
The job itself is simple but essential. Gateways publish daily settlement files or an API that lists every charge, refund, fee, and payout. Every day, an automated process pulls that report and matches it line by line against your ledger, with three possible outcomes. Matched entries confirm the world is consistent. Entries in the gateway report missing from your ledger usually mean an event you failed to record, often a missed webhook, which is why webhook reliability and reconciliation are two halves of one system. Entries in your ledger missing from the gateway, or amounts that disagree, point to a bug or a timing gap that needs a human. Because of the settlement delay, timing mismatches are normal at the boundaries of a day and should be expected, not flagged as errors.
What makes this robust is automating the match and escalating only the exceptions. A reconciliation a person runs by hand once a month silently breaks, the discrepancy weeks deep before anyone looks; a job that runs every day, auto-clears the matches, and surfaces only the unmatched lines turns reconciliation from a periodic panic into a quiet background check. Fees matter here too: the gateway's payout is net of its fees, so your ledger has to model gross charge, fee, and net settlement separately, or your revenue numbers will never tie out.
Error handling and retries: hard vs soft declines, timeouts, and 3-D Secure
Good payment error handling starts by separating declines you should never retry from ones you safely can, then layers in disciplined timeout handling and the 3-D Secure challenge flow. Most teams treat "the payment failed" as a single case, giving up too early on recoverable failures or hammering the gateway on permanent ones; the taxonomy is what makes the response correct.
A hard decline is permanent: the issuer is refusing this card for a reason that will not change on retry, such as a stolen-card flag, a closed account, or an invalid number. Retrying is pointless and can look like abuse to the networks, so the right response is to stop and ask for a different method. A soft decline is temporary: insufficient funds right now, a transient issuer error, a velocity limit. These can succeed on a later attempt, so they are candidates for a retry after a delay. The two come through in the gateway's response codes, and mapping each code to hard or soft is the first job of any decline handler. Subscriptions lean on this heavily: a smart retry schedule on soft declines recovers real revenue that a naive "cancel on first failure" would lose.
Timeouts are the hard case because they leave you in an ambiguous state: the request didn't return, and you don't know whether the gateway processed the charge or never received it. Here the earlier patterns earn their keep. You retry with backoff, you carry the same idempotency key so a retry of an actually-processed charge returns the original result instead of double-charging, and you let your state machine hold the payment as pending until a webhook or a status query resolves the truth. Never assume a timeout means failure or success, because either guess takes or loses money. Then there is 3-D Secure, governed by the EMVCo 3-D Secure (3DS2) specification, the issuer-driven step-up that passes rich browser or SDK context for frictionless risk evaluation or asks the cardholder to confirm with a banking-app challenge. When the gateway signals that a charge requires authentication, your flow moves the payment to requires_action, hands the customer to the challenge, and resumes on the result. Under European PSD2 strong customer authentication and the RTS on Strong Customer Authentication (Commission Delegated Regulation (EU) 2018/389), this step is mandatory for most EEA electronic payments unless a dynamic transaction-risk or low-value exemption applies, one more reason to build the challenge path as a first-class part of the flow.
Payment gateway API integration in practice: keys, a minimal server-side charge, tokenization
Payment gateway API integration comes down to three habits: handle your API keys like the secrets they are, always tokenize the card on the client and charge on the server, and treat test and live environments as strictly separate worlds. The payment gateway API itself is usually small and clean. The discipline around it keeps you secure and your scope minimal.
API keys come in pairs. You get a publishable key that's safe to expose in the browser, used only to tokenize a card, and a secret key that lives exclusively on your server and can move money. The secret key never appears in client code, a repository, or a log line, and it's loaded from a secrets manager at runtime. Providers issue separate test and live key sets, and keeping them apart prevents the bad day where a test charge hits a real card or a live charge vanishes into the sandbox. Keys should also be rotatable: on a schedule, and immediately if one is exposed.
The charge sequence that keeps your PCI scope small is always the same shape across providers. On the client, the customer enters their card into the provider's secure field, the provider tokenizes it in the browser, and your page receives a token that stands in for the card, so the raw number never reaches your server and only that token goes to your backend. On the server, your code calls the gateway with the secret key, the token, the amount, the currency, and a fresh idempotency key, and the gateway returns an authorization or charge result you record against your state machine. Tokenization is the linchpin: because you store and pass a token, you can charge a returning customer, issue a refund, or run a subscription without ever holding the sensitive data, and your servers stay out of the heaviest part of PCI scope.
Payment gateway integration by platform (WooCommerce, Shopify, PayPal)
On a commerce platform, payment gateway integration is mostly configuration, because the platform ships the checkout and connects to the gateway through a prebuilt plugin or app. WooCommerce payment gateway integration means installing a gateway extension and entering your API keys. Shopify works the same way through its payment settings and provider apps, and PayPal is usually added as a second button beside cards through its own plugin or SDK. The card form comes from the provider, so PCI scope usually stays light, but check the plugin's compliance notes before you assume it.
The plugin stops at the checkout. Webhook handling for anything your own systems track, refunds and disputes mapped to your order states, and daily reconciliation of payouts against your ledger are still yours to build. Custom code also starts where the plugin ends: marketplaces that split payouts, or a second gateway for failover.
How to build a payment gateway
When teams ask "how to build a payment gateway," they almost always mean building the payment logic around a gateway, not building one from scratch, which is a payment-company undertaking very few products should attempt. What you actually build is the layer that makes a third-party gateway reliable inside your product: the tokenized checkout, the server-side charge with idempotency, the payment state machine, the webhook handlers, the ledger and reconciliation, and the decline and 3DS handling.
Testing the payment gateway integration and going live: sandbox, a declined-card and 3DS matrix, and the checklist
Testing a payment integration means driving every branch in the gateway's sandbox before any real money moves, then working a go-live checklist that confirms the operational pieces are in place. The sandbox is the provider's full-fidelity test environment, reachable with your test keys, and it gives you special card numbers that deterministically trigger specific outcomes: a clean approval, a particular decline, a card that demands 3-D Secure. One passing happy path proves little. Production payment systems break on the unhappy paths, so those are the ones to prove.
Build an explicit test matrix and run every row, as the table below lays out. An approved charge advances to captured and posts to the ledger; a declined card maps to the right hard or soft category and stops or queues a retry; a 3DS-challenge card moves to requires_action, runs the challenge, and resolves on both success and abandonment; a simulated timeout proves your idempotency key prevents a double charge; a duplicate submit yields exactly one charge. Webhooks get their own testing: trigger events in the sandbox, confirm signature verification rejects a tampered payload, and confirm a replayed event is a no-op.
Going live has its own checklist. Confirm the merchant account and acquiring relationship are active, not just the gateway test account. Swap test keys for live keys and verify nothing still points at the sandbox. Register your production webhook endpoints and re-verify signatures against the live signing secret, which differs from the test one. Stand up monitoring and alerting on payment failures, webhook processing, and reconciliation mismatches before the first real charge, not after the first incident. Run a small real transaction end to end, including a real refund, to prove the full loop, and confirm the reconciliation job is scheduled with someone owning the exceptions it surfaces. Ship without this operational layer and you find the gaps with real customers and real money.
Payment gateway integration cost and how to scope it
Payment gateway integration cost is two separate budgets that often get blurred together: the one-time engineering build (what you pay developers to wire checkout, webhooks, idempotency, and reconciliation) and ongoing gateway processing fees (what the payment service provider deducts from every settled transaction).
Engineering integration cost by scope tier
One-time build cost tracks how much of the payment lifecycle your infrastructure owns. Using blended 2026 senior engineering rates of $60 to $70/hr in Central and Eastern Europe (CEE) versus $140 to $160/hr in the United States, custom payment gateway integration lands across three clear tiers:
The biggest engineering cost lever is the same one that drives your PCI DSS footprint: how much card-adjacent logic you run yourself. A single hosted gateway stays lean because the provider owns the checkout screen and retry UI. An embedded API integration is the tier most growing SaaS products choose once checkout conversion and subscription recovery justify owning the flow. Multi-gateway orchestration earns its budget when regional payment methods, processor uptime, or basis-point routing savings outweigh the extra reconciliation work. We built exactly this pattern for Swissy, one of the types of digital wallets whose fiat on-ramp routes users to the optimal payment provider by country and currency behind one unified interface.
Ongoing gateway processing and settlement fees
Once your integration goes live, processor fees scale directly with gross merchandise volume (GMV). Modeling these unit fees in your ledger from day one prevents margin surprises on cross-border cards, high-ticket B2B invoices, and disputes. The rates below are list prices from Stripe pricing and Adyen pricing, checked in November 2026. Negotiated figures are illustrative, not published prices:
Stripe vs Adyen: blended vs Interchange++ break-even
The most common enterprise gateway decision we scope is Stripe versus Adyen. In engineering and unit-economics terms it's a choice between blended pricing you can ship on in days and Interchange++ pass-through economics with global acquiring on one provider.
Stripe defaults to blended pricing (2.9% + $0.30 on US online card-not-present charges, and about 2.7% + $0.05 on Stripe Terminal card-present taps, though check the current Terminal pricing page), charges $0 in monthly minimums, and issues live self-serve API keys in minutes, which gets a small team to a working checkout quickly. Adyen prices on Interchange++, passing through issuer interchange and card-network scheme assessments at cost plus a 0.60% + $0.13 published list markup that steps down with enterprise volume. It backs that with direct global acquiring licenses, so there are no stitched third-party sub-processors, and with unified online plus NEXO in-person terminal settlement. Adyen may also apply a minimum invoice depending on your business model.
The two diverge most on US regulated debit, high average order values, and cross-border local acquiring. The Federal Reserve publishes the Regulation II (Durbin Amendment) cap as 21 cents + 0.05% plus a 1 cent fraud adjustment, and network assessments add roughly 0.13% to 0.14% on top, varying by network and program. That puts regulated Visa and Mastercard debit interchange from large US issuers far below rewards credit cards at 2.0% to 2.5% interchange. The Fed's 2023 proposal to lower the cap was never finalized and the rule is under court challenge, so check its current status before you model savings. Blended pricing charges 2.9% + $0.30 on both card types and keeps the spread on every regulated debit card. Three monthly volume profiles with $100 average orders, at list prices, show why the break-even sits around $3M to $10M in annual GMV, depending on debit share and order value:
Below roughly $3M per year, Stripe usually wins on total cost of ownership: shipping weeks faster, skipping formal acquirer underwriting, and reading predictable net payouts outweigh modest basis-point savings. Above roughly $10M per year, Adyen's Interchange++ transparency and local acquiring usually justify the heavier engineering work, chiefly building an automated ledger parser for Adyen's itemized Settlement Detail Report (where interchange, scheme fees, and markup settle in batches rather than as a flat deduction per charge). Between those two marks, debit share and average order value decide it. Teams pairing online checkout with semi-integrated Stripe Terminal or Adyen Terminal API hardware should also review our POS software development guide for offline store-and-forward, EMV kernel certification, and unified omnichannel refunds.
For most products, the right sequence is to launch on a single hosted or embedded provider, instrument net-of-fee ledgering cleanly, and add bank debits or multi-PSP routing when transaction volume proves the payback. Global SaaS teams weighing whether to offload cross-border VAT and sales-tax liability to a Merchant of Record before graduating to direct Interchange++ acquiring can compare effective take rates in our Paddle vs Lemon Squeezy teardown. If high-ticket B2B invoices or wallet top-ups push you toward instant bank account verification and direct sponsor-bank ACH clearing, see our Plaid vs Stripe unit-economics benchmark comparing Stripe Financial Connections against Plaid Signal and Finicity waterfalls.
For broader engineering budgets, see our fintech app development cost guide, ecommerce app development cost guide, and custom software development cost guide, weigh vendor trade-offs in build versus buy for software, and see how gateways fit larger financial products in our embedded finance and banking as a service guides. Whatever the volume, payment gateway integration pays off when the PCI boundary, the state machine, and the fee ledger are decided before the first charge.

CTO and Co-founder at Idealogic. Directing engineering, systems architecture, security, and full-stack delivery across web, mobile, and blockchain.
Frequently asked questions
A payment gateway is the service that captures a customer's card details, encrypts them, and passes the transaction to the banking networks for authorization. It sits between your checkout and the card processors, returning an approve or decline result and shielding you from the raw card number. Most teams reach it through the payment gateway API of a provider that also bundles tokenization, fraud screening, and webhooks.
A hosted gateway moves the card entry onto the provider's own page or iframe, so card data never touches your servers and your PCI burden drops to the lightest questionnaire. An integrated gateway collects card details inside your own checkout and sends them through the gateway API, which gives you full control of the experience but pulls more of your systems into PCI scope. It is a direct trade between design control and compliance weight.
A single hosted or drop-in integration on one provider, with webhooks and reconciliation wired up, is usually a matter of weeks. An embedded API checkout with tokenization, a payment state machine, and a full test matrix runs longer. A multi-gateway setup with routing and failover is a multi-month build. The gateway call is quick; the reliability, reconciliation, and edge-case handling around it are what set the real timeline.
Yes, the integration method is the biggest lever on PCI DSS v4.0.1 scope. A hosted or redirect page, or an iframe served entirely by a PCI-compliant provider, keeps card data off your servers and can qualify for SAQ A (roughly two dozen requirements). A payment form your own page or scripts control maps to SAQ A-EP (around 190), and collecting raw card data on your server pulls you into SAQ D (250 to 300+, depending on how they're counted). Confirm the exact SAQ with your acquirer or your provider's compliance guide.
Yes, and many products do once a single gateway stops being enough. You wrap each gateway behind one internal payment interface, then add a routing layer that picks a provider by cost, region, currency, or health, and fails over when one returns errors. It adds real work in reconciliation, since every provider reports differently, which is why multi-gateway setups pair routing with a unified ledger.
Payment gateway integration cost has two parts: a one-time engineering build and ongoing processor fees. With a senior Central and Eastern European team, a single hosted or drop-in gateway runs $6,000 to $14,000 over 2 to 3 weeks, an embedded tokenized API checkout $15,000 to $35,000 over 4 to 8 weeks, and multi-gateway routing with failover about $40,000 to $85,000+ over 10 to 16 weeks (roughly double at US rates). Ongoing fees start at 2.9% + $0.30 per US online card charge on Stripe's standard pricing. Interchange++ pricing and ACH bank debits cost less at the right volume and ticket size.
An idempotency key is a unique identifier, usually a UUIDv4 tied to an order or payment attempt, that your server sends in the header of a charge or refund request. If a network timeout drops the response after the gateway processed the transaction, retrying with the exact same key tells the gateway to return the cached outcome rather than running a second charge. Stripe, for example, keeps keys for at least 24 hours.
3-D Secure 2 lets your checkout pass device, browser, and behavioral telemetry to the cardholder's issuing bank so low-risk transactions can approve through a frictionless flow without interrupting the buyer. When an issuer requires Strong Customer Authentication, such as under EU PSD2 rules, a gateway such as Stripe returns a requires_action status and triggers an in-page biometric or app-based challenge before authorization completes.
Stripe charges a blended 2.9% + $0.30 on domestic US online cards with no monthly minimum. Adyen uses Interchange++, which passes issuer interchange and network assessments through at cost and adds a published list markup of 0.60% + $0.13, negotiated lower at scale. The gap is widest on US regulated debit, where the Federal Reserve's published Regulation II cap is 21 cents + 0.05% plus a 1 cent fraud adjustment (the rule is under court challenge, so check its current status). At list prices a $100 regulated debit order costs about $1.13 on Adyen versus $3.20 on Stripe. The break-even usually falls at roughly $3 million to $10 million in annual volume, depending on debit share and average order value.
More from the journal

Paddle vs Lemon Squeezy in 2026: MoR Fees, Stripe & TCO
Paddle vs Lemon Squeezy and Stripe Managed Payments in 2026, compared on fees and 36-month TCO: stacked international and subscription surcharges, merchant of record liability, B2B Net-30 invoicing, PG17 entitlement guards, and the math for a $6M/yr SaaS.

Finix vs Stripe Connect in 2026: PayFac, IC++ & Split TCO
Engineering and 36-month TCO teardown of Finix vs Stripe Connect vs Payrix and Adyen for Platforms in 2026: PayFac-as-a-Service, Interchange++ spreads, PostgreSQL 17 split sub-ledgers, and $108M GMV math.

Anrok vs Avalara in 2026: SaaS Sales Tax, VAT & Stripe Tax
Engineering and 36-month TCO teardown of Anrok vs Avalara vs Stripe Tax in 2026: SaaS and AI token taxability, HRIS physical nexus, EU VIES reverse charge, PostgreSQL tax ledgers, and $18M ARR math.