This guide outlines practical applications of the Parcha API, demonstrating how to leverage our endpoints for various compliance and due diligence scenarios. Let’s explore a common use case: document remediation.

Document Remediation

Document remediation is a crucial step in many KYB (Know Your Business) processes. It involves verifying the validity and authenticity of documents provided by businesses. Let’s look at how you can use Parcha’s API to streamline this process, focusing on proof of address verification.

Approach A: Multi-Step Process

This approach utilizes multiple API endpoints for a granular, step-by-step process.

Step 1: Upload the Document

First, use the document upload endpoint to securely store the document in our system.

Step 2: Run the Proof of Address Verification Check

Using the URL returned from the document upload, initiate the verification check.

Step 3: Poll for Job Status

Regularly check the status of the job using the job ID returned from the previous step.

Step 4: Process the Results

Once the job is completed, examine the results to determine if the document is validated or if there’s feedback to provide to the customer.

Python
if job_data['status'] == 'COMPLETED':
    check_result = job_data['check_results'][0]  # Assuming there's only one check
    if check_result['passed']:
        print("Document validated successfully!")
    else:
        follow_up = check_result.get('follow_up', 'Document validation failed.')
        print(f"Document validation failed. Feedback: {follow_up}")

Approach B: Streamlined Single-Call Process

This approach utilizes an undocumented feature that allows for a more streamlined process using a single API call.

After initiating the job with this single call, you can proceed to poll for the job status and process the results as described in Steps 3 and 4 of Approach A.

Conclusion

Both approaches offer effective ways to handle document remediation:

  • Approach A provides more granular control and is useful when you need to manage documents separately from the verification process.
  • Approach B streamlines the process into a single API call, which can be more efficient for straightforward verifications.

Choose the approach that best fits your workflow and integration needs. Remember to always handle sensitive document data securely and in compliance with relevant data protection regulations.

MCC Code Verification

Merchant Category Code (MCC) verification is another important aspect of KYB processes. This example demonstrates how to use the Parcha API to verify a business’s MCC code based on its basic information.

Step 1: Prepare Business Data and Run MCC Code Verification

Use the startKYBAgentJob endpoint to initiate the MCC code verification process.

Step 2: Poll for Job Status (Optional if using webhook)

If you’re not using a webhook, you can poll for the job status using the getJobById endpoint.

Step 3: Process the Results

Once the job is completed, examine the results to retrieve the MCC code and its description.

Python
if job_data['status'] == 'complete':
    mcc_check_result = next((result for result in job_data['check_results'] if result['command_id'] == 'kyb.mcc_code_check'), None)
    if mcc_check_result:
        mcc_data = mcc_check_result['command_result']['output']['payload']
        mcc_code = mcc_data.get('mcc_code')
        mcc_description = mcc_data.get('mcc_code_description')
        print(f"MCC Code: {mcc_code}")
        print(f"Description: {mcc_description}")
    else:
        print("MCC code check result not found.")

Conclusion

This MCC code verification process demonstrates a straightforward use of the Parcha API:

  1. It requires minimal input (basic business information).
  2. It can be executed with a single API call to startKYBAgentJob.
  3. Results can be retrieved either through a webhook or by polling the job status.

This approach is efficient for quick verifications that don’t require document uploads or complex multi-step processes. Always ensure that the business information provided is accurate to get the most reliable MCC code verification results.