Analyze with AI

Get AI-powered insights from this Mad Devs article:

Your store is preparing to sell in another market, but its existing payment connection does not meet the new checkout requirements. You already need another provider. The engineering question is how to add it without disrupting current orders, and what evidence will make the integration ready for release.

Consider an illustrative store with a working US checkout. Its second provider will handle only new, one-time card purchases on the Canadian storefront in CAD; US payments, subscriptions, and saved-card migration stay outside this change.

This guide approaches multiple payment gateway integration as the acceptance of one bounded release. You will leave with an architecture choice, an estimable scope, and evidence that engineering and finance can use to approve expansion.

Key takeaways

  • Define the first payment group before estimating a second gateway. Market, currency, purchase type, and payment method give the team a concrete boundary for implementation and testing.
  • Choose architecture by ongoing responsibilities as well as initial development. Someone must maintain API changes, investigate uncertain outcomes, and connect provider transactions to financial records after launch.
  • Agree on observable release evidence before increasing traffic. Engineering needs correct order and payment behavior; finance needs traceable transactions, fees, and payouts. Both need named owners for exceptions and a workable rollback decision.

Define what the second gateway needs to solve

Turn the business reason into a payment requirement. “Launch in Canada” needs a defined storefront, currency, method, and merchant account. Ask the provider to confirm that the actual account can accept the intended cards in CAD, capture payments, and issue the refunds your release requires. Verify production approval and settlement arrangements separately from sandbox access.

The illustrative store's release objective is: accept new, one-time Canadian-storefront card purchases in CAD through provider B, while preserving the existing US route through provider A. Existing subscriptions and transactions remain with their original provider. Moving saved cards requires separate investigation and is excluded.

A real commercial example supports the need for this engineering work. In its Grand Cru Concepts case study, Corefy describes a customer that arrived with one existing integration and plans for additional providers, then expanded across the US and Canada. This is a supplier-published account, not an independent performance benchmark or the source of our illustrative checkout design.

If redundancy is the objective, map common dependencies before promising failover. Both routes may still depend on the same application, network path, fraud service, or acquiring arrangements. Ask which failure the second route must survive and demonstrate that failure in a controlled test. A second provider does not, by itself, prove independence.

Record these confirmations alongside the objective. They determine whether the integration can satisfy the launch requirement at all.

Choose between direct integration and orchestration

Compare both approaches against the same Canadian payment group. A gateway provides the technical connection for payment processing; a PSP can bundle that connection with processing and other payment services. An orchestrator coordinates provider connections and routing. Product boundaries overlap, so evaluate the contracted capabilities rather than the label. Stripe's overview describes alternative integration approaches; Ecommpay's comparison discusses the operational trade-offs.

The choice between a payment gateway and orchestration turns on where integration work and operational responsibility sit.

ApproachWhen it fitsWhat the team implementsWhat the team maintains after launch
Direct second-provider integrationOne new market, a stable routing rule, and capacity to own two connections.A provider B adapter; Canadian CAD eligibility; checkout components; payment-state mapping; webhooks; refunds; financial exports.Both API integrations, credentials, status investigations, routing changes, and reconciliation exceptions.
OrchestrationMore providers or frequently changing routing rules are planned.The platform connection, merchant-account configuration, connector validation, order-state mapping, refund workflow, and reporting integration.Store eligibility rules, platform configuration, connector limitations, incident decisions, and financial acceptance.

With direct integration, an internal adapter separates checkout decisions from provider-specific requests and responses. Checkout asks for a payment operation; the adapter translates it and preserves the original provider reference. This boundary lets the store change one connection without distributing provider-specific conditions throughout order code.

An orchestration platform may supply connectors, routing controls, and consolidated visibility. Demonstrate the selected connector's actual capture, refund, webhook, and reporting behavior. Also establish whether the existing US connection can remain untouched while the Canadian route uses the platform. Available features do not establish that this particular setup supports them.

For our illustrative store, choose direct integration because the initial boundary is narrow and the team accepts maintaining two connections. Revisit orchestration when the roadmap adds providers or routing changes faster than the team can safely maintain them. Estimate both implementation and ongoing ownership before committing.

Scope the first release in a live checkout

Give engineering four work packages before selecting an SDK. The following scope belongs to the illustrative store and can become an estimation brief. Each package needs an owner, dependencies, and acceptance evidence.

1. Route

Determine eligibility on the server from storefront, currency, payment method, and purchase type. Only new, one-time Canadian-storefront card purchases in CAD go to provider B. Other supported new payments retain their existing route. Persist the selected provider and routing-rule version with the attempt so later configuration changes cannot rewrite its history.

Include a controlled activation switch and regression checks for the US checkout. If provider B is unavailable, define whether Canadian checkout pauses or uses an explicitly approved alternative. The existing US route does not automatically qualify to process Canadian CAD purchases.

2. Payment lifecycle

Include payment creation, any required customer authentication, authorization and capture under the store's chosen capture policy, and full refunds. Exclude partial refunds, subscriptions, and saved-card migration from this example's release.

Link the order ID, internal payment-attempt ID, provider identity, and provider transaction reference. Support must find the original payment from the order and initiate its refund through a documented channel. For example, Adyen's refund documentation distinguishes submitting a refund from learning its outcome through webhooks. Do not mark the refund complete merely because its request was accepted; account for later failure or reversal events under the provider’s rules.

3. Statuses

Make the order service responsible for applying agreed fulfillment rules from verified payment outcomes. Implement authenticated provider notifications, durable event processing, and safe handling of repeated or late events. Keep an explicit pending or unknown state when the result cannot yet be established, with a payments engineer responsible for investigation.

Define which system owns each status and how disagreement is repaired. Mad Devs' data synchronization guidance provides context for ownership and restoring consistency across systems.

4. Data for finance

Export order and attempt identifiers, provider references, gross amount, currency, fees, refunds, net amounts, and settlement or payout references where supplied. Preserve adjustments and currency conversion details when applicable. Finance owns matching exceptions, with engineering responsible for missing or incorrect integration data.

Extensibility is a concrete design concern: Mad Devs' CityCam case describes a payment module designed to accommodate additional payment systems. It does not establish routing behavior or revenue results. For solution-specific context, see Integration of Stripe Connect Into Your Project.

Test payment outcomes before increasing traffic

Accept the illustrative Canadian release against outcomes shared by checkout, payments engineering, support, and finance. The matrix below is a proposed acceptance template; the team should adapt the evidence to its provider and operating model.

ScenarioExpected resultAcceptance evidenceOwner
Successful purchase through provider BThe payment maps to its order; purchase confirmation and fulfillment occur once under checkout rules.Linked order, attempt, and provider records; event-processing trace; one fulfillment action.Checkout lead
Timeout followed by late confirmationThe attempt remains available for investigation; the late event resolves that attempt. Timeout alone starts no second charge through another gateway.Simulated lost response, persisted unknown state, correlated late event, and logs showing no cross-provider retry.Payments engineer
Refund after a routing changeSupport finds the original payment and completes the in-scope full refund through its original provider's supported channel.Original reference, refund request and outcome, support procedure, and matching financial record.Support lead with payments engineering
First payout from the new routeFinance matches transactions and fees to the provider report and bank payout; discrepancies enter an owned investigation.Reconciliation worksheet or export, payout reference, bank evidence, and exception log.Finance lead

Use the sandbox and controlled test harnesses to exercise successful and declined payments, lost responses, event replay, and refund handling where the provider supports them. A decline and an unknown outcome need different assertions: an explicit refusal must not be treated as a payment still awaiting confirmation.

Apply retry behavior from the selected PSP's documentation. For Stripe API v1 idempotent requests, reuse the key for the same operation within documented rules. Adyen's idempotency guidance defines its own retry conditions. A key at one provider does not deduplicate an independent charge at another.

Stripe's webhook documentation requires planning for duplicate delivery and events arriving out of order. Verify signatures and prevent replayed notifications from repeating business actions.

Production evidence arrives later: actual settlement, fees, bank receipt, and real payout matching require limited live traffic. Stripe's payout reconciliation report connects automatic payouts to their underlying activity; report availability follows a separate schedule. A sandbox pass cannot substitute for that financial check.

Set the conditions for expanding or rolling back traffic

Name the people who can approve expansion before enabling the Canadian route. For this illustrative release, the checkout lead and payments lead approve operational behavior, while the finance lead approves reconciliation evidence. The business owner authorizes the next traffic step after those checks. Record the decision and the period of evidence reviewed.

Compare successful payments within a comparable group: Canadian-storefront, one-time CAD card purchases, with similar traffic characteristics and a consistent denominator. US checkout performance alone is an unsuitable baseline for a new market. Review refusal reasons, unknown outcomes and their age, event-processing failures, refund results, and reconciliation exceptions alongside the success rate.

Set thresholds from the store's baseline, exposure, and tolerance for unresolved payments. These are team decisions, not universal industry targets. If evidence is insufficient, hold traffic at its current level and resolve the missing check before expansion.

Rollback changes routing for new payment attempts. It does not erase attempts already sent to provider B or move their refunds to provider A. The payments engineer continues monitoring unresolved B attempts; support retains access to original-provider refunds; finance continues reconciling B activity until outstanding items close.

If no approved alternative supports Canadian CAD purchases, rollback pauses that checkout group. Preserve US routing throughout. When first-payout reconciliation is a release gate, finance can approve only after the relevant report and bank evidence are available and any blocking discrepancies are resolved. Schedule that review around actual settlement timing rather than the deployment date.

Conclusion

Before requesting an estimate, bring together the owners of checkout, payment integration, and reconciliation. Agree on one payment group, the architecture, the operations included in release one, and the evidence each owner will accept. Record what happens to new attempts during rollback and who handles existing transactions afterward. That agreement gives engineering an estimable scope and gives finance a defined role in the launch decision.

Payment gateway integration
Add a second gateway to your live checkout
Mad Devs can connect a second payment provider to your existing checkout, directly or through an orchestration platform. Our team can test payment outcomes and refunds, validate payout reconciliation with your finance team, and prepare a phased launch with clear rollback criteria.
Discuss your gateway integration →

Latest articles here

Headless and traditional commerce storefronts connected to one commerce backend

Headless Commerce vs. Traditional Commerce: When to Rebuild the Storefront

Imagine a Shopify store where customers can buy individual products, but cannot yet build their own discounted bundle. The team wants shoppers to...

AI analysis core comparing workflow candidates to prioritize an AI use case.

AI Opportunity Assessment: How to Choose Which AI Use Case to Build First

Leadership wants AI on the product roadmap. Customers have suggested a copilot, support wants less manual work, and engineering has ideas for...

Conveyor motor and bearing visualization for predictive maintenance with machine learning

Predictive Maintenance With Machine Learning: Choosing a Failure Target and Validating Early Warnings

An industrial software provider wants to add failure warnings to equipment dashboards that already collect telemetry. Its CTO and the customer's...

Go to blog