> ## Documentation Index
> Fetch the complete documentation index at: https://docs.go.gbgplc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Secure OTV

export const ModuleToc = () => {
  const ref = useRef(null);
  const [items, setItems] = useState([]);
  const [inVariant, setInVariant] = useState(false);
  useEffect(() => {
    const toc = ref.current;
    if (!toc) return;
    const sections = [{
      label: "Capabilities",
      match: "capabilities",
      suffix: true
    }, {
      label: "Default outcomes",
      match: "default outcomes"
    }, {
      label: "Input payload",
      match: "input payload"
    }, {
      label: "Sample response",
      match: "sample response"
    }];
    const related = {
      label: "Related guides",
      match: "related guides and tutorials"
    };
    const selector = "h2[id], h3[id], h4[id], h5[id], h6[id]";
    const read = heading => ({
      heading,
      level: Number(heading.tagName.slice(1)),
      text: heading.textContent.replace(/​/g, "").trim()
    });
    const matches = (entry, section) => {
      const text = entry.text.toLowerCase();
      return text === section.match || section.suffix && text.endsWith(` ${section.match}`);
    };
    const isSection = entry => sections.some(section => matches(entry, section));
    const after = entry => toc.compareDocumentPosition(entry.heading) & Node.DOCUMENT_POSITION_FOLLOWING;
    const link = (entry, label) => ({
      label: label || entry.text,
      id: entry.heading.id
    });
    const sectionLinks = pool => sections.map(section => {
      const entry = pool.find(candidate => matches(candidate, section));
      return entry ? link(entry, section.label) : null;
    }).filter(Boolean);
    const root = toc.closest("#content-area") || document.body;
    const key = window.location.pathname;
    if (!root.moduleTocPage || root.moduleTocPage.key !== key) {
      root.moduleTocPage = {
        key,
        headings: Array.from(root.querySelectorAll(selector)).filter(heading => !heading.closest("details")).map(read)
      };
    }
    const page = root.moduleTocPage.headings.filter(after);
    const relatedEntry = page.find(entry => matches(entry, related));
    const relatedLink = relatedEntry ? [link(relatedEntry, related.label)] : [];
    const variant = toc.closest("details");
    if (variant) {
      const own = Array.from(variant.querySelectorAll(selector)).map(read).filter(after);
      const ownLinks = sectionLinks(own);
      const shared = sectionLinks(page).filter(fallback => !ownLinks.some(existing => existing.label === fallback.label));
      const order = sections.map(section => section.label);
      const merged = [...ownLinks, ...shared].sort((a, b) => order.indexOf(a.label) - order.indexOf(b.label));
      setInVariant(true);
      setItems([...merged, ...relatedLink]);
      return;
    }
    const isVariant = (entry, index) => {
      if (isSection(entry)) return false;
      for (const next of page.slice(index + 1)) {
        if (next.level <= entry.level) return false;
        if (isSection(next)) return true;
      }
      return false;
    };
    const loose = [];
    const groups = [];
    page.forEach((entry, index) => {
      if (isVariant(entry, index)) groups.push({
        entry,
        pool: []
      }); else if (isSection(entry)) (groups.length ? groups[groups.length - 1].pool : loose).push(entry);
    });
    const variants = groups.map(group => ({
      ...link(group.entry),
      children: sectionLinks(group.pool)
    })).filter(group => group.children.length);
    setInVariant(false);
    setItems(variants.length > 1 ? [...sectionLinks(loose), ...variants, ...relatedLink] : [...sectionLinks(page), ...relatedLink]);
  }, []);
  const linkClass = "block -ml-px border-l border-transparent pl-4 text-gray-600 dark:text-gray-400 hover:border-gray-400 hover:text-gray-900 dark:hover:text-gray-200";
  return <nav ref={ref} aria-label={inVariant ? "In this variant" : "On this page"} data-module-toc="" className="module-toc not-prose my-6 text-sm">
      {items.length > 0 && <p className="mb-2 font-medium text-gray-900 dark:text-gray-200">
          {inVariant ? "In this variant" : "On this page"}
        </p>}
      {items.length > 0 && <ul className="space-y-1.5 border-l border-gray-200 dark:border-white/10">
          {items.map(item => <li key={item.id}>
              <a href={`#${item.id}`} className={item.children ? `${linkClass} font-medium text-gray-800 dark:text-gray-200` : linkClass}>
                {item.label}
              </a>
              {item.children && <ul className="mt-1.5 space-y-1.5 pl-4">
                  {item.children.map(child => <li key={child.id}>
                      <a href={`#${child.id}`} className={linkClass}>
                        {child.label}
                      </a>
                    </li>)}
                </ul>}
            </li>)}
        </ul>}
    </nav>;
};

Secure OTV Initiate - US

This page documents the **Secure OTV** module, including its variants, capabilities, and the result values it returns.

<ModuleToc />

## Secure OTV: US Secure OTV Initiate

### Capabilities

The module returns the following capabilities.

#### OTV initiation status

OTV Initiation Status

| Code | Label | Description |
| - | - | - |
| `initiated` | Initiated | Transaction initiated successfully |

#### OTV SMS status

SMS delivery status from the Initiate step (present only when ExpectID attempted SMS delivery)

| Code | Label | Description |
| - | - | - |
| `SENT` | SMS Sent | SMS Sent |
| `FAILED` | SMS Failed | SMS Failed |
| `FAILED_OPT_OUT` | SMS Failed - Opt Out | SMS Failed - Opt Out |

### Default outcomes

The module is pre-configured with the following default outcomes, which can be used in evaluation and routing logic within the journey designer.

| Outcome | Condition | Description |
| - | - | - |
| `Success` | OTV Initiation Status isAnyOf `initiated` | The verification transaction was initiated successfully. |
| `Error` | Default (no conditions matched) | The verification transaction could not be initiated. |

### Input payload

The following is a sample payload used to submit data to the **US Secure OTV Initiate** module for processing.

```json JSON theme={null}
{
  "equalToFile": "us-secure-otv-initiate-error-data.json"
}
```

| Field | Required | Description |
| - | - | - |
| `MobilePhone` | Yes | The mobile phone number to send the verification SMS to. |

### Sample response

The following is a sample response returned by the module.

```json JSON theme={null}
{
  "response": {
    "advice": {},
    "status": "error",
    "outcome": "Error"
  }
}
```

## Secure OTV: US Secure OTV Status

Secure OTV Status - US

### Capabilities

The module returns the following capabilities.

#### OTV request status

OTV Transaction Request Status

| Code | Label | Description |
| - | - | - |
| `pending` | Pending | Transaction is in process |
| `passed` | Passed | Transaction passed verification |
| `failed` | Failed | Transaction failed verification |

#### OTV SMS status

SMS delivery status from the Status step (present when ExpectID reports SMS delivery state at time of status check)

| Code | Label | Description |
| - | - | - |
| `SENT` | SMS Sent | SMS Sent |
| `FAILED` | SMS Failed | SMS Failed |
| `FAILED_OPT_OUT` | SMS Failed - Opt Out | SMS Failed - Opt Out |

### Default outcomes

The module is pre-configured with the following default outcomes, which can be used in evaluation and routing logic within the journey designer.

| Outcome | Condition | Description |
| - | - | - |
| `Verified` | OTV Request Status isAnyOf `passed` | The subject passed verification. |
| `Not Verified` | OTV Request Status isAnyOf `failed` | The subject failed verification. |
| `Pending` | OTV Request Status isAnyOf `pending` | Verification is still in progress. Check the status again later. |
| `Error` | — | The status of the verification transaction could not be retrieved. |
| `Manual Review` | Default (no conditions matched) | No status condition matched, so the transaction is referred for manual review. |

### Input payload

The following is a sample payload used to submit data to the **US Secure OTV Status** module for processing.

```json JSON theme={null}
{
  "equalToFile": "us-secure-otv-status-error-data.json"
}
```

| Field | Required | Description |
| - | - | - |
| `PhoneVerification` | Yes | The reference for the verification transaction to check the status of. |

### Sample response

The following is a sample response returned by the module.

```json JSON theme={null}
{
  "response": {
    "advice": {},
    "status": "error",
    "outcome": "Error"
  }
}
```
