Multi-Rail Router
Route payments to the optimal rail based on cost, speed, and availability.
POST /v1/pay
Route a payment through the best available rail.
Request
POST /v1/pay
Content-Type: application/json
Authorization: Bearer fl_...
{
"agent_id": "agent_123",
"amount": 50.00,
"currency": "USD",
"vendor": "openai.com",
"purpose": "API credits",
"preferences": {
"optimize_for": "cost",
"allowed_rails": ["ramp", "natural", "stripe"]
}
}Response
{
"transaction_id": "txn_abc123",
"rail_used": "ramp",
"rail_reason": "lowest_fee_for_amount",
"amount_charged": 50.00,
"fee": 0.25,
"status": "completed",
"alternatives_considered": [
{"rail": "natural", "fee": 0.35, "reason": "higher_fixed_fee"},
{"rail": "stripe", "fee": 0.50, "reason": "percentage_based"}
]
}Optimization Modes
cost
Select the rail with the lowest total fees for this transaction.
speed
Select the rail with the fastest settlement time.
reliability
Select the rail with the highest uptime and success rate.
GET /v1/rails
List all connected payment rails and their status.
Response
{
"rails": [
{
"id": "ramp",
"name": "Ramp Agent Cards",
"status": "connected",
"fee_structure": "0.5% + $0.00"
},
{
"id": "stripe",
"name": "Stripe MPP",
"status": "connected",
"fee_structure": "1.0% + $0.00"
}
]
}