Skip to main content
Workflows give you full control over how payments are routed across processors—without writing code. Integrate once, then use the visual builder to update routing logic anytime. Key benefits:
  • Full control — Decide exactly which processor receives each payment based on any attribute
  • Flexibility — Update routing rules instantly from the Dashboard, no code deployments needed
  • Higher acceptance — Implement failover to automatically recover declined payments
  • Data-driven optimization — A/B test processors and track results to find the best performer

Getting Started

1

Connect processors

Add at least two processor integrations in Dashboard → Integrations
2

Create workflow

Go to Dashboard → Workflows and click Create workflow
3

Add a trigger

Drag Payment Pending onto the canvas and select the payment method (e.g., Cards, Apple Pay)
4

Build your flow

Add conditions, splits, and actions by dragging components and connecting them
5

Save and publish

Click Save to create a draft, then Publish to make the workflow live

Building Blocks

Workflows are built from four types of components. You can connect them in any order to create complex routing logic.

Triggers

Triggers start the workflow when an event occurs. Each workflow has exactly one trigger, and each trigger is tied to a specific payment method.
Each payment method can only have one workflow. To route Cards and Apple Pay differently, create separate workflows—one for each payment method.

Conditions

Route payments based on attributes. Can be placed at any point in the workflow. Combine multiple rules with AND/OR logic. Combining rules: Create complex logic by combining conditions:
  • AND — All conditions in a group must match
  • OR — Add a new group; payment matches if any group matches
Condition priority: Conditions are evaluated left to right. Only the first matching condition is executed—subsequent matches are ignored.

Split

Divide traffic by percentage. Can be placed at any point in the workflow. Use Split to run experiments, distribute load across processors, or gradually roll out routing changes.

Actions

Execute operations on the payment.
Use Delay for delayed settlement workflows—for example, authorize immediately but settle after 24 hours to allow for order review or fraud checks.
Authorize Payment configuration: 3D Secure options: See 3D Secure for details on each mode.

Set Metadata

Save custom key-value data at any point in the workflow. Use metadata to track experiments, enable advanced routing, or record decisions. Configuration: You can add multiple key-value pairs in a single Set Metadata node.
Use unique keys. If you set the same key twice, the second value overwrites the first. PayNext does not validate key uniqueness.
Example metadata on payment object:
Using metadata in conditions: For nested metadata (like workflow), use dot notation for the key:
→ Key: workflow.experiment_variant Value: variant_b For flat metadata, use the key directly:
→ Key: client_tier Value: premium Common uses:

Common Use Cases

Geographic Routing

Route payments to regional processors for lower cross-border fees and higher acceptance rates.

Automatic Failover

Retry with another processor when the first one fails. Recovers payments that would otherwise be lost to temporary processor issues.
Failover triggers for processor-level failures (technical errors, temporary declines). Card-level declines like insufficient funds are not retried—they would fail at any processor.

A/B Testing

Compare processor performance by splitting traffic and tracking results with metadata.
After collecting data, filter payments by workflow.experiment_variant to compare acceptance rates and costs.

MIT Routing

Route merchant-initiated transactions (renewals, recurring charges) based on the processor that handled the original customer-initiated transaction. Option 1: Use CIT Processor checkbox (recommended) In the Authorize Payment node, tick Use CIT Processor. This automatically routes MITs to the same processor that was used for the first payment—no additional conditions needed. Option 2: Use CIT Processor condition Add a CIT Processor condition to route MITs to a different processor. For example, route all MITs where the original CIT was processed by Processor A to Processor B instead. Option 3: Use metadata For more control, set metadata on the first payment identifying the processor used, then add a condition checking that metadata value for subsequent MITs.

Block Payments

Block payments before they reach a processor based on any condition. Blocked payments are marked with BLOCKED status and never sent for authorization. Common use cases:
  • Block specific BINs associated with fraud or chargebacks
  • Block payments from high-risk issuer countries
Use the Block Payment action in your workflow to block payments that match your conditions.

Lists

Lists let you create reusable collections of values to use across workflows. Instead of adding conditions for each blocked BIN individually, create a list and reference it in your workflow conditions. Currently supported list types:

Create a List

  1. Go to Dashboard → Workflows → Lists
  2. Click Create list
  3. Select Card BIN as the list type
  4. Add BINs to the list

List Details

When you add a BIN to a Card BIN list, PayNext automatically enriches it with card details:

Use Lists in Workflows

Reference a list in workflow conditions:
  1. Add a Condition node
  2. Select BIN as the condition type
  3. Choose is in list or is not in list
  4. Select your list
Use lists to maintain a central block list. When you update the list, all workflows using it are automatically updated—no need to edit each workflow individually.

Version History

Workflows support versioning so you can track changes and roll back if needed. Workflow states: How to publish:
  1. Make changes in the visual editor
  2. Click Save to create a draft
  3. Click Publish to make the workflow live
History tab: View all versions of a workflow in the History tab. For each version, you can see:
  • Version number and ID
  • Status (Draft, Published, Previously Published)
  • Author who published
  • Date published
  • Preview button to view the workflow

Workflow Runs

Every payment that reaches a workflow creates a run — a record of each step the payment took, in order, with its outcome. Use runs to see exactly why a payment routed the way it did, without re-tracing the workflow definition by hand.

View all runs

Go to Dashboard → Workflows → Runs. Filter runs by: The counter row above the table shows totals for Failed, Waiting, Running, and Completed within the current workflow and date filter. Each row shows the run ID, status, workflow, workflow version, trigger, amount, start time, and duration. Click a row to open the run.
From inside a workflow, click See workflow runs to jump to the Runs tab pre-filtered to that workflow.
A payment’s own page also shows the run (or runs) it went through, under Workflow Runs—no need to search the Runs tab for it.

View a run

A run’s page shows: Below that, the Execution path lists every step the run took, in order. Click a step to open its details.

Step details

Every step shows its status (completed, failed, or skipped), start time, and duration. What else appears depends on the step type:
Failed on a step or run means the workflow itself hit an error—for example, no processor configured. A declined or blocked payment is a normal outcome and still reports as Completed.

Condition evidence

A condition step shows every route the workflow checked, not only the one that matched, so you can see why the others lost too:
  • The selected route is expanded by default; every other route stays collapsed but can be opened
  • Each route is labeled Selected, Not selected, or No match
  • Inside a route, each condition group shows its own outcome, and each field shows the actual value from the payment next to the value the condition expected
Groups within a route combine with OR; fields within a group combine with AND—matching how you build conditions in the canvas.
Sensitive values, like masked card or metadata fields, appear as *** Hidden *** in the evidence instead of the real value.

Best Practices

Begin with a default processor and basic failover. Add complex routing after you have payment data to analyze.
Set metadata when running experiments. Without tags, you can’t analyze results by variant.
In the Authorize Payment node, tick Use CIT Processor to automatically route recurring payments to the processor that was used for the first payment.
Save as draft first. Review the workflow logic, then publish when ready.