Skip to main content

Integration Scenarios

End-to-end test scripts for validating your Zenoo integration. Run these against the staging environment before going live.
Replace {project_hash} with your staging project hash and staging-key with your staging API key in all examples below.

Scenario 1: Company Verification sync end-to-end

Submit a company for verification using sync mode and validate the response.
Verify the response contains:
  • overall_verdict is "Pass", "Refer", or "Fail"
  • risk_tier is "Low", "Medium", or "High"
  • company.legal_name is populated
  • company.verification_status is "Verified"
  • screening object contains pep_status, sanctions_status, adverse_media_status
  • checks_summary.total is greater than 0
  • case_reference starts with "AML-"

Scenario 2: Person Verification async end-to-end

Initiate an async Person Verification journey, extract tokens, and poll for results.
Verify:
  • Init response contains tokens.pull and tokens.start
  • Poll returns 204 (processing) or 200 (results ready)
  • Final 200 response contains overall_verdict and risk_tier

Scenario 3: Idempotency

Submit the same external_reference twice. The second request should return the existing case, not create a duplicate.
Verify:
  • Both responses return the same case_reference
  • No duplicate verification is created
  • The second request completes faster (returns cached result)

Scenario 4: Error handling

Test error responses for common failure modes.

Missing required field (400)

Expected: 400 with error: "VALIDATION_ERROR".

Invalid API key (401)

Expected: 401 with error: "UNAUTHORIZED".

Invalid project hash (404)

Expected: 404 with error: "NOT_FOUND".

Invalid JSON (400)

Expected: 400 with error: "INVALID_JSON".

Scenario 5: Webhook delivery

Submit a verification and confirm your webhook endpoint receives the event.

Setup

Before running this test, ensure your staging webhook URL is configured. For local development:

Submit verification

Verify webhook received

Check your webhook listener for a verification.completed event. The payload should include:
  • event_type: "verification.completed"
  • callback_reference matching your external_reference
  • data object with the full verification results
  • X-Zenoo-Signature header for signature verification

Verify signature

Checklist

Run all five scenarios and confirm:
  • Scenario 1: Sync Company Verification returns a complete compliance report
  • Scenario 2: Async Person Verification init returns tokens, poll returns results
  • Scenario 3: Duplicate external_reference returns same case
  • Scenario 4: All four error cases return correct status codes
  • Scenario 5: Webhook received with valid signature

Next steps