Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

1.4 KB
Raw Blame
const data = [
  {
    connector: "adyen",
    merchant_connector_id: "",
  },
];

const rules = [
  {
    name: "rule_1",
    connectorSelection: {
      type: "priority",
      data: [
        {
          connector: "stripe",
          merchant_connector_id: "",
        },
        {
          connector: "bluesnap",
          merchant_connector_id: "",
        },
      ],
    },
    statements: [
      {
        condition: [
          {
            lhs: "payment_method",
            comparison: "equal",
            value: {
              type: "enum_variant",
              value: "card",
            },
            metadata: {},
          },
        ],
      },
    ],
  },
  {
    name: "rule_2",
    connectorSelection: {
      type: "priority",
      data: [
        {
          connector: "adyen",
          merchant_connector_id: "",
        },
      ],
    },
    statements: [
      {
        condition: [
          {
            lhs: "payment_method",
            comparison: "equal",
            value: {
              type: "enum_variant",
              value: "bank_redirect",
            },
            metadata: {},
          },
        ],
      },
    ],
  },
];

export const configs = {
  name: "Rule Based routing",
  description: "Advanced configuration (Rule based routing) for core flows.",
  data: {
    defaultSelection: {
      type: "priority",
      data: data,
    },
    rules: rules,
    metadata: {},
  },
};