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

# Verification flow

> How to request an OTP, deliver it to the user, and verify the code.

The OTP workflow consists of two API requests:

1. **Request an OTP**
2. **Verify the OTP**

```text theme={null}
Application
      │
      │ 1. Send phone number
      ▼
 Beem OTP API
      │
      │ Validate number
      │
      │ Generate PIN + PIN ID
      ▼
Send OTP via SMS or Whatsapp
      │
      ▼
User receives OTP
      │
      │ Enters OTP
      ▼
Application
      │
      │ Send PIN + PIN ID
      ▼
 Beem OTP API
      │
      ▼
Verification Result
```

***

## Detailed flow

<Steps>
  <Step title="1. User enters their phone number">
    Your application collects the customer's mobile number.
  </Step>

  <Step title="2. Request an OTP">
    Your application sends the phone number to the Beem OTP API.

    Beem validates the phone number before generating an OTP.
  </Step>

  <Step title="3. Receive the PIN ID">
    If the request is successful, Beem:

    * Generates a secure OTP
    * Creates a unique **PIN ID**
    * Sends the OTP via SMS
    * Returns the **PIN ID** in the API response

    Save the PIN ID—it will be required during verification.
  </Step>

  <Step title="4. User receives the OTP">
    The customer's mobile network delivers the SMS containing the OTP.
  </Step>

  <Step title="5. Verify the OTP">
    The user enters the received OTP into your application.

    Your application submits:

    * PIN ID
    * OTP

    to the verification endpoint.
  </Step>

  <Step title="6. Receive the verification result">
    Beem verifies the OTP.

    If the OTP is valid and has not expired, the API returns a successful verification response.
  </Step>
</Steps>
