Sandbox & Test Mode

Stableyard uses key prefixes to determine live vs. test mode. Both modes hit the same base URL.

Key Prefixes

ModePublic Key
Livesy_pub_*
Testsy_test_pub_*

How It Works

  • Test keys create test sessions, test webhooks, and test ledger entries
  • Live keys create real sessions with real money
  • Data is isolated — test sessions don’t appear in live queries and vice versa
  • livemode field in responses tells you which mode you’re in
# Test mode
curl -X POST https://api.stableyard.fi/v2/sessions \
  -H "Authorization: Bearer sy_test_pub_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "amount": 10000000, "destination": "shop@stableyard" }'

# Live mode
curl -X POST https://api.stableyard.fi/v2/sessions \
  -H "Authorization: Bearer sy_pub_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "amount": 10000000, "destination": "shop@stableyard" }'

Auto-Settlement in Test Mode

Test sessions are automatically settled after a few seconds — no real blockchain transactions needed. This lets you test the full lifecycle (open → pending → routing → settled) without funding a wallet.

What to Test

  1. Session creation — verify your payload, get back session objects
  2. Webhook delivery — register a test webhook, create sessions, verify events arrive
  3. Quote flow — test the two-step quote → commit flow
  4. Error handling — test with invalid parameters, expired sessions, etc.
  5. Idempotency — send the same Idempotency-Key twice, verify same response