Testing Tools
Tools and utilities for testing your FinHub integration
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 Type | Description |
|---|---|
| Test Customers | Pre-created customers for testing |
| Test Accounts | Accounts with test balances |
| Test Cards | Virtual cards for testing |
| Test IBANs | Valid test IBANs for transfers |
Test Utilities API
Use the Test Utilities API for sandbox-specific operations:
| Endpoint | Description |
|---|---|
POST /test/customers/create | Create test customer with specific state |
POST /test/accounts/fund | Add funds to test account |
POST /test/kyc/approve | Auto-approve KYC for testing |
POST /test/transactions/simulate | Simulate 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 endpointWebhook Simulator
Trigger webhook events from the Developer Portal:
- Go to Settings > Webhooks
- Click Test Webhook
- Select event type
- Click Send Test
Postman Collection
Import the FinHub Postman collection for comprehensive API testing:
- Download collection from Developer Portal
- Import into Postman
- Configure environment variables
- 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: 'test@example.com'
});
expect(response.status).toBe(201);
expect(response.data.id).toBeDefined();
});
});Next Steps
Core Integration Flows
Implement the core integration flows