Route payments across providers
Process each merchant's payments through more than one processor, and choose per transaction with Preczn routing rules or your own routing logic.
Your merchants process through more than one processor, and you want to decide which one handles each transaction. Preczn gives you two ways to make that decision through one transaction API. You can let Preczn route with plans and rules you configure, or you can name the processor on each request and keep the decision in your own routing logic. You can also combine the two. You might know this as payment orchestration, multi-processor routing, or load balancing.
Either way, your platform integrates once. Adding a processor or changing where transactions go doesn't mean a new processor integration.
Who this is for
- Platforms whose merchants have active connections to two or more processors.
- Platforms that want routing decisions in configuration they can change without a deploy.
- Platforms that already have a routing or rules engine and want Preczn to execute its decisions.
You don't need this page if each merchant uses one processor. Assign the connection's default plan. See Default plans.
When to use this
| If you want to ... | Use ... |
|---|---|
| Change routing in configuration, without a deploy | Plan routing: Preczn applies your plan's rules |
| Keep routing decisions in your own rules engine | Direct routing: name the processor on each request |
| Use plan rules for most transactions and choose the processor yourself for some | Hybrid routing: a plan, plus a named processor where you need one |
| Split transactions between processors by percentage | Default split |
| Send one card brand to a chosen processor | Card brand and amount rule |
| Keep a card program, such as a virtual card issuer, on one processor | BIN rule |
| Send non-USD transactions to one processor | Non-USD currency rule |
| Keep every transaction in one order, such as installments, on the same processor | Order ID match rule |
| Treat merchant cohorts differently | A separate plan per cohort, assigned in bulk |
How it works
Preczn decides where a transaction goes from one question: does the request name a processor?
- Yes: Preczn sends the transaction to that processor. This is direct routing for a merchant without a plan, and hybrid routing for a merchant with one. Your code owns the decision.
- No: Preczn applies the merchant's plan. A plan holds the connections it can route to and rules that pick one. Preczn checks the rules in a fixed order and stops at the first rule that picks a connection. See How Preczn chooses a connection.
The diagram shows both paths.
flowchart LR
T["Transaction request"] --> Q{"Processor named<br/>on the request?"}
Q -->|"Yes: direct or hybrid"| N["Named processor"]
Q -->|"No"| P["Merchant's plan<br/>evaluates rules"]
P --> A["Processor A"]
P --> B["Processor B"]
Each response records how the transaction was routed, so you can tell plan routing from direct routing in your reporting.
Bank account payments don't follow plan rules. See Bank account payments.
Plans also offer a Decline retry rule, which retries a declined transaction on another connection in the plan. Read Decline retry before you use it.
Prerequisites
- Two or more connections configured on your platform. See Add a connection to your platform.
- Each merchant has active credentials for every processor it routes to. See Assign a merchant to a plan.
Outline
To let Preczn route:
- Create a plan. Choose the connections it can route to. See Create a routing plan.
- Add rules. Add rules such as Card brand and amount or Non-USD currency. The default split catches every transaction that no other rule picks. See Routing rules.
- Assign merchants. Assign one merchant at a time, move merchants in bulk, or schedule a move for a future date. See Assign a merchant to a plan.
- Send transactions without a processor. Leave
processoroff the request so the plan decides. See Choose a routing method.
To route with your own logic:
- Decide the processor in your code for each transaction, using your own rules engine.
- Name the processor on the request. Preczn sends the transaction there and skips plan rules. See Choose a routing method.
For either path, confirm how each transaction was routed by reading routingSource on the response. See Choose a routing method.
Build plans in test mode first
Plans belong to one mode. Build and exercise a plan in test mode, then recreate it in live mode. See Live vs. test mode.
Example
A veterinary practice platform processes through two card processors.
- For most practices, the platform creates a plan with both processors. It adds a Card brand and amount rule that sends American Express transactions over $500 to the second processor, sets the default split to 50/50, and moves those practices onto the plan in bulk.
- A group of large hospital practices has negotiated pricing that the platform's own billing system tracks. For those practices, the platform's code picks the processor and names it on each request. Preczn sends each transaction to the named processor.
- The platform reads
routingSourceon each response to report plan-routed and directly routed volume separately.
Updated 6 days ago
