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

# Fund from VULT

> Top up OLIVE wallet from VULT wallet

<Info>
  Transfers funds from subscriber's VULT mobile money wallet to their OLIVE wallet.
</Info>

## Request

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

### Body Parameters

<ParamField body="subscriber_id" type="string" required>
  Subscriber UUID
</ParamField>

<ParamField body="vult_wallet_id" type="string" required>
  VULT wallet identifier
</ParamField>

<ParamField body="amount" type="string" required>
  Amount to transfer (e.g., `500.00`)
</ParamField>

<ParamField body="transaction_ref" type="string" required>
  VULT transaction reference for reconciliation
</ParamField>

<ParamField body="pin" type="string" required>
  Subscriber's OLIVE PIN
</ParamField>

***

## Response

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

<ResponseField name="transaction_id" type="string">
  OLIVE transaction ID
</ResponseField>

<ResponseField name="new_balance" type="string">
  Updated OLIVE wallet balance
</ResponseField>

***

## Examples

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://demo.api.vultlocal.com/api/v1/wallet/fund-from-vult" \
    -H "Authorization: Bearer olive_live_xxx" \
    -H "Content-Type: application/json" \
    -d '{
      "subscriber_id": "sub_abc123",
      "vult_wallet_id": "vult_xyz789",
      "amount": "500.00",
      "transaction_ref": "VULT-TXN-123456",
      "pin": "1234"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "success": true,
    "message": "Wallet funded successfully",
    "transaction_id": "txn_fund_abc123",
    "amount": "500.00 SLE",
    "new_balance": "1,500.00 SLE",
    "vult_ref": "VULT-TXN-123456"
  }
  ```

  ```json 400 VULT Error theme={null}
  {
    "success": false,
    "error": "VULT wallet has insufficient balance",
    "code": "VULT_INSUFFICIENT_FUNDS"
  }
  ```
</ResponseExample>

***

## Flow

<Steps>
  <Step title="Verify PIN">
    Authenticate subscriber with OLIVE PIN
  </Step>

  <Step title="Check VULT Wallet">
    Verify VULT wallet linked and has balance
  </Step>

  <Step title="Debit VULT">
    Deduct from VULT mobile money wallet
  </Step>

  <Step title="Credit OLIVE">
    Add to OLIVE wallet balance
  </Step>

  <Step title="Record">
    Log transaction with VULT reference
  </Step>
</Steps>

***

## Prerequisites

<CardGroup cols={2}>
  <Card title="VULT Linked" icon="link">
    Subscriber must have VULT wallet linked to profile
  </Card>

  <Card title="VULT Balance" icon="coins">
    Sufficient balance in VULT wallet
  </Card>
</CardGroup>

***

## Errors

| Status | Code                      | Description             |
| ------ | ------------------------- | ----------------------- |
| 400    | `INVALID_AMOUNT`          | Invalid amount format   |
| 400    | `INVALID_PIN`             | PIN verification failed |
| 400    | `VULT_NOT_LINKED`         | VULT wallet not linked  |
| 400    | `VULT_INSUFFICIENT_FUNDS` | VULT balance too low    |
| 401    | `UNAUTHORIZED`            | Invalid API key         |
| 404    | `SUBSCRIBER_NOT_FOUND`    | Subscriber not found    |
| 500    | `VULT_ERROR`              | VULT service error      |
| 500    | `INTERNAL_ERROR`          | Server error            |


## OpenAPI

````yaml olive-openapi.json POST /wallet/fund-from-vult
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:
  /wallet/fund-from-vult:
    post:
      tags:
        - Wallet
      summary: Fund OLIVE wallet from VULT
      description: Top-up OLIVE wallet from VULT wallet account
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/handler.FundFromVultRequest'
        description: Fund from VULT details
        required: true
      responses:
        '200':
          description: Wallet funded successfully
          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.FundFromVultRequest:
      type: object
      required:
        - amount
        - pin
        - subscriber_id
        - transaction_ref
        - vult_wallet_id
      properties:
        amount:
          description: Accepts decimal format like "500.00" or "500"
          type: string
          example: '500.00'
        pin:
          type: string
          example: '1234'
        subscriber_id:
          type: string
          example: subscriber-uuid
        transaction_ref:
          type: string
          example: VULT-TXN-123
        vult_wallet_id:
          type: string
          example: vult-wallet-123
  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

````