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

> Verify card status and retrieve partial subscriber info

<Info>
  Used before a payment to verify the card and fetch the holder name and current balance.
</Info>

## Request

<ParamField header="X-API-Key-ID" type="string" required>
  API key ID assigned to the integration
</ParamField>

<ParamField header="X-Timestamp" type="string" required>
  RFC3339 timestamp used in the HMAC signature
</ParamField>

<ParamField header="X-Signature" type="string" required>
  Hex-encoded HMAC-SHA256 of the request
</ParamField>

### Body Parameters

<ParamField body="card_serial" type="string" required>
  Card serial number
</ParamField>

<Info>
  PIN is not required on this route. The integrating partner's HMAC signature provides the security.
</Info>

***

## Response

<ResponseField name="success" type="boolean">
  Whether verification succeeded
</ResponseField>

<ResponseField name="message" type="string">
  Verification result message
</ResponseField>

<ResponseField name="is_active" type="boolean">
  Whether the card is active
</ResponseField>

<ResponseField name="balance" type="string">
  Formatted available balance
</ResponseField>

<ResponseField name="holder_name" type="string">
  Card holder display name
</ResponseField>

***

## Example

<RequestExample>
  ```bash cURL theme={null}
  BODY='{"card_serial":"OLIV0001"}'
  TIMESTAMP='2026-03-10T12:00:00Z'
  SIGNATURE=$(printf 'POST\n/api/v1/payment/verify-card\n%s\n%s' "$TIMESTAMP" "$BODY" | openssl dgst -sha256 -hmac "$OLIVE_HMAC_SECRET" -hex | sed 's/^.* //')

  curl -X POST "https://demo.api.vultlocal.com/api/v1/payment/verify-card" \
    -H "X-API-Key-ID: $OLIVE_API_KEY_ID" \
    -H "X-Timestamp: $TIMESTAMP" \
    -H "X-Signature: $SIGNATURE" \
    -H "Content-Type: application/json" \
    -d "$BODY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Valid theme={null}
  {
    "success": true,
    "message": "Card verified successfully",
    "is_active": true,
    "balance": "48,500.00 SLE",
    "holder_name": "John Doe"
  }
  ```

  ```json 400 Invalid theme={null}
  {
    "success": false,
    "error": "Invalid PIN"
  }
  ```
</ResponseExample>

***

## Errors

| Status | Code                         | Description                                                     |
| ------ | ---------------------------- | --------------------------------------------------------------- |
| 400    | Validation or business error | Invalid payload, unknown card, or blocked card                  |
| 401    | HMAC auth error              | Missing/invalid `X-API-Key-ID`, `X-Timestamp`, or `X-Signature` |
| 500    | Internal error               | Server error                                                    |


## OpenAPI

````yaml olive-openapi.json POST /payment/verify-card
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:
  /payment/verify-card:
    post:
      tags:
        - POS
      summary: Verify NFC card
      description: Verify card status and balance before payment
      requestBody:
        $ref: '#/components/requestBodies/handler.POSVerifyCardRequest'
      responses:
        '200':
          description: Card verified
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Card verification failed
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
components:
  requestBodies:
    handler.POSVerifyCardRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/handler.POSVerifyCardRequest'
      description: Card verification details
      required: true
  schemas:
    handler.POSVerifyCardRequest:
      type: object
      required:
        - card_serial
      properties:
        card_serial:
          description: 'Supports any alphanumeric: CARD0001, 48290173K, etc.'
          type: string
          example: CARD0001
        pin:
          description: >-
            Required for POS routes, optional for payment routes (HMAC provides
            security)
          type: string
          example: '1234'

````