> ## 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.

# Block Subscriber

> Block a subscriber account

<Warning>
  Blocking a subscriber prevents all transactions on their account and any linked cards.
</Warning>

## 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="reason" type="string" required>
  Reason for blocking the account. This is logged for audit.
</ParamField>

***

## Response

<ResponseField name="success" type="boolean">
  Whether block succeeded
</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/block" \
    -H "Authorization: Bearer olive_live_xxx" \
    -H "Content-Type: application/json" \
    -d '{
      "reason": "Suspicious activity detected - multiple failed PIN attempts"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "success": true,
    "message": "Subscriber blocked successfully",
    "blocked_at": "2025-01-20T14:45:00Z",
    "blocked_by": "admin@olive.sl"
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "error": "Subscriber not found",
    "code": "NOT_FOUND"
  }
  ```
</ResponseExample>

***

## What Gets Blocked

<CardGroup cols={2}>
  <Card title="Account Actions" icon="user-x">
    * All wallet transactions
    * P2P transfers
    * Cash-in/cash-out
    * PIN changes
  </Card>

  <Card title="Card Actions" icon="credit-card">
    * All linked cards blocked
    * POS payments rejected
    * NFC tap disabled
  </Card>
</CardGroup>

***

## Common Reasons

| Reason Type | Example                         |
| ----------- | ------------------------------- |
| Security    | "Multiple failed PIN attempts"  |
| Fraud       | "Suspected fraudulent activity" |
| KYC         | "KYC documents not verified"    |
| Compliance  | "AML screening flag"            |
| Request     | "Customer requested block"      |

***

## Errors

| Status | Code              | Description                |
| ------ | ----------------- | -------------------------- |
| 400    | `MISSING_REASON`  | Reason is required         |
| 401    | `UNAUTHORIZED`    | Invalid or missing API key |
| 403    | `FORBIDDEN`       | Insufficient permissions   |
| 404    | `NOT_FOUND`       | Subscriber not found       |
| 409    | `ALREADY_BLOCKED` | Subscriber already blocked |
| 500    | `INTERNAL_ERROR`  | Server error               |

***

## Related

<Card title="Unblock Subscriber" icon="check" href="/api-reference/subscribers/unblock">
  Restore access to a blocked subscriber account
</Card>


## OpenAPI

````yaml olive-openapi.json POST /subscribers/{id}/block
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}/block:
    post:
      tags:
        - Subscribers
      summary: Block a subscriber
      description: Block a subscriber account with a reason
      parameters:
        - description: Subscriber ID
          name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/handler.BlockSubscriberRequest'
        description: Block reason
        required: true
      responses:
        '200':
          description: Block successful
          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.BlockSubscriberRequest:
      type: object
      required:
        - reason
      properties:
        reason:
          type: string
          example: Suspicious activity detected
  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

````