Zoho Books Integration
Zoho Books organisations are now connected from Integrations → Accounting as an AccountingSystem. The client id, secret and refresh token are verified once and stored encrypted; they are no longer sent with each request, and journals can be pushed nightly. See Accounting systems.
Overview
PointNXT integrates directly with Zoho Books to provide automated, cloud-to-cloud journal synchronization. It translates PointNXT's settlement subledger entries into balanced manual journals and posts them directly to the Zoho Books REST API.
The integration provides:
- OAuth 2.0 Refresh Token Flow: Secure authorization across global Zoho domains (
zoho.in,zoho.com,zoho.eu). - Chart of Accounts Synchronization: Fetches real accounts from your Zoho Books organization to allow dropdown mapping.
- Automated Journal Posting: Posts balanced debit/credit manual journals directly via
POST /api/v3/journals. - Manual Journal CSV Export: Generates a pre-formatted CSV file formatted for Zoho Books bulk journal imports.
Architecture & Code Map
Protocol logic is isolated inside src/integrations/zoho-books:
| Layer | File Path | Responsibility |
|---|---|---|
| Integration Module | src/integrations/zoho-books/zoho-books.module.ts | NestJS module exporting ZohoBooksClientService |
| Barrel Export | src/integrations/zoho-books/index.ts | Clean public interface for domain services |
| Client Service | src/integrations/zoho-books/services/zoho-books-client.service.ts | OAuth token exchange, Chart of Accounts fetch, journal POST, CSV build |
| Interfaces | src/integrations/zoho-books/interfaces/zoho-books.interface.ts | ZohoCredentials, ZohoAccount, ZohoJournalPayload, ZohoPushResult |
| Domain Orchestration | src/modules/finance/settlement/services/erp-integration.service.ts | Account ID resolution, payload validation, and sync audit logging |
| REST Controller | src/modules/finance/settlement/controllers/erp-integration.controller.ts | Endpoints for accounts sync, CSV export, and API push |
Setting Up Zoho Books Credentials
To connect PointNXT to Zoho Books:
- Go to Zoho Developer Console.
- Create a Self-Client (or Server-based Application).
- Generate a Code with the scope:
ZohoBooks.fullaccess.all(orZohoBooks.journals.CREATE,ZohoBooks.settings.READ). - Exchange the code for a permanent
refresh_token. - Locate your
organization_idinside Zoho Books underSettings > Organization Profile. - Enter credentials in PointNXT:
- Client ID & Client Secret
- Refresh Token
- Organization ID
- Data Center Domain (
infor India,comfor US,eufor Europe)
Account Mapping Workflow
- Click "Fetch Accounts from Zoho" in PointNXT.
- PointNXT fetches all active accounts from
GET https://books.zoho.{domain}/api/v3/chartofaccounts. - In the mapping table, associate each PointNXT accounting code with its corresponding Zoho Account:
4000 Sales: E-Commerce Sales Income Account5000 Commission: Marketplace Commission Expense Account5010 Shipping: Marketplace Freight Expense Account2100 TCS: GST TCS Liability Account1300 TDS: Income Tax TDS Asset Account1120 Clearing: Bank or Undeposited Funds Clearing Account
- Save mappings.
API Endpoints
1. Fetch Remote Chart of Accounts
POST /v1/finance/settlement/erp/zoho/accounts
Authorization: Bearer <accessToken>
Content-Type: application/json
{
"clientId": "1000.XXXX",
"clientSecret": "YYYY",
"refreshToken": "1000.ZZZZ",
"organizationId": "60012345678",
"domain": "in"
}
2. Direct Push of Journal Voucher
POST /v1/finance/settlement/erp/{systemId}/zoho/push
Authorization: Bearer <accessToken>
Content-Type: application/json
{
"payoutId": "0190a1b2-..."
}
Credentials are the ones stored on the connected accounting system; they are never sent in the request. Vouchers are chosen by payoutId, voucherId or a from/to range, and each unsent voucher in the selection becomes one Zoho manual journal. A voucher already sent to this organisation is skipped.
Response:
{
"success": true,
"voucherNumber": "JN-00042",
"totalAmount": 10000,
"lineCount": 6,
"zohoResponse": {
"code": 0,
"message": "The journal has been created."
}
}
3. Export Zoho Books Manual Journal CSV
GET /v1/finance/settlement/erp/{systemId}/zoho/export-csv?payoutId=0190a1b2-...
Authorization: Bearer <accessToken>
Returns a text/csv formatted with required headers:
Journal Date,Reference Number,Notes,Account Name,Debit,Credit,Description.