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

# Quick Start Guide

> Get up and running with FinPro APIs in minutes

## Overview

This guide walks you through the complete process of integrating with FinPro's Account Aggregator platform, from initial onboarding to successfully fetching customer-permissioned financial data. By the end of this guide, you will have created a consent request, obtained customer approval, and retrieved financial information through the AA ecosystem.

## Prerequisites

Before you begin, ensure you have:

<CardGroup cols={2}>
  <Card title="FinPro Account" icon="user">
    Contact Moneyone to initiate FIU onboarding for UAT or production environment
  </Card>

  <Card title="Admin Portal Access" icon="key">
    Receive credentials to access the FinPro admin portal for configuration
  </Card>

  <Card title="API Credentials" icon="lock">
    Obtain your organisationId, client\_id, client\_secret, and appIdentifier
  </Card>

  <Card title="Development Environment" icon="code">
    Set up a backend service capable of making REST API calls and handling webhooks
  </Card>
</CardGroup>

## Step 1: Configure Consent Template

Consent templates define the scope, purpose, and behavior of data requests. You must create at least one template before making API calls.

### Access Admin Portal

1. Navigate to the FinPro admin portal using credentials provided by Moneyone
2. Go to **Admin → Consent Templates**
3. Click **Create New Template**

### Configure Template Parameters

<Steps>
  <Step title="Basic Information">
    * **Template Name**: Choose a descriptive name (e.g., "Personal Loan Underwriting")
    * **Purpose Code**: Select the appropriate RBI-defined code (e.g., 101 for personal loans)
    * **Description**: Provide customer-facing explanation of why data is needed
  </Step>

  <Step title="Consent Type and Validity">
    * **Consent Type**: Choose ONETIME for single fetch or PERIODIC for recurring fetches
    * **Validity Period**: Set duration (e.g., 1 year for loan monitoring, 1 day for credit evaluation)
    * **Fetch Frequency**: For periodic consents, select daily, weekly, or monthly
  </Step>

  <Step title="Financial Information Types">
    Select which types of data to request:

    * Savings Account
    * Current Account
    * Term Deposits (FD/RD)
    * Mutual Funds
    * Equities and Debentures
    * Insurance Policies

    Only request FI types necessary for your use case to maximize approval rates.
  </Step>

  <Step title="Data Range">
    * **From Date**: How far back to fetch data (e.g., 6 months, 1 year)
    * **To Date**: Typically set to current date

    Keep data range reasonable to avoid overwhelming customers.
  </Step>

  <Step title="Save Template">
    Save the template and note the generated **productID** - you'll use this in API calls
  </Step>
</Steps>

<Note>
  Template configurations cannot be changed once active consents exist. Plan your templates carefully based on use case requirements.
</Note>

## Step 2: Configure Webhook Endpoint

Webhooks notify your backend of consent lifecycle events and data readiness. Configure them in the Admin Portal:

1. Navigate to **Admin → Webhooks** and click **Create New Webhook**
2. Set your **Webhook URL** (e.g., `https://api.yourcompany.com/webhooks/finpro`)
3. Generate a strong **Secret** for HMAC-SHA256 signature verification
4. Subscribe to the events you need (consent events, data events, etc.)

Your endpoint must accept POST requests, verify the `X-Webhook-Signature` header, and respond with HTTP 200.

<Card title="Webhooks Documentation" icon="bell" href="/api-reference/webhooks/overview">
  Full setup guide, HMAC verification code examples, payload structures, and best practices
</Card>

## Step 3: Create Consent Request

Use the Consent Request API to initiate the customer consent journey.

### API Request

<CodeGroup>
  ```bash cURL theme={null}
  curl --location '{{Base_URL}}/v3/consent/request' \
  --header 'client_id: {{Client_Id}}' \
  --header 'client_secret: {{Client_Secret}}' \
  --header 'organisationId: {{Organisation_Id}}' \
  --header 'appIdentifier: {{App_Identifier}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "productID": "PERSONAL_LOAN_V1",
    "vua": "9876543210@onemoney",
    "accountID": "LOAN_APP_12345",
    "redirect": true,
    "name": "John Doe",
    "email": "john.doe@example.com"
  }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(`${baseUrl}/v3/consent/request`, {
    method: 'POST',
    headers: {
      'client_id': clientId,
      'client_secret': clientSecret,
      'organisationId': organisationId,
      'appIdentifier': appIdentifier,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      productID: 'PERSONAL_LOAN_V1',
      vua: '9876543210@onemoney',
      accountID: 'LOAN_APP_12345',
      redirect: true,
      name: 'John Doe',
      email: 'john.doe@example.com'
    })
  });

  const data = await response.json();
  console.log('Consent Handle:', data.consentHandle);
  console.log('Redirect URL:', data.redirectionUrl);
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      f"{base_url}/v3/consent/request",
      headers={
          "client_id": client_id,
          "client_secret": client_secret,
          "organisationId": organisation_id,
          "appIdentifier": app_identifier,
          "Content-Type": "application/json"
      },
      json={
          "productID": "PERSONAL_LOAN_V1",
          "vua": "9876543210@onemoney",
          "accountID": "LOAN_APP_12345",
          "redirect": True,
          "name": "John Doe",
          "email": "john.doe@example.com"
      }
  )

  data = response.json()
  print("Consent Handle:", data["consentHandle"])
  print("Redirect URL:", data["redirectionUrl"])
  ```
</CodeGroup>

### API Response

```json theme={null}
{
  "consentHandle": "5eada97a-9852-4227-9558-45849b2800a3",
  "redirectionUrl": "https://onemoney.in/consent?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "status": "PENDING"
}
```

**Key Fields:**

* `consentHandle`: Unique identifier for this consent request
* `redirectionUrl`: URL to redirect customer for consent approval
* `status`: Current consent state (PENDING, ACTIVE, REJECTED, etc.)

<Card title="API Documentation" icon="code" href="/api-reference/consent/request-v3">
  View complete V3 Consent Request API reference
</Card>

## Step 4: Redirect Customer to AA

Once you have the `redirectionUrl`, present it to the customer for consent approval.

### Redirection Methods

<Tabs>
  <Tab title="Web Application">
    Redirect the customer's browser to the AA consent page:

    ```javascript theme={null}
    // Full page redirect
    window.location.href = data.redirectionUrl;

    // Or open in new window
    window.open(data.redirectionUrl, '_blank');
    ```
  </Tab>

  <Tab title="Mobile Application">
    Use deep linking to open the AA mobile app:

    ```swift iOS (Swift) theme={null}
    if let url = URL(string: redirectionUrl) {
      UIApplication.shared.open(url)
    }
    ```

    ```kotlin Android (Kotlin) theme={null}
    val intent = Intent(Intent.ACTION_VIEW, Uri.parse(redirectionUrl))
    startActivity(intent)
    ```
  </Tab>

  <Tab title="Iframe Embedding">
    Embed the AA consent flow within your application:

    ```html theme={null}
    <iframe
      src="{{redirectionUrl}}"
      width="100%"
      height="600px"
      frameborder="0"
      allow="camera; payment"
    ></iframe>
    ```

    <Warning>
      Some AAs may not support iframe embedding due to security policies. Test in UAT before production.
    </Warning>
  </Tab>
</Tabs>

### Customer Consent Journey

The customer will complete the following steps in the AA interface:

1. **Mobile/PAN Verification**: Enter and verify their mobile number or PAN
2. **OTP Authentication**: Enter OTP received from the AA
3. **Account Discovery**: AA fetches linked accounts from Financial Information Providers
4. **Account Selection**: Customer selects which accounts to share data from
5. **Consent Review**: Customer reviews the consent terms, data scope, and validity
6. **Approval/Rejection**: Customer approves or rejects the consent request

## Step 5: Handle Webhook Events

Your webhook endpoint will receive events as the customer progresses through the journey. The two key events in the quickstart flow are:

1. **`CONSENT_APPROVED`** — Customer approved the consent. **Action**: Trigger FI data fetch using the `consentId`.
2. **`DATA_READY`** — Financial data is available. **Action**: Download data using the Data Management APIs.

See [Consent Events](/api-reference/webhooks/consent-events) and [Data Events](/api-reference/webhooks/data-events) for full payload examples and all supported event types.

## Step 6: Fetch Financial Data

Once you receive the DATA\_READY webhook, retrieve the financial information.

### Trigger FI Request (if not auto-fetched)

If your consent template does not auto-fetch data, manually trigger a fetch:

<CodeGroup>
  ```bash cURL theme={null}
  curl --location '{{Base_URL}}/fi/request' \
  --header 'client_id: {{Client_Id}}' \
  --header 'client_secret: {{Client_Secret}}' \
  --header 'organisationId: {{Organisation_Id}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "consentId": "3c92001e-57ea-4320-bbb8-66d524bfb435"
  }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(`${baseUrl}/fi/request`, {
    method: 'POST',
    headers: {
      'client_id': clientId,
      'client_secret': clientSecret,
      'organisationId': organisationId,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      consentId: '3c92001e-57ea-4320-bbb8-66d524bfb435'
    })
  });

  const data = await response.json();
  console.log('Session ID:', data.sessionId);
  ```
</CodeGroup>

<Card title="API Documentation" icon="code" href="/api-reference/data/fi-request">
  View FI Request API reference
</Card>

### Download Financial Data

Retrieve the financial information in JSON format:

<CodeGroup>
  ```bash cURL theme={null}
  curl --location '{{Base_URL}}/getallfidata' \
  --header 'client_id: {{Client_Id}}' \
  --header 'client_secret: {{Client_Secret}}' \
  --header 'organisationId: {{Organisation_Id}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "consentId": "3c92001e-57ea-4320-bbb8-66d524bfb435"
  }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(`${baseUrl}/getallfidata`, {
    method: 'POST',
    headers: {
      'client_id': clientId,
      'client_secret': clientSecret,
      'organisationId': organisationId,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      consentId: '3c92001e-57ea-4320-bbb8-66d524bfb435'
    })
  });

  const financialData = await response.json();

  // Process account information
  for (const account of financialData.Account) {
    console.log('Account Type:', account.type);
    console.log('Masked Number:', account.maskedAccNumber);

    // Process transactions
    for (const transaction of account.Transactions.Transaction) {
      console.log('Date:', transaction.transactionTimestamp);
      console.log('Amount:', transaction.amount);
      console.log('Category:', transaction.category);
    }
  }
  ```
</CodeGroup>

### Response Structure

The financial data response includes:

<AccordionGroup>
  <Accordion title="Account Profile">
    Basic account details including account type, masked account number, FIP information, and account holder details
  </Accordion>

  <Accordion title="Summary Information">
    Aggregated metrics like current balance, total credits, total debits, opening/closing balances for the requested period
  </Accordion>

  <Accordion title="Transaction Details">
    Complete list of transactions with timestamps, amounts, transaction types, narration, reference numbers, and categories
  </Accordion>

  <Accordion title="Analytics (if enabled)">
    Categorized insights including salary detection, EMI identification, spending patterns, and risk indicators
  </Accordion>
</AccordionGroup>

<Card title="API Documentation" icon="code" href="/api-reference/data/get-all-fi-data">
  View Get All FI Data API reference
</Card>

## Step 7: Process and Store Data

Once you have the financial data, process it according to your business logic.

### Sample Processing Logic

```javascript theme={null}
async function processFinancialData(consentId, accountID) {
  // 1. Fetch financial data
  const financialData = await getFinancialData(consentId);

  // 2. Extract key metrics
  const metrics = {
    accountID: accountID,
    consentId: consentId,
    accounts: financialData.Account.map(account => ({
      type: account.type,
      fip: account.FIType,
      currentBalance: account.Summary?.currentBalance,
      totalCredits: calculateTotalCredits(account.Transactions),
      totalDebits: calculateTotalDebits(account.Transactions),
      salaryCredits: findSalaryTransactions(account.Transactions),
      emiDebits: findEMITransactions(account.Transactions)
    }))
  };

  // 3. Run credit scoring logic
  const creditScore = calculateCreditScore(metrics);

  // 4. Store in database
  await database.saveFinancialMetrics(metrics);
  await database.updateCreditScore(accountID, creditScore);

  // 5. Update application status
  await updateLoanApplicationStatus(accountID, 'UNDERWRITING_COMPLETE');

  return metrics;
}
```

<Warning>
  **Compliance Note**: Ensure you have proper data retention and deletion policies in place. Delete financial data when no longer needed for business purposes.
</Warning>

## Next Steps

Congratulations! You've successfully integrated with FinPro and retrieved customer-permissioned financial data. Here's what to explore next:

<CardGroup cols={2}>
  <Card title="Analytics" icon="chart-line" href="/guides/features/analytics">
    Leverage built-in transaction categorization and financial insights
  </Card>

  <Card title="Recurring Consents" icon="arrows-rotate" href="/guides/features/recurring-consent">
    Set up ongoing monitoring for loan portfolios and collections
  </Card>

  <Card title="Smart AA Router" icon="route" href="/guides/features/smart-aa-router">
    Optimize consent success rates with multi-AA routing
  </Card>

  <Card title="MIS Dashboard" icon="chart-mixed" href="/guides/features/mis-funnel-analytics">
    Monitor consent funnels and operational metrics
  </Card>
</CardGroup>

## Testing in UAT

Before going to production:

<Steps>
  <Step title="Test All Consent States">
    Verify your application handles approved, rejected, paused, resumed, revoked, and expired consents correctly
  </Step>

  <Step title="Test Webhook Failures">
    Simulate webhook delivery failures and ensure your retry logic works
  </Step>

  <Step title="Test Data Fetch Failures">
    Handle scenarios where FIPs are down or return partial data
  </Step>

  <Step title="Load Testing">
    Test high-volume consent creation and data fetching to ensure scalability
  </Step>

  <Step title="Security Review">
    Verify webhook signature verification, credential storage, and data encryption
  </Step>
</Steps>

## Common Issues and Solutions

<AccordionGroup>
  <Accordion title="Consent approval rate is low">
    **Possible Causes:**

    * Consent scope too broad (too many FI types requested)
    * Data range too long (more than 12 months)
    * Unclear purpose description

    **Solutions:**

    * Narrow consent scope to essential FI types only
    * Reduce data range to 6 months or less
    * Improve consent template description clarity
    * A/B test different consent configurations
  </Accordion>

  <Accordion title="Webhooks not being received">
    **Possible Causes:**

    * Webhook URL not accessible from internet
    * Firewall blocking FinPro webhook servers
    * SSL certificate issues

    **Solutions:**

    * Verify webhook URL is publicly accessible
    * Whitelist FinPro IP ranges in firewall
    * Ensure valid SSL certificate on webhook endpoint
    * Check webhook logs in FinPro admin portal
  </Accordion>

  <Accordion title="Data fetch returning empty results">
    **Possible Causes:**

    * Customer's FIP not integrated with selected AA
    * FIP downtime during data fetch
    * Customer revoked consent immediately after approval

    **Solutions:**

    * Use Smart AA Router for better FIP coverage
    * Implement retry logic for failed fetches
    * Check consent status before fetching data
  </Accordion>
</AccordionGroup>

## Support Resources

<CardGroup cols={2}>
  <Card title="API Reference" icon="code" href="/api-reference/consent/request-v2">
    Complete API documentation with examples
  </Card>

  <Card title="Admin Portal" icon="gear" href="https://finpro.moneyone.in">
    Configure templates, webhooks, and monitor metrics
  </Card>

  <Card title="Technical Support" icon="life-ring" href="mailto:support@moneyone.in">
    Contact support team for integration assistance
  </Card>

  <Card title="Postman Collection" icon="flask" href="/moneyone_finpro.postman_collection.json">
    Import pre-configured API collection for testing
  </Card>
</CardGroup>

For additional help, reach out to the Moneyone support team through the FinPro admin portal or email [support@moneyone.in](mailto:support@moneyone.in).
