DEV Community

Cover image for Building Resilient Verification Flows: How to Use the Services List API for Dynamic Integration
eKYC Pro
eKYC Pro

Posted on

Building Resilient Verification Flows: How to Use the Services List API for Dynamic Integration

When building registration or risk-review workflows, the user experience often hinges on how gracefully your application handles the availability of external verification signals. If you are integrating eKYC Pro to validate identifiers, you might be tempted to hardcode your supported platform checks. However, a more resilient approach involves programmatically querying the available services before your application even attempts a request.

By leveraging the Services List API, you can build dynamic front-ends that adapt to real-time service availability, preventing unnecessary API calls and providing clearer feedback to your users.

Why Dynamic Service Discovery Matters

Hardcoding platform support creates a brittle integration. If a specific service check is temporarily unavailable, your application might continue to attempt requests, leading to failed workflows and frustrated users. Instead, by integrating a discovery step, you can:

  1. Filter UI Elements: Dynamically show or hide verification options based on the enabled status returned by the API.
  2. Optimize Request Routing: Ensure your application only submits identifiers for services that are currently active, reducing error-handling overhead.
  3. Improve User Experience: Provide context-aware messaging to users if a specific verification method is currently offline.

Implementation Strategy

To build this into your workflow, treat the Services List API as a configuration layer. Instead of assuming platform support, your application should fetch the current state of services during initialization or at regular intervals.

Step 1: Querying Available Services

Use the GET https://api.ekycpro.com/v1/services endpoint to retrieve the full list of supported check types. The response provides a clean list of services, their required data_type (phone or email), and their current enabled status.

Step 2: Normalizing the Data

Once you receive the response, map the enabled services into your application’s state. This allows your UI components to consume a local, reliable source of truth.

// Conceptual example of processing the service list
async function getAvailableServices() {
 const response = await fetch('https://api.ekycpro.com/v1/services');
 const data = await response.json();

 if (data.success) {
 // Filter for services that are enabled and match your input needs
 return data.services.filter(service => service.enabled === true);
 }
 return [];
}
Enter fullscreen mode Exit fullscreen mode

Step 3: Integrating into the Registration Flow

With your list of enabled services, you can now conditionally render your registration form. If a user enters a phone number, your form logic should only present verification options for services where data_type is "phone" and enabled is true.

A Note on Decision Support

Remember that registration signals and risk scores provided by eKYC Pro are intended as decision-support inputs. They provide valuable account-presence signals, but they should be consumed by your own business logic to determine the next steps in your user journey. By dynamically checking service availability first, you ensure that your decision-support pipeline remains stable and responsive.

Conclusion

Integrating the Services List API is a straightforward way to add resilience to your verification workflows. By shifting from static configuration to dynamic discovery, you create a more robust integration that respects the real-time status of the services you rely on.

For more details on integrating these signals, check out the official documentation.

This article was drafted with AI assistance and reviewed before publishing.

Top comments (0)