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

# Topup Wallet

> Credit (TOPUP) or debit (REFUND) a user/team wallet. ``amount`` is in
stored units (USD * 10000).



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json post /api/admin/transactions/topup
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/admin/transactions/topup:
    post:
      tags:
        - admin-transactions
      summary: Topup Wallet
      description: |-
        Credit (TOPUP) or debit (REFUND) a user/team wallet. ``amount`` is in
        stored units (USD * 10000).
      operationId: topup_wallet_api_admin_transactions_topup_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminTopupRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponse_TopupResult_'
        '401':
          description: Authorization failed
        '403':
          description: Insufficient permissions
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    AdminTopupRequest:
      properties:
        userId:
          anyOf:
            - type: string
            - type: 'null'
          title: Userid
        teamId:
          anyOf:
            - type: string
            - type: 'null'
          title: Teamid
        amount:
          type: integer
          exclusiveMinimum: 0
          title: Amount
          description: Amount in stored units (USD * 10000).
        type:
          $ref: '#/components/schemas/ManualTransactionType'
          default: TOPUP
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
      type: object
      required:
        - amount
      title: AdminTopupRequest
      description: >-
        Manual admin credit (TOPUP) or debit (REFUND) of a user/team wallet.


        Exactly one of ``user_id`` / ``team_id`` identifies the wallet owner.

        ``amount`` is in stored integer units (USD * 10000), matching the
        platform.
    GenericResponse_TopupResult_:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/TopupResult'
            - type: 'null'
          description: Response data
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: Response status
      type: object
      title: GenericResponse[TopupResult]
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ErrorResponse
    ManualTransactionType:
      type: string
      enum:
        - TOPUP
        - REFUND
      title: ManualTransactionType
      description: >-
        Transaction types an admin may create manually. A narrower set than the

        full ``TransactionType`` (which also covers AUTOTOPUP/COUPON/INVOICE) so
        the

        top-up endpoint can't be used to mint mislabeled adjustments.
    TopupResult:
      properties:
        walletId:
          type: string
          title: Walletid
        balance:
          type: integer
          title: Balance
        amount:
          type: integer
          title: Amount
        type:
          type: string
          title: Type
      type: object
      required:
        - walletId
        - balance
        - amount
        - type
      title: TopupResult
    ErrorDetail:
      properties:
        param:
          type: string
          title: Param
        details:
          type: string
          title: Details
      type: object
      required:
        - param
        - details
      title: ErrorDetail
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````