Building a Cross-Border Payments API Stack: Multi-Currency Routing, Compliance, and Settlement
International payments require orchestrating currency conversion, compliance screening, and settlement across multiple jurisdictions. A modern API stack abstracts this complexity into a unified interface for merchants operating globally.
Cross-border payments are the unglamorous backbone of global e-commerce. When a U.S. merchant sells to a customer in Germany, or a Philippine SaaS company bills a European client, dozens of systems must orchestrate in sequence: currency conversion, compliance screening, banking relationships, settlement timing, and fee management.
Most merchants handle this through a patchwork of services: a payment processor for card transactions, a wire transfer service for ACH in some countries, a specialized international transfer provider for others, and manual processes to reconcile FX rates and settlement timing. The result is operational complexity, hidden costs, and delayed reconciliation.
A unified cross-border API stack changes this equation. Instead of managing multiple integrations, merchants issue a single API call, and the platform handles currency routing, compliance screening, optimal settlement path selection, and multi-day reconciliation. This guide covers how to build this stack — and what to expect when implementing it.
The Cross-Border Payment Challenge
Every international payment involves three core challenges that domestic payments don't:
1. Foreign Exchange (FX) and Currency Risk
When a payment crosses currency boundaries, someone has to absorb the FX cost and risk. In traditional banking, that someone is the merchant. Banks typically offer FX rates 2-4% worse than mid-market, creating "FX leakage" that eats into margins.
A modern cross-border API stack addresses this through:
- Real-time rate shopping: Query multiple liquidity sources for the best FX rate, not just your primary bank
- Holding periods: Execute conversions when rates are favorable, not when the payment arrives
- Netting: Aggregate payouts across multiple currencies and beneficiary accounts to reduce individual conversion needs
- Rate locks: For large payments, lock in FX rates for 24-48 hours to reduce volatility
2. Compliance and Regulatory Screening
Cross-border payments trigger additional regulatory requirements beyond domestic transactions. Every international payment must be screened for sanctions compliance (OFAC, EU sanctions, UN lists), and payments exceeding $3K require "travel rule" compliance — capturing beneficiary information for financial crime prevention.
Managing this manually is error-prone and slow. A unified API stack:
- Screens 100% of transactions against current sanctions lists (not sampled)
- Captures and reports beneficiary information for travel rule compliance
- Blocks high-risk destinations based on merchant's own compliance policies
- Logs all screening decisions for audit and regulatory reporting
3. Settlement Path Selection and Timing
Different countries use different settlement networks, each with different costs and timing:
- SWIFT: Global wire transfers, $15-50 per transfer, 1-3 business days
- Local ACH equivalents: SEPA (EU), EFT (Canada), etc., $1-10 per transfer, 1-2 business days
- Real-time schemes: FedNow (US), RTP (Australia), faster SWIFT, instant to 1 hour, higher fees
- Correspondent banking: For non-standard countries, routing through correspondent banks, variable costs/timing
The optimal path depends on destination country, amount, urgency, and cost. A unified API stack automatically selects the best option for each payment.
Building the API Stack: Core Components
Layer 1: Payment Acceptance and Routing
The first layer is the merchant-facing API that accepts payment instructions. This endpoint is language-agnostic and handles multi-currency inputs:
POST /v1/payments/cross-border
{
"merchant_id": "merch_abc123",
"idempotency_key": "payout-2026-07-25-001",
"amount": 5000,
"currency": "USD",
"beneficiary": {
"account_number": "DE89370400440532013000",
"bank_code": "DEUTDE",
"name": "Acme GmbH",
"country": "DE"
},
"requested_currency": "EUR",
"settlement_speed": "standard",
"metadata": {
"invoice_id": "INV-2026-001"
}
}
// Response
{
"payment_id": "xfer_xyz789",
"status": "pending_compliance",
"amount_usd": 5000,
"amount_eur": 4650,
"fx_rate": 0.93,
"settlement_method": "sepa_credit_transfer",
"estimated_arrival": "2026-07-28T09:00:00Z",
"fee_breakdown": {
"conversion_fee_usd": 50,
"rail_fee_eur": 2.50,
"total_fee_usd": 50
}
}Notice the response includes the FX rate, selected settlement method, estimated arrival time, and transparent fee breakdown. This gives merchants full visibility before committing.
Layer 2: Compliance Screening Pipeline
Every payment flows through a compliance screening pipeline before settlement:
- Beneficiary screening: Name, account number, and country screened against OFAC/EU/UN sanctions lists
- Amount thresholds: Payments >$3K trigger travel rule beneficiary capture and reporting
- Destination restrictions: Merchant's compliance policies may restrict certain countries or beneficiary types
- Rate-limited destinations: Some merchants may be restricted from more than N payments/day to certain regions
If screening passes, the payment moves to settlement. If it fails, it's automatically rejected with clear reason codes so merchants can take corrective action (fix beneficiary name, correct account number, etc.).
Layer 3: Settlement Execution
Once cleared for compliance, the payment is executed through the optimal settlement network. This involves:
- Currency conversion: Execute FX at current mid-market rate or pre-locked rate
- Rail selection: Route through SWIFT, SEPA, RTP, or correspondent banking based on destination
- Batch optimization: Group payments to same destination/currency to reduce per-unit settlement costs
- Funding management: Ensure merchant's funding account has sufficient balance in the settlement currency
The merchant doesn't see these details — they issue one API call and the system handles routing complexity.
Layer 4: Reconciliation and Reporting
After settlement, the system must reconcile actual settlement status with merchant expectations:
- Settlement confirmation: Monitor for delivery confirmation from destination bank
- Return handling: If beneficiary rejects the payment (wrong account, sanctioned entity, etc.), automatically refund to merchant's account
- Variance tracking: Any difference between estimated and actual FX rate or fees is tracked and reported
- Audit trail: Every payment has a complete audit trail showing routing decision, FX rate, settlement method, and final status
Key Implementation Considerations
Idempotency and Duplicate Prevention
Cross-border payments are irreversible once settled. A single duplicate could cost thousands in FX losses and require manual remediation. Every payment request must include a unique idempotency key, allowing merchants to safely retry without creating duplicate settlements.
Multi-Currency Settlement Accounts
Rather than converting USD to every destination currency at payment time (expensive), modern stacks maintain merchant settlement accounts in multiple major currencies (EUR, GBP, JPY, CAD, etc.). Merchants can hold these currencies, and cross-border payments settle from local accounts, reducing FX slippage.
Transparent Fee Models
Traditional banks hide FX costs by quoting all-in rates. Modern APIs break fees into components:
- Conversion fee: Markup on mid-market FX rate (typically 0.5-2%)
- Rail fee: Cost of the settlement network ($1-50 depending on rail)
- Compliance fee: Cost of sanctions screening (typically $.50-$2 per payment)
Transparent fees allow merchants to optimize (batch payments to reduce per-unit costs, use lower-cost settlement rails, etc.).
Webhooks and Settlement Status
Merchants need real-time visibility into settlement status. A modern API stack includes webhooks for:
payment.pending— Payment accepted and queued for compliance screeningpayment.compliant— Passed compliance screening, executing settlementpayment.settled— Beneficiary received fundspayment.returned— Settlement failed (beneficiary rejected, account invalid, etc.), refund issued
The Business Case: Cost and Speed Improvements
For a typical global merchant, moving from a patchwork of services to a unified cross-border API stack creates measurable value:
| Metric | Traditional Banks | Unified API Stack |
|---|---|---|
| FX Rate Markup | 2-4% | 0.5-1% |
| Settlement Time | 1-3 days | 1 hour - 1 day |
| Per-Transfer Cost | $15-50 | $2-15 |
| Operational Overhead | Manual routing, reconciliation | Automated, single dashboard |
For a $10M/month international payment platform, optimizing FX rates from 3% to 0.75% markup saves $225K/month, or $2.7M annually. Add reduced per-transfer costs and operational overhead, and the total impact is substantial.
Building Blocks: Partnerships and Infrastructure
A production-grade cross-border API stack requires partnerships:
- Liquidity partners: Banks or fintech platforms offering FX and settlement in multiple currencies
- Compliance vendors: Sanctions screening, travel rule reporting, KYC/AML integration
- Rail integrations: Direct connections to SWIFT, SEPA, FedNow, RTP, and correspondent bank networks
- Bank accounts: Nostro accounts in major financial centers (London, Singapore, Hong Kong, Frankfurt) for settlement efficiency
Building these partnerships and integrations typically takes 12-18 months, making this a significant infrastructure investment. For many companies, using an established platform is more practical than building from scratch.
Getting Started with Cross-Border Payments
If you're building a global payment platform, start with the high-value corridors (US↔EU, US↔UK, US↔Canada) and expand from there. Focus on:
- Compliance first: Implement OFAC screening and travel rule compliance before building UX
- Transparent pricing: Show merchants exactly what they're paying (FX markup, rail fee, compliance cost)
- Settlement visibility: Provide webhooks and dashboards so merchants always know payment status
- Error handling: Build graceful error handling for failed settlements with automatic refunds
Multi-Currency Routing with Pay.net
Pay.net's cross-border API stack handles FX routing, compliance screening, and settlement across 150+ countries. Integrate once and reach global markets with transparent pricing, real-time settlement tracking, and automated compliance reporting.
More on Global Payment Infrastructure
Explore our guides on international compliance, FX optimization, and multi-rail settlement strategies for fintech platforms.
Browse all articles