Skip to main content
Challenge

Build a Multi-Rail Debit Interchange Fee Optimization Engine with Mastra AI

Cap updates on debit interchange fees force merchant acquirers to dynamically optimize payment processing routes across Visa, Mastercard, and alternative debit networks. Build a Mastra AI workflow that dynamically routes debit transactions to lower processing fees by 12% without increasing failure rates.

CybersecurityHosted by Vera
Challenge brief

What you are building

The core problem, expected build, and operating context for this challenge.

Build a Mastra AI TypeScript workflow engine to dynamically select debit routing networks based on interchange cap regulations and fee schedules.

Delivery guide

How work is evaluated

Evaluation

Evaluates cost savings percentage and routing SLA execution speed.

Datasets

Challenge datasets

Public datasets, plus the private datasets you have access to.

Evaluation rubric

How submissions are scored

These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.

Dimensions
2 scoring checks
Binary
2 pass or fail dimensions
Ordinal
0 scaled dimensions
Dimension 1

supported_network_check

Selected network must be present in card's supported networks list.

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 2

cost_reduction_percentage

Percentage reduction in debit interchange costs. • target: 0.12 • range: 0.05-0.25

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

What you should walk away with

  • Develop Mastra AI dynamic routing workflows in TypeScript

  • Map Durbin Amendment interchange fee caps to processing route selections

  • Optimize network selection across Star, Pulse, Nyce, Visa, and Mastercard debit rails

  • Maintain transaction processing latency under 100ms

Resources and assets

Reference links and supporting material

Dataset notes

Dataset of debit card BIN tables, network fee schedules, and transaction authorization events.

Challenge setup

Evaluates cost savings percentage and routing SLA execution speed.

Challenge input

JSON debit card authorization request (PAN BIN, amount, terminal type)

Mastra AI

Offers light, high-speed TypeScript workflow orchestration.

Evaluated output

JSON selected network rail, calculated interchange fee, and routing duration

Evaluation checks
  • Selected network must be present in card's supported networks list.
  • Percentage reduction in debit interchange costs. • target: 0.12 • range: 0.05-0.25
Configured evaluation evidence
  • Benchmark: Payment Network Optimization Suite
  • Cost Reduction Percentage target: 0.12
  • 1 public reference case
Configured runtime
  • JavaScript execution harness
  • javascript sandbox (unavailable on Versalist)

Summary shows the first task, up to three tools, and up to three evidence items. Open the technical recipe to view all configured items.

View technical recipe

Configured tools

Action Space
  • Mastra AI · Required
Orchestration
  • Mastra AI · Required

Evaluation contract

  • supported_network_check · Weight 1
  • cost_reduction_percentage · Weight 1

Metrics

  • cost_reduction_percentage · Target 0.12

Benchmarks

  • Payment Network Optimization Suite
  • general

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON debit card authorization request (PAN BIN, amount, terminal type)

    Output: JSON selected network rail, calculated interchange fee, and routing duration

    Execution harness: JavaScript

Evaluation tools

  • Mastra AI · Workflow Framework

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Build a Multi-Rail Debit Interchange Fee Optimization Engine with Mastra AI