Route payments across Stripe, PayPal, and Adyen by fees and availability
Quick overview This workflow receives a payment routing request via webhook, evaluates Stripe, PayPal, and Adyen against estimated fees, currency support, and live availability checks, then returns a routing decision with an audit trail.
How it works Receives a POST request on an n8n webhook with payment details like amount, currency, and requestId. Validates the request, builds a provider catalog (Stripe, PayPal, Adyen), and pre-filters candidates by currency support and minimum amount while estimating fees. Calls three HTTP health-check endpoints in sequence (with short waits) to determine live availability for each provider. Sends the candidate list to a routing HTTP endpoint to simulate forwarding the payment. Combines fees, base reliability scores, and live availability into a final score, selects the best available provider, and records the route outcome. Responds to the webhook with the selected provider (or failure reason), provider-by-provider scoring details, and an overall routing status code.
Setup Configure the webhook path as needed and copy the production webhook URL into your payment-request source system. Replace the placeholder httpbin.org URLs with your real provider health-check endpoints and your payment routing endpoint (or keep them for simulation/testing). Update the provider catalog in the code (fees, supported currencies, base scores, minimum amounts, and timeouts) to match your payment setup.
Related Templates
AI Weather Forecasts with MCP Integration
Real-time Weather Forecasts with MCP Tools This n8n workflow demonstrates how to integrate real-time weather intelligen...
Extract Named Entities from Web Pages with Google Natural Language API
Who is this for? Content strategists analyzing web page semantic content SEO professionals conducting entity-based anal...
Demo Workflow - How to use workflowStaticData()
This workflow demonstrates how to use the workflowStaticData() function to set any type of variable that will persist wi...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments