itr (Income Tax Return) flow, it creates a tokenised session link that can be shared with a recipient — via email or directly — so they can securely submit their ITR data through FinPass's hosted interface.hosted_url that opens FinPass's secure ITR data-collection interface — no frontend build required.recipient_email, reducing manual coordination.callback_url to receive real-time notifications when the recipient completes or abandons the session.expires_in duration to enforce time-bound data collection aligned with your workflow SLAs.metadata (e.g., customer reference IDs) to correlate sessions with your internal records.Cookie header.x-api-key and x-api-secret.refresh_token cookie.| Environment | Base URL |
|---|---|
| Production | https://api.finpass.ai |
x-api-key: <YOUR_X_API_KEY>
x-api-secret: <YOUR_X_API_SECRET>
Cookie: refresh_token=<YOUR_REFRESH_TOKEN>⚠️ Never expose x-api-key,x-api-secret, orrefresh_tokenin client-side code or public repositories. Always call this endpoint from a secure server-side environment.
| Header | Required | Description |
|---|---|---|
x-api-key | Yes | Your FinPass API key for authentication. |
x-api-secret | Yes | Your FinPass API secret for authentication. |
Content-Type | Yes | Must be application/json. |
Cookie | Yes | Must include refresh_token=<token> for session authentication. |
| Parameter | Type | Required | Description |
|---|---|---|---|
flow | String | Yes | The data-collection workflow to initiate. Currently supported value: "itr" (Income Tax Return collection). |
redirect_url | String | Yes | URL to redirect the recipient to after they complete or exit the hosted session. |
callback_url | String | Yes | Webhook URL that FinPass will POST to when the session status changes (e.g., on completion or expiry). |
metadata | Object | No | Arbitrary key-value pairs to attach to the session for internal tracking (e.g., {"customer_ref": "CUST-001"}). |
expires_in | Integer | No | Session validity in seconds from creation time. Defaults to system maximum if omitted. Example: 86400 for 24 hours. |
recipient_email | String | Yes | Email address of the person who will complete the collection session. The hosted link is automatically sent to this address. |
recipient_name | String | No | Full name of the recipient, used for personalising the email and hosted session. |
requester_name | String | No | Name of the requesting organisation or individual, displayed in the hosted session UI for context. |
{
"flow": "itr",
"redirect_url": "https://example.com/redirect",
"callback_url": "https://example.com/webhook",
"metadata": {
"customer_ref": "CUST-001"
},
"expires_in": 86400,
"recipient_email": "customer@example.com",
"recipient_name": "Customer Name",
"requester_name": "FinPass Demo"
}| Field | Type | Description |
|---|---|---|
success | Boolean | true if the session was created successfully. |
status_code | Integer | HTTP status code of the operation (e.g., 200). |
message | String | Human-readable result message confirming session creation and email dispatch. |
data | Object | The session details object. See sub-fields below. |
data Object Fields| Field | Type | Description |
|---|---|---|
session_id | String | Unique identifier for the created collection session (e.g., "col_6a27e7c6_2cbd9201e91c737f2e3e08b2"). Store this to track or reference the session later. |
flow | String | The flow type for this session, as provided in the request (e.g., "itr"). |
hosted_url | String | The full shareable URL that opens the FinPass hosted collection interface. Share this with the recipient or embed it in your communications. |
token | String | The bearer token embedded in the hosted_url. Can be used to construct or validate the session link independently. |
expires_at | String (ISO 8601) | Timestamp indicating when the session will expire. After this time, the hosted_url will no longer be accessible. |
status | String | Current session status. "created" on initial response. Other possible values include "completed", "expired", and "abandoned". |
recipient_email | String | Email address of the session recipient, confirming where the hosted link was sent. |
pan | String | null | PAN number associated with the session, if available at creation time. null until the recipient submits their ITR data. |
{
"success": true,
"status_code": 200,
"message": "Collection session created; hosted link emailed to recipient",
"data": {
"session_id": "col_6a27e7c6_2cbd9201e91c737f2e3e08b2",
"flow": "itr",
"hosted_url": "https://verify.finpass.ai?flow=itr&token=-lInefSeQbacMkWAjXzS7kk-Fh_e9DQNPihNMjqqvjc",
"token": "-lInefSeQbacMkWAjXzS7kk-Fh_e9DQNPihNMjqqvjc",
"expires_at": "2026-06-09T10:30:34.999026",
"status": "created",
"recipient_email": "customer@example.com",
"pan": null
}
}{
"success": false,
"status_code": 401,
"message": "Invalid or missing API credentials.",
"message_code": "unauthorized"
}x-api-key, x-api-secret, or refresh_token is absent, incorrect, or expired. Re-authenticate to obtain a fresh token and verify your API credentials before retrying.x-api-key, x-api-secret, or refresh_token in browser JavaScript or mobile app code.hosted_url: The generated hosted_url contains a bearer token granting access to the session. Treat it as sensitive — do not log it, expose it in URLs, or share it beyond the intended recipient.expires_in: Use the shortest expiry that fits your workflow to minimise the window of exposure if a session link is intercepted or forwarded.callback_url signatures: Verify that webhook POSTs to your callback_url originate from FinPass before processing the payload.x-api-secret and update your server configuration to minimise the impact of accidental exposure.redirect_url to close the loop: After the recipient completes the hosted session, they'll be redirected to your redirect_url. Use this page to confirm submission and guide them to the next step in your product.callback_url webhooks: Don't rely on polling — use the webhook to trigger downstream processing (e.g., credit decisioning, document storage) as soon as the session status changes.session_id: Persist the session_id against your internal customer record so you can correlate webhook events and query session status later.recipient_name and requester_name: Populating these fields improves the recipient's experience in the hosted session and email, building trust and reducing drop-off.session_id to check whether the recipient has completed, abandoned, or not yet started the flow.recipient_email holder before initiating a collection session on their behalf. Maintain auditable records of consent tied to the session_id.requester_name are clearly identifiable to reduce the risk of the email being flagged as phishing or spam.session_id, recipient_email, requester_name, and creation timestamp — to support audit and regulatory compliance requirements.curl --location 'https://api.finpass.ai/api/v1/services/collection/session/create' \
--header 'X-API-Key: YOUR API KEY' \
--header 'X-API-Secret: YOUR API SECRET' \
--header 'Content-Type: application/json' \
--data-raw '{
"flow": "itr",
"redirect_url": "https://example.com/redirect",
"callback_url": "https://example.com/webhook",
"metadata": {
"customer_ref": "CUST-001"
},
"expires_in": 86400,
"recipient_email": "customer@example.com",
"recipient_name": "Customer Name",
"requester_name": "FinPass Demo"
}'"string"