SDK reference · Android SDK / Android Individual Modules

Tax ID Validation

The Tax ID Validation module collects a user's tax identification number and validates its format and structure. Your Incode Flow or Workflow configuration determines what the validation checks and how the result is interpreted.

There is no Dashboard equivalent for this module, so you cannot use integration Pattern 3 to add it. You must use Pattern 1 or 2, adding the module to a FlowConfig in code as shown on this page.

{/* PM: True? No Dashboard equivalent? */}

Add Tax ID Validation

Add the module with addTaxIdValidation().

flowConfigBuilder.addTaxIdValidation()
flowConfigBuilder.addTaxIdValidation();

Example

The example below adds Tax ID Validation as the only step in the flow and listens for the result through onTaxIdValidationCompleted().

val flowConfig = FlowConfig.Builder()
    .addTaxIdValidation()
    .build()

val onboardingListener = object : OnboardingListener() {
    override fun onTaxIdValidationCompleted(isSuccess: Boolean) {
        // Tax ID validation step completed. isSuccess reports whether validation succeeded.
    }
}

IncodeWelcome.getInstance()
    .startOnboarding(activityContext, sessionConfig, flowConfig, onboardingListener)
FlowConfig flowConfig = new FlowConfig.Builder()
    .addTaxIdValidation()
    .build();

IncodeWelcome.OnboardingListener onboardingListener = new IncodeWelcome.OnboardingListener() {
    @Override
    public void onTaxIdValidationCompleted(boolean isSuccess) {
        // Tax ID validation step completed. isSuccess reports whether validation succeeded.
    }
};

IncodeWelcome.getInstance()
    .startOnboarding(activityContext, sessionConfig, flowConfig, onboardingListener);

Configuration Options

Tax ID Validation has no configurable options. It is constructed with a no-argument constructor, and addTaxIdValidation() adds it for you.

Result

Tax ID Validation does not deliver a result payload object through the OnboardingListener. Completion is signaled by the onTaxIdValidationCompleted(boolean) callback, where the isSuccess flag reports whether the tax ID validation step succeeded.

If the step fails with an error, it surfaces through OnboardingListener.onError(Throwable). This module does not define a module-specific exception subtype.

For the related listener interface, see TaxIdValidationListener in API Reference.

Was this page helpful?