Skip to main content

NACH Extraction API

The following document highlights the details of the NACH Extraction API.

API Description

Objective

The NACH Extraction API takes input as an image of pre-filled NACH templates and returns a JSON with the values filled in the image.

InputOutput
NACH template image (JPG, TIFF, PNG)Extracted NACH mandate details including UMRN, bank information, account details, mandate details, and validation results. A complete list of details returned by the API is provided under the Success Response Details section

API URL

https://ind-engine.thomas.hyperverge.co/v1/nach_extraction

API Endpoint

nach_extraction

Overview

The NACH Extraction API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should upload all images and files as form-data through a POST request.

Authentication

You need a unique pair of application ID ( appId ) and application key (appKey) from HyperVerge to verify your identity for accessing the NACH Extraction API.

ParameterMandatory or OptionalDescriptionAllowed Values
content-type MandatoryThis parameter defines the media type for the request payloadmultipart/form-data
appId MandatoryThe application identifier shared by HyperVerge. You can find the details in the dashboard's credentials tab.This should be a unique value.
appKey MandatoryThe application key shared by HyperVerge. You can find the details in the dashboard's credentials tab.This should be a unique value.
transactionIdMandatoryA unique identifier for tracking a user journeyThis should be both unique and easily associated with the user's journey in your application(s)

Inputs

The following table provides the details of the parameters required for the NACH Extraction API's request form:

ParameterMandatory or OptionalDescription
imageMandatoryNACH template image file (JPG, TIFF, PNG, max 10Mb)
templateVersionOptionalTemplate version (v1, v2, v3). Default: v3
enableOutputJPEGOptionalEnable JPEG output (yes/no). Default: no
enableOutputTIFOptionalEnable TIF output (yes/no). Default: no
enableOutputPDFOptionalEnable PDF output (yes/no). Default: no

Things to ensure

  • Only use an image with markers, otherwise it would throw HTTP error 422

Request

The following code snippet demonstrates a standard curl request for the NACH Extraction API:

curl --location 'https://ind-engine.thomas.hyperverge.co/v1/nach_extraction' \
--header 'Content-Type: multipart/form-data' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_HyperVerge_transactionID>' \
--form 'image=@"<path_to_nach_image>"' \
--form 'enableOutputJPEG="no"' \
--form 'enableOutputTIF="no"' \
--form 'enableOutputPDF="no"' \
--form 'templateVersion="v3"'

Success Response

The following code snippet demonstrates a success response from the NACH Extraction API:

{
"status": "success",
"statusCode": "200",
"result": {
"type": "nach",
"details": {
"UMRN": {
"conf": 0.95,
"value": "<UMRN_Number>",
"to-be-reviewed": "no"
},
"nachDate": {
"conf": 0.98,
"value": "<NACH_Date>",
"to-be-reviewed": "no"
},
"sponsorCode": {
"conf": 0.92,
"value": "<Sponsor_Code>",
"to-be-reviewed": "no"
},
"utilityCode": {
"conf": 0.96,
"value": "<Utility_Code>",
"to-be-reviewed": "no"
},
"bankName": {
"conf": 0.94,
"value": "<Bank_Name>",
"to-be-reviewed": "no"
},
"accountType": {
"conf": 0.88,
"value": "<Account_Type>",
"to-be-reviewed": "no"
},
"IFSCCode": {
"conf": 0.97,
"value": "<IFSC_Code>",
"to-be-reviewed": "no"
},
"MICR": {
"conf": 0.93,
"value": "<MICR_Code>",
"to-be-reviewed": "no"
},
"companyName": {
"conf": 0.91,
"value": "<Company_Name>",
"to-be-reviewed": "no"
},
"frequency": {
"conf": 0.89,
"value": "<Frequency>",
"to-be-reviewed": "no"
},
"amountInNumber": {
"conf": 0.95,
"value": "<Amount_Number>",
"to-be-reviewed": "no"
},
"amountInWords": {
"conf": 0.87,
"value": "<Amount_Words>",
"to-be-reviewed": "no"
},
"debitType": {
"conf": 0.96,
"value": "<Debit_Type>",
"to-be-reviewed": "no"
},
"startDate": {
"conf": 0.94,
"value": "<Start_Date>",
"to-be-reviewed": "no"
},
"endDate": {
"conf": 0.92,
"value": "<End_Date>",
"to-be-reviewed": "no"
},
"untilCanceled": {
"conf": 0.90,
"value": "<Until_Canceled>",
"to-be-reviewed": "no"
},
"NACHType": {
"conf": 0.93,
"value": "<NACH_Type>",
"to-be-reviewed": "no"
},
"phoneNumber": {
"conf": 0.88,
"value": "<Phone_Number>",
"to-be-reviewed": "no"
},
"emailId": {
"conf": 0.85,
"value": "<Email_ID>",
"to-be-reviewed": "no"
},
"reference1": {
"conf": 0.86,
"value": "<Reference_1>",
"to-be-reviewed": "no"
},
"reference2": {
"conf": 0.84,
"value": "<Reference_2>",
"to-be-reviewed": "no"
},
"signaturePresentPrimary": {
"conf": 0.91,
"value": "<Yes_No>",
"to-be-reviewed": "no"
},
"signaturePresentSecondary": {
"conf": 0.89,
"value": "<Yes_No>",
"to-be-reviewed": "no"
},
"signaturePresentTertiary": {
"conf": 0.87,
"value": "<Yes_No>",
"to-be-reviewed": "no"
},
"primaryAccountHolder": {
"conf": 0.93,
"value": "<Primary_Account_Holder_Name>",
"to-be-reviewed": "no"
},
"secondaryAccountHolder": {
"conf": 0.85,
"value": "<Secondary_Account_Holder_Name>",
"to-be-reviewed": "no"
},
"tertiaryAccountHolder": {
"conf": 0.82,
"value": "<Tertiary_Account_Holder_Name>",
"to-be-reviewed": "no"
},
"accountNumber": {
"conf": 0.96,
"value": "<Account_Number>",
"to-be-reviewed": "no"
}
}
}
}

Success Response Details

The following table outlines the details of the success response from the NACH Extraction API:

ParameterTypeDescription
statusstringThe status of the request
statusCodestringThe HTTP status code returned for the request
resultobjectContains the extracted details from the NACH template image
typestringThe type of document processed (nach)
detailsobjectContains the extracted NACH mandate information with confidence scores
UMRNobjectThe Unique Mandate Reference Number with confidence score and review flag
nachDateobjectThe NACH mandate date with confidence score and review flag
sponsorCodeobjectThe sponsor bank code with confidence score and review flag
utilityCodeobjectThe utility company code with confidence score and review flag
bankNameobjectThe name of the bank with confidence score and review flag
accountTypeobjectThe type of account with confidence score and review flag
IFSCCodeobjectThe IFSC code of the bank branch with confidence score and review flag
MICRobjectThe MICR code of the bank branch with confidence score and review flag
companyNameobjectThe name of the company with confidence score and review flag
frequencyobjectThe frequency of the mandate execution with confidence score and review flag
amountInNumberobjectThe amount in numerical format with confidence score and review flag
amountInWordsobjectThe amount in words with confidence score and review flag
debitTypeobjectThe type of debit with confidence score and review flag
startDateobjectThe start date of the mandate with confidence score and review flag
endDateobjectThe end date of the mandate with confidence score and review flag
untilCanceledobjectThe until canceled flag with confidence score and review flag
NACHTypeobjectThe type of NACH mandate with confidence score and review flag
phoneNumberobjectThe phone number with confidence score and review flag
emailIdobjectThe email ID with confidence score and review flag
reference1objectThe first reference number with confidence score and review flag
reference2objectThe second reference number with confidence score and review flag
signaturePresentPrimaryobjectThe primary signature presence indicator with confidence score and review flag
signaturePresentSecondaryobjectThe secondary signature presence indicator with confidence score and review flag
signaturePresentTertiaryobjectThe tertiary signature presence indicator with confidence score and review flag
primaryAccountHolderobjectThe name of the primary account holder with confidence score and review flag
secondaryAccountHolderobjectThe name of the secondary account holder with confidence score and review flag
tertiaryAccountHolderobjectThe name of the tertiary account holder with confidence score and review flag
accountNumberobjectThe account number with confidence score and review flag
confnumberThe confidence score for the extracted field (0-1)
valuestringThe extracted value for the field
to-be-reviewedstringThe flag indicating if the field needs manual review (yes/no)
note

The response's field values reflect only the data recorded in the user's NACH template image. Fields with confidence scores below 75% are marked for review.

Failure Response

The following is a failure response from the NACH Extraction API:

{
"status": "failure",
"statusCode": "422",
"error": "No NACH detected"
}

Error Responses

The following are some error responses from the NACH Extraction API:

{
"message": "Input Validation Error: is not one of enum values: yes,no",
"statusCode": 400,
"status": "failure"
}

Failure and Error Response Details

A failure or error response from the module contains a failure status, with a relevant status code and error message.

The following table lists all error responses:


Status CodeError MessageDescription
400Input Validation Error: is not one of enum values: yes,noThe enableOutputJPEG, enableOutputTIF, or enableOutputPDF parameter is used but is not in [yes,no].
400Input Validation Error: is not one of enum values: v1,v2,v3The templateVersion parameter is used but is not in [v1,v2,v3].
400API call requires one input imageThe image is missing in the request.
422No NACH detectedThe image uploaded does not contain NACH markers.
500Internal Server ErrorPlease check the request headers or contact the HyperVerge team for resolution.
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: