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

# Verify PIN

> Verify a subscriber's 4-digit PIN

<Info>
  Use this endpoint to verify a subscriber's PIN before processing sensitive operations.
</Info>

## Request

<ParamField header="Authorization" type="string" required>
  `Bearer olive_live_xxx` or `Bearer eyJ...` (JWT)
</ParamField>

### Path Parameters

<ParamField path="id" type="string" required>
  Subscriber UUID (e.g., `sub_abc123`)
</ParamField>

### Body Parameters

<ParamField body="pin" type="string" required>
  4-digit PIN to verify
</ParamField>

***

## Response

<ResponseField name="success" type="boolean">
  Whether PIN is valid
</ResponseField>

<ResponseField name="message" type="string">
  Result message
</ResponseField>

***

## Examples

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://demo.api.vultlocal.com/api/v1/subscribers/sub_abc123/verify-pin" \
    -H "Authorization: Bearer olive_live_xxx" \
    -H "Content-Type: application/json" \
    -d '{
      "pin": "1234"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Valid PIN theme={null}
  {
    "success": true,
    "message": "PIN verified successfully"
  }
  ```

  ```json 401 Invalid PIN theme={null}
  {
    "success": false,
    "message": "Invalid PIN",
    "attempts_remaining": 2
  }
  ```

  ```json 403 Account Locked theme={null}
  {
    "success": false,
    "message": "Account locked due to too many failed attempts",
    "locked_until": "2025-01-20T16:00:00Z"
  }
  ```
</ResponseExample>

***

## PIN Security

<CardGroup cols={2}>
  <Card title="Attempt Limits" icon="shield">
    * 3 failed attempts allowed
    * Account locked for 30 minutes
    * Counter resets on success
  </Card>

  <Card title="Audit Logging" icon="scroll">
    * All attempts logged
    * IP address recorded
    * Used for fraud detection
  </Card>
</CardGroup>

***

## Use Cases

| Use Case           | Description                     |
| ------------------ | ------------------------------- |
| **POS Payment**    | Verify before deducting funds   |
| **P2P Transfer**   | Confirm sender identity         |
| **Cash-Out**       | Authenticate withdrawal         |
| **Profile Change** | Verify before sensitive updates |

***

## Errors

| Status | Code                 | Description                |
| ------ | -------------------- | -------------------------- |
| 400    | `INVALID_PIN_FORMAT` | PIN must be 4 digits       |
| 401    | `UNAUTHORIZED`       | Invalid or missing API key |
| 401    | `INVALID_PIN`        | PIN does not match         |
| 403    | `ACCOUNT_LOCKED`     | Too many failed attempts   |
| 404    | `NOT_FOUND`          | Subscriber not found       |
| 500    | `INTERNAL_ERROR`     | Server error               |

***

## Related

<Card title="Change PIN" icon="key" href="/api-reference/subscribers/change-pin">
  Change subscriber's PIN to a new value
</Card>


## OpenAPI

````yaml olive-openapi.json POST /subscribers/{id}/verify-pin
openapi: 3.0.0
info:
  description: >-
    API Gateway for OLIVE NFC Card Payment System - Comprehensive payment, card
    management, agent operations, and admin authentication. All /api/v1 routes
    require authentication using either API Key or JWT token.
  title: OLIVE NFC Card Payment API
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    email: support@olive.sl
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://olive-gateway-a6ba.onrender.com/api/v1
security: []
paths:
  /subscribers/{id}/verify-pin:
    post:
      tags:
        - Subscribers
      summary: Verify subscriber PIN
      description: Verify a subscriber's PIN for authentication
      parameters:
        - description: Subscriber ID
          name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/handler.VerifyPINRequest'
        description: PIN to verify
        required: true
      responses:
        '200':
          description: PIN verification result
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    handler.VerifyPINRequest:
      type: object
      required:
        - pin
      properties:
        pin:
          type: string
          example: '1234'
  securitySchemes:
    ApiKeyAuth:
      description: >-
        API Key for third-party integrations (WhatsApp, Smart PAY, VULT).
        Format: 'Bearer olive_live_xxxxxxxxxxxxx'
      type: apiKey
      name: Authorization
      in: header
    BearerAuth:
      description: >-
        JWT token from admin login for administrative operations. Format:
        'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
      type: apiKey
      name: Authorization
      in: header

````