> ## Documentation Index
> Fetch the complete documentation index at: https://docs.finhub.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# 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

```bash theme={null}
# 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

```bash theme={null}
# 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:

```bash theme={null}
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:

```javascript theme={null}
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

<Card title="Core Integration Flows" icon="diagram-project" href="/baas/api/integration/flows/index">
  Implement the core integration flows
</Card>
