Skip to main content

Testing

Stable Genius provides a sandbox environment for development and testing. Sandbox mode uses Base Sepolia testnet — no real money moves.
Sandbox access is included with all API keys during private beta. Request early access to get started.

Sandbox vs Production

SandboxProduction
API key prefixsk_test_sk_live_
Base URLhttps://api.stablegenius.co/v1https://api.stablegenius.co/v1
BlockchainBase Sepolia (testnet)Base (mainnet)
USDCTest USDC (free, no value)Real USDC
WebhooksDelivered to your endpointDelivered to your endpoint
SettlementSimulated (no real ACH)Real ACH to merchant bank
Rate limits100 req/min1,000 req/min
The base URL is the same for both environments. The API key determines which environment you’re in.

Getting Test USDC

To test payments in sandbox mode, you need test USDC on Base Sepolia:
  1. Get Base Sepolia ETH from the Base Sepolia Faucet for gas fees
  2. Get test USDC from the Circle USDC Faucet (select Base Sepolia)
  3. Import test USDC into your wallet using the testnet USDC contract address

Testing the Full Flow

1. Create a test payment intent

curl -X POST https://api.stablegenius.co/v1/payment-intents \
  -H "Authorization: Bearer sk_test_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 1.00,
    "currency": "usd",
    "merchant_id": "mer_test_abc123",
    "metadata": { "test": "true" }
  }'

2. Pay with test USDC

Scan the QR code with a wallet configured for Base Sepolia, or send test USDC directly to the payment_address returned in the response.

3. Verify webhook delivery

Check your webhook endpoint received the payment_intent.confirmed event.

4. Verify via API

curl https://api.stablegenius.co/v1/payment-intents/pi_test_xyz789 \
  -H "Authorization: Bearer sk_test_abc123"
Confirm the status is confirmed with the correct tx_hash and net_amount.

Test Webhook Events

Trigger test webhook events from the dashboard without sending real transactions:
  1. Go to Settings → Webhooks in the dashboard
  2. Click Send Test Event next to your webhook endpoint
  3. Select the event type (payment_intent.confirmed, settlement.completed, etc.)
  4. We send a test event with realistic sample data to your endpoint

Testing Checklist

Before going live, verify the following in sandbox:
  • Payment intent creation returns valid QR payload
  • QR code renders correctly on your terminal/app
  • Webhook endpoint returns 200 within 5 seconds
  • Webhook signature verification passes
  • Duplicate event handling works (we send the same event twice)
  • Expired payment intents are handled gracefully
  • Network disconnection and reconnection doesn’t break the flow
  • Edge case: customer sends wrong amount

Going Live

When you’re ready to switch to production:
  1. Replace sk_test_ with sk_live_ in your server configuration
  2. Ensure your webhook endpoint is accessible over HTTPS
  3. Verify your merchant has completed KYC and linked a real bank account
  4. Process a small live payment ($0.10) to confirm end-to-end
Never use sk_live_ keys in development or test environments. Live keys process real USDC on Base mainnet.