Skip to main content

Testing Tools

This guide covers tools and utilities available for testing your FinHub integration.

Available Tools

Sandbox Test Data

The sandbox includes pre-configured test data:
Data TypeDescription
Test CustomersPre-created customers for testing
Test AccountsAccounts with test balances
Test CardsVirtual cards for testing
Test IBANsValid test IBANs for transfers

Test Utilities API

Use the Test Utilities API for sandbox-specific operations:
EndpointDescription
POST /test/customers/createCreate test customer with specific state
POST /test/accounts/fundAdd funds to test account
POST /test/kyc/approveAuto-approve KYC for testing
POST /test/transactions/simulateSimulate incoming transactions

Testing Workflows

Customer Flow Testing

# Create a test customer with pre-approved KYC
curl -X POST "/api/v2/test/customers/create" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"type": "individual", "kycStatus": "approved"}'

Transaction Testing

# Simulate an incoming transfer
curl -X POST "/api/v2/test/transactions/simulate" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"type": "credit", "amount": 1000, "currency": "EUR", "accountId": "acc_123"}'

Webhook Testing

Local Development

Use tools like ngrok to expose local webhooks:
ngrok http 3000
# Use the generated URL as your webhook endpoint

Webhook Simulator

Trigger webhook events from the Developer Portal:
  1. Go to Settings > Webhooks
  2. Click Test Webhook
  3. Select event type
  4. Click Send Test

Postman Collection

Import the FinHub Postman collection for comprehensive API testing:
  1. Download collection from Developer Portal
  2. Import into Postman
  3. Configure environment variables
  4. Run pre-built test sequences

Automated Testing

Integration Tests

Example test structure:
describe('Customer Registration', () => {
  it('should create individual customer', async () => {
    const response = await api.post('/customers/individual', {
      firstName: 'Test',
      lastName: 'User',
      email: '[email protected]'
    });
    expect(response.status).toBe(201);
    expect(response.data.id).toBeDefined();
  });
});

Next Steps

Core Integration Flows

Implement the core integration flows