Developer Sandbox · v1.0

A complete routing simulator for the RouteSense API.

Test every transaction type — sale, auth, capture, void, refund — across NMI, Stripe, Adyen, Authorize.Net, and Airwallex. Run the full Pathfinder rule engine against realistic BIN data, with first-class observability into every routing decision.

12Test cards
5 + AutoGateways
12Rule conditions
280–1100msLatency
0PAN stored
01 — Quick start
01
Generate a token
Open the API Explorer, paste your 36-char merchant UUID, and tap Generate Token.
merchant_id → security_key
02
Pick a gateway
Auto routes via Pathfinder. Or pin to NMI, Stripe, Adyen, Authorize.Net, or Airwallex.
gateway = stripe
03
Send a transaction
Use a test card or paste your own. Watch routing rules fire in real time.
POST /api/transact
02 — Response codes
1
Approved
Transaction authorized by the gateway. Returns transactionid, authcode, AVS/CVV results.
2
Declined
Issuer or gateway declined. Inspect response_code (200–299) for the specific reason.
3
Error
Validation, configuration, or pre-gateway block. Often surfaced by a routing rule.
03 — Integration flow
01
Generate your security token
Your merchant account ID is a 36-character UUID provisioned during onboarding. In the Explorer, enter it and click Generate Token — the sandbox calls the RouteSense token service which returns a security key valid for all subsequent requests on this merchant.
POST token.sandbox.routesense.ai/api/v1/token/generate { merchant_id: "550e8400-..." }
02
Send a transaction
POST to https://router.sandbox.routesense.ai/api/transact with Content-Type: application/x-www-form-urlencoded. Include type, amount, and card fields.
type=sale&amount=49.99&ccnumber=4242...&ccexp=1228&cvv=123
03
Parse the response
Responses are URL-encoded key=value pairs. Check response: 1=approved, 2=declined, 3=error. Store transactionid for capture/void/refund.
response=1&responsetext=SUCCESS&transactionid=xxx&authcode=ABC123
04
Capture, void, or refund
Use the transactionid from the original response to perform downstream operations. Auth-only flows require an explicit capture.
type=capture&transactionid=PREVIOUS_TXN_ID
04 — Request fields
FieldRequiredDescriptionExample
security_keyRequiredRouteSense merchant token, generated from your merchant UUID via the token service.AUX7Yw...
typeRequiredTransaction type: auth, sale, capture, void, refund.sale
amountConditionalDecimal with two places. Required for auth, sale, refund.49.99
ccnumberConditionalCard number, no spaces or dashes. Required for auth and sale.4242424242424242
ccexpConditionalExpiry in MMYY format. Required for auth and sale.1228
cvvOptional3–4 digit verification value. Strongly recommended.123
transactionidConditionalReturned ID from a prior approval. Required for capture, void, refund.11325689772
currencyOptionalISO 4217 code. Defaults to USD.USD
orderidOptionalYour internal order identifier.ORD-001
first_nameOptionalCardholder first name.John
last_nameOptionalCardholder last name.Smith
emailOptionalCustomer email for receipts.john[at]example.com
billing_*OptionalAny field prefixed with billing_ is passed through.billing_city=Austin
shipping_*OptionalAny field prefixed with shipping_ is passed through.shipping_zip=78701
05 — Response fields
FieldDescriptionExample
responseOutcome: 1 Approved · 2 Declined · 3 Error1
responsetextHuman-readable description.SUCCESS
transactionidGateway-assigned ID. Store for capture/void/refund.11325689772
authcodeNetwork authorization code.123456
response_codeNMI-style detail code.100
routed_midMID Pathfinder selected.MID-NMI-A1
routed_gatewayGateway used for this transaction.stripe
midas_scoreRouteSense MIDAS health score (0–100).94
rule_idIf a rule fired, its ID. Otherwise omitted.rule_eu_to_aci
router_transaction_idRouteSense internal UUID. Always present.e74c0159-dd28-…
Transaction Type
Sale
Auth
Capture
Void
Refund
Gateway simulates upstream shape
Auto Route
NMI
Stripe
Adyen
Authorize.Net
Airwallex
Merchant Setup
Enter your merchant ID, then generate a token to start sending requests.
Quick Fill — Test Cards
4242 4242 4242 4242
Visa
Approve
4000 0000 0000 0002
Visa
Decline
4000 0000 0000 9995
Visa
NSF
4000 0000 0000 0069
Visa
Expired
4000 0000 0000 0127
Visa
Bad CVV
4000 0025 0000 3155
Visa
3DS
Card
Transaction
Billing optional
Generate a token to enable requests.
Response
Awaiting first request.
Pick a test card and tap Send to see the routing decision unfold.
Form Body
cURL
RouteSense Normalized Response
Upstream Gateway Response
Routing Rules
Pathfinder evaluates rules in priority order — lowest first, first match wins. Conditions combine with AND. Saved per merchant in this browser.
rules.json
valid · 0 rules
Schema
{
  "id": "rule_unique_id",
  "name": "Human-readable name",
  "priority": 10,            // lower = first
  "enabled": true,
  "conditions": { ... },     // AND
  "action": { ... }
}
Conditions all match
bin_countryISO-2 codes: ["US","CA"]
card_type["CREDIT","DEBIT","PREPAID"]
card_scheme["VISA","MASTERCARD","AMEX"]
amount{"gte":100,"lte":5000}
currency["USD","EUR","GBP"]
pan_whitelistAllow only these PANs.
pan_blocklistBlock specific PANs.
bin_whitelistAllowed BIN prefixes.
bin_blocklistBlocked BINs: ["411111"]
email_whitelist["@solid.com"] or full email.
email_blocklistBlock by domain or full email.
midas_score_gteMIDAS floor: 80
Actions
routePin gateway/MID. {"type":"route","gateway":"adyen"}
declineDecline. Optional reason.
blockHard block — pre-gateway error.
require_3dsForce 3DS challenge.
cascade{"order":["nmi","stripe","adyen"]}
Example
[
  {
    "id": "rule_block_bins",
    "name": "Block fraud BINs",
    "priority": 1,
    "enabled": true,
    "conditions": { "bin_blocklist": ["411111"] },
    "action": { "type": "block", "reason": "Blocked BIN" }
  },
  {
    "id": "rule_eu_adyen",
    "name": "EU cards → Adyen",
    "priority": 10,
    "enabled": true,
    "conditions": {
      "bin_country": ["DE","FR","IT","ES","NL"],
      "amount": { "lte": 5000 }
    },
    "action": { "type": "route", "gateway": "adyen", "mid": "MID-ADYEN-EU" }
  },
  {
    "id": "rule_high_value_3ds",
    "name": "High-value → 3DS",
    "priority": 20,
    "enabled": true,
    "conditions": { "amount": { "gte": 500 } },
    "action": { "type": "require_3ds" }
  }
]
Transaction History
Session-only. Cleared on reload.
No transactions yet this session
Code Snippets
Sale
curl -X POST https://router.sandbox.routesense.ai/api/transact \
  -d security_key=YOUR_KEY \
  -d type=sale \
  -d amount=49.99 \
  -d ccnumber=4242424242424242 \
  -d ccexp=1228 \
  -d cvv=123 \
  -d first_name=John \
  -d last_name=Smith \
  -d orderid=ORD-001
Auth Only
curl -X POST https://router.sandbox.routesense.ai/api/transact \
  -d security_key=YOUR_KEY \
  -d type=auth \
  -d amount=49.99 \
  -d ccnumber=4242424242424242 \
  -d ccexp=1228 \
  -d cvv=123
Capture
curl -X POST https://router.sandbox.routesense.ai/api/transact \
  -d security_key=YOUR_KEY \
  -d type=capture \
  -d transactionid=11325689772
Refund
curl -X POST https://router.sandbox.routesense.ai/api/transact \
  -d security_key=YOUR_KEY \
  -d type=refund \
  -d transactionid=11325689772 \
  -d amount=49.99
routesense_client.py
import requests

ENDPOINT = "https://router.sandbox.routesense.ai/api/transact"
SECURITY_KEY = "YOUR_KEY"

def parse(text):
    return dict(p.split("=", 1) for p in text.split("&") if "=" in p)

result = parse(requests.post(ENDPOINT, data={
    "security_key": SECURITY_KEY, "type": "sale",
    "amount": "49.99",
    "ccnumber": "4242424242424242",
    "ccexp": "1228", "cvv": "123",
}).text)

if result["response"] == "1":
    print("Approved:", result["transactionid"])
else:
    print("Failed:", result["responsetext"])
routesense.js
const ENDPOINT = "https://router.sandbox.routesense.ai/api/transact";

async function transact(params) {
  const body = new URLSearchParams({ security_key: "YOUR_KEY", ...params });
  const res = await fetch(ENDPOINT, { method: "POST", body });
  const text = await res.text();
  return Object.fromEntries(new URLSearchParams(text));
}

const r = await transact({
  type: "sale", amount: "49.99",
  ccnumber: "4242424242424242", ccexp: "1228", cvv: "123",
});

console.log(r.response === "1" ? "Approved: " + r.transactionid : "Failed: " + r.responsetext);
routesense.go
package main

import (
    "fmt"
    "net/http"
    "net/url"
    "io"
)

const Endpoint = "https://router.sandbox.routesense.ai/api/transact"

func transact(params url.Values) (url.Values, error) {
    params.Set("security_key", "YOUR_KEY")
    res, err := http.PostForm(Endpoint, params)
    if err != nil { return nil, err }
    defer res.Body.Close()
    body, _ := io.ReadAll(res.Body)
    return url.ParseQuery(string(body))
}

func main() {
    r, _ := transact(url.Values{
        "type":     {"sale"},
        "amount":   {"49.99"},
        "ccnumber": {"4242424242424242"},
        "ccexp":    {"1228"},
        "cvv":      {"123"},
    })
    fmt.Println(r.Get("response"), r.Get("transactionid"))
}
routesense.php
<?php
function transact($params) {
    $params['security_key'] = 'YOUR_KEY';
    $ch = curl_init('https://router.sandbox.routesense.ai/api/transact');
    curl_setopt_array($ch, [
        CURLOPT_POST => 1,
        CURLOPT_POSTFIELDS => http_build_query($params),
        CURLOPT_RETURNTRANSFER => 1,
    ]);
    parse_str(curl_exec($ch), $r);
    return $r;
}

$r = transact([
    'type' => 'sale', 'amount' => '49.99',
    'ccnumber' => '4242424242424242',
    'ccexp' => '1228', 'cvv' => '123',
]);

echo $r['response'] == '1' ? "Approved: {$r['transactionid']}" : "Failed: {$r['responsetext']}";