> ## Documentation Index
> Fetch the complete documentation index at: https://omniflow-vpn.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Post v1accountwallettop up

> Opens a top-up order through the same order, webhook, and reconciliation pipeline a plan uses. The caller's key becomes the order's key, so a retried request credits the same top-up rather than a second one. The order and its payment are two steps: when the order exists but the provider refused the intent, the response is still `201` with the order and `paymentProblem` in place of `payment`, because the order is the customer's and can be paid from its own screen by any method that settles it.



## OpenAPI

````yaml https://raw.githubusercontent.com/kewldan/omniflow/main/api/openapi.yaml post /v1/account/wallet/top-up
openapi: 3.0.3
info:
  title: Omniflow API
  version: 1.0.0
  description: >-
    Customer, commerce, payment, wallet, fulfillment, and operations API for
    Omniflow.
servers: []
security: []
paths:
  /v1/account/wallet/top-up:
    post:
      tags:
        - account
      description: >-
        Opens a top-up order through the same order, webhook, and reconciliation
        pipeline a plan uses. The caller's key becomes the order's key, so a
        retried request credits the same top-up rather than a second one. The
        order and its payment are two steps: when the order exists but the
        provider refused the intent, the response is still `201` with the order
        and `paymentProblem` in place of `payment`, because the order is the
        customer's and can be paid from its own screen by any method that
        settles it.
      operationId: startAccountTopUp
      parameters:
        - $ref: '#/components/parameters/CSRFToken'
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - amountMinor
              properties:
                amountMinor:
                  type: integer
                  format: int64
                  minimum: 1
                currency:
                  type: string
                provider:
                  type: string
      responses:
        '201':
          description: Top-up opened
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountTopUpStarted'
        '422':
          $ref: '#/components/responses/Problem'
components:
  parameters:
    CSRFToken:
      in: header
      name: X-CSRF-Token
      required: true
      description: >-
        Echoes the token from the current session. Required on every unsafe
        method.
      schema:
        type: string
    IdempotencyKey:
      in: header
      name: Idempotency-Key
      required: true
      schema:
        type: string
        minLength: 8
        maxLength: 128
  schemas:
    AccountTopUpStarted:
      type: object
      required:
        - orderId
        - currency
        - amountMinor
        - state
      properties:
        orderId:
          type: string
          format: uuid
        currency:
          type: string
        amountMinor:
          type: integer
          format: int64
        state:
          type: string
        payment:
          $ref: '#/components/schemas/AccountPaymentHandle'
        paymentProblem:
          type: object
          description: >-
            Present instead of `payment` when the order was created but its
            payment could not be started.
          required:
            - code
            - detail
          properties:
            code:
              type: string
              enum:
                - provider_unavailable
                - provider_currency_unsupported
                - order_not_payable
                - payment_failed
            detail:
              type: string
    AccountPaymentHandle:
      type: object
      required:
        - id
        - provider
        - status
        - amountMinor
        - currency
        - handoff
      properties:
        id:
          type: string
          format: uuid
        provider:
          type: string
        status:
          type: string
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
        handoff:
          type: string
          enum:
            - hosted
            - telegram_invoice
            - manual
            - none
          description: >-
            How the customer completes the payment. `none` means nothing further
            is owed, which is what a wallet-covered order looks like.
        checkoutUrl:
          type: string
    Problem:
      type: object
      required:
        - type
        - title
        - status
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        request_id:
          type: string
  responses:
    Problem:
      description: Request failed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.