Sandbox Guide

Test your integration safely with our sandbox environment. No real money, no regulatory approval needed—just realistic test data and full API access.

Overview

The sandbox environment mirrors production functionality with simulated data. Use it to develop, test, and demonstrate your application before going live.

What's Included

  • ✓ Full API functionality
  • ✓ Test accounts with balances
  • ✓ Simulated payment processing
  • ✓ Webhook event simulation
  • ✓ No rate limiting

Limitations

  • • No real money movement
  • • Data resets periodically
  • • HTTP webhooks allowed
  • • Simplified SSA validation
  • • Test card numbers only

Environment URLs

ServiceSandbox URLProduction URL
API Base URLhttps://sandbox.api.hamsterbank.aihttps://api.hamsterbank.ai
Authorizationhttps://sandbox.auth.hamsterbank.aihttps://auth.hamsterbank.ai
Token Endpointhttps://sandbox.auth.hamsterbank.ai/tokenhttps://auth.hamsterbank.ai/token
Developer Portalhttps://sandbox.developer.hamsterbank.aihttps://developer.hamsterbank.ai

Environment Detection

Your API keys are environment-specific. Sandbox keys (prefixed with 'sk_sandbox_') only work with sandbox URLs.

Test Accounts

The sandbox includes pre-configured test accounts with various scenarios:

Current Accounts

Account NameSort CodeAccount NumberBalanceScenario
Main Current60837112345678£5,432.10Standard account
Joint Account60837187654321£12,500.00Joint ownership
Overdrawn60837111111111-£250.00Negative balance
Zero Balance60837100000000£0.00Empty account

Savings Accounts

Account NameSort CodeAccount NumberBalanceScenario
Easy Saver60837122222222£10,000.00Savings with interest
Fixed Term ISA60837133333333£20,000.00Restricted withdrawals

International Accounts

Account NameIBANBalanceScenario
Euro AccountGB82HMBK60837144444444€2,500.00EUR transactions
USD AccountGB82HMBK60837155555555$8,000.00USD transactions

Test Users (PSUs)

Use these credentials to simulate user authorization flows:

UsernamePasswordAccountsBehavior
testuser@example.comPassword123!All test accountsStandard approval
slowuser@example.comPassword123!Main Current only15-second delay
rejectuser@example.comPassword123!NoneAlways rejects consent
mfauser@example.comPassword123!All accountsRequires MFA (code: 123456)

Authorization Flow

In sandbox, the consent screen auto-approves after 2 seconds for testuser@example.com. Use rejectuser@example.com to test rejection flows.

Simulating Scenarios

Test different scenarios using special values in your requests:

Payment Scenarios

AmountResultUse Case
Any amountSuccessNormal payment processing
0.01Insufficient fundsTest error handling
0.02Payment timeoutTest timeout handling
0.03Bank rejectionTest bank-side rejection
999999.99Limit exceededTest amount validation

Funds Confirmation Scenarios

Amount CheckedResultUse Case
< BalancefundsAvailable: trueSufficient funds
> BalancefundsAvailable: falseInsufficient funds
0.01Always falseForce negative response

Consent Expiry Scenarios

Set short expiry times in sandbox to test consent renewal flows:

{
  "type": "account-access",
  "permissions": ["ReadAccounts", "ReadBalances"],
  "expirationDateTime": "2024-01-15T10:35:00Z",  // 5 minutes from now
  "transactionFromDateTime": "2024-01-01T00:00:00Z",
  "transactionToDateTime": "2024-01-15T23:59:59Z"
}

Webhook Testing

Test webhook integrations without waiting for real events:

Trigger Test Events

Use the sandbox webhook trigger endpoint to simulate events:

curl -X POST "https://sandbox.api.hamsterbank.ai/webhooks/test" \\
  -H "Authorization: Bearer {access_token}" \\
  -H "Content-Type: application/json" \\
  -d '{
    "event_type": "payment.completed",
    "resource_id": "pay_test123",
    "data": {
      "amount": "100.00",
      "currency": "GBP"
    }
  }'

Local Development

Use a tunneling service for local webhook testing:

# Using ngrok
ngrok http 3000

# Register the tunnel URL as your webhook endpoint
# https://abc123.ngrok.io/webhooks

HTTP Allowed

Sandbox webhooks can be delivered to HTTP endpoints for local testing. Production requires HTTPS.

Moving to Production

When you're ready to go live, follow this checklist:

1

Complete TPP Registration

Obtain regulatory authorization and register with the Open Banking Directory to receive your production SSA.

2

Generate Production Keys

Create production API keys in the dashboard. These start with 'sk_live_' instead of 'sk_sandbox_'.

3

Update Environment URLs

Replace all sandbox URLs with production URLs in your application configuration.

4

Configure HTTPS Webhooks

Update webhook URLs to use HTTPS endpoints with valid SSL certificates.

5

Implement mTLS

Set up mutual TLS client certificates for FAPI-compliant authentication.

6

Review Rate Limits

Production has rate limits. Check the documentation and implement appropriate backoff.

Production Checklist

Contact our team at api-support@hamsterbank.ai before going live. We'll review your integration and ensure everything is configured correctly.

Frequently Asked Questions

How long does sandbox data persist?

Sandbox data resets weekly on Sunday at midnight UTC. Transaction history, consents, and webhook subscriptions are all cleared. Test accounts are recreated with default balances.

Can I create custom test accounts?

Currently, sandbox uses pre-configured test accounts. For custom scenarios, contact our team to discuss dedicated test environments.

Are there rate limits in sandbox?

No rate limits are applied in sandbox. This lets you run automated tests and load testing. Production has per-TPP rate limits documented in the API reference.

Can I test mTLS in sandbox?

Yes, sandbox supports optional mTLS for testing your certificate setup. Use the certificates from your sandbox registration.