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

# Get all orders

> Returns all orders



## OpenAPI

````yaml get /order/all
openapi: 3.0.1
info:
  title: Mavapay API
  description: API documentation for Mavapay
  license:
    name: MIT
  version: 1.0.0
  contact:
    name: Mavapay
    url: https://mavapay.co
    email: info@mavapay.co
servers:
  - url: https://staging.api.mavapay.co/api/v1
    description: Staging server
  - url: https://api.mavapay.co/api/v1
    description: Live server
security:
  - ApiKeyAuth: []
    bearerAuth: []
tags:
  - name: Price
    description: Price related endpoints
  - name: Payment Link
    description: Payment Link endpoints for creating and managing hosted payment pages
paths:
  /order/all:
    get:
      tags:
        - Order
      summary: Get all orders
      description: Returns all orders
      operationId: getAllOrders
      responses:
        '200':
          description: Order response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    format: string
                    example: ok
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AllOrders'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
        - bearerAuth: []
components:
  schemas:
    AllOrders:
      type: object
      properties:
        orderId:
          type: string
          format: string
          example: 99854-2345
        quoteId:
          type: string
          format: string
          example: d1614a76-9c7f-4111-98a7-43199f307e5b
        status:
          type: string
          format: string
          enum:
            - PAID
            - PENDING
            - EXPIRED
            - FAILED
        currency:
          type: string
          format: string
          enum:
            - NGN
            - KES
        paymentMethod:
          type: string
          format: string
          enum:
            - LIGHTNING
            - ONCHAIN
            - USDT
        isValid:
          type: boolean
          format: boolean
          example: true
        amount:
          type: string
          format: string
          example: '1000.00'
        createdAt:
          type: string
          format: date-time
          example: '2021-07-01T12:00:00Z'
        updatedAt:
          type: string
          format: date-time
          example: '2021-07-01T12:00:00Z'
        quotes:
          type: array
          items:
            $ref: '#/components/schemas/Quote'
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/Transaction'
    Error:
      required:
        - error
        - message
      type: object
      properties:
        status:
          type: string
          format: string
          example: error
        message:
          type: string
    Quote:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: d1614a76-9c7f-4111-98a7-43199f307e5b
        exchangeRate:
          type: number
          format: number
          example: 103830225.71866913
          description: >-
            The exchange rate is the rate of 1 BTC to the targetCurrency. So if
            you generated a quote for NGN->BTC (targetCurrency is BTC), the rate
            will be 1 because the exchange rate of 1 BTC to BTC is 1. If it's a
            quote of BTC->NGN (targetCurrency is NGN), the rate will likely be
            103830225.71866913 i.e., 1 BTC to NGN
        usdToTargetCurrencyRate:
          type: number
          format: number
          example: 1500.65
          description: The USD to target currency rate for the quote
        sourceCurrency:
          type: string
          format: string
          enum:
            - BTCSAT
            - NGNKOBO
          description: The source currency for the quote
        targetCurrency:
          type: string
          format: string
          enum:
            - NGNKOBO
            - KESCENT
            - ZARCENT
            - GHSPESEWA
          description: The target currency for the quote
        transactionFeesInSourceCurrency:
          type: number
          format: number
          example: 13.23
          description: >-
            The transaction fees in the source currency in its lowest
            denomination
        transactionFeesInTargetCurrency:
          type: string
          format: string
          example: '3750.00'
          description: >-
            The transaction fees in the target currency in its lowest
            denomination
        amountInSourceCurrency:
          type: number
          format: number
          example: 1499
          description: The amount in the source currency in its lowest denomination
        amountInTargetCurrency:
          type: string
          format: string
          example: '50000.00'
          description: The amount in the target currency in its lowest denomination
        paymentMethod:
          type: string
          format: string
          enum:
            - LIGHTNING
        expiry:
          type: string
          format: date-time
          example: '2021-07-01T12:00:00Z'
        isValid:
          type: boolean
          format: boolean
          example: true
        invoice:
          type: string
          format: string
          example: >-
            lntbs36020n1pnehfzcpp5zc8g9tfpwnmaevh62ak2vu6zjqyt5cpph3gjm4zfyqz9srjjdsaqdz5296k7ar98gsy6ctkvys9qcteyqmnyenr8yunswfdvyer2v3dx33kxe3dvymnsefdv5mnjcm9x5mrydm9vccqcqzpuxqzfvsp5utd7hdfmjp7vw3lc6hal8psqruwcnu89hxfukyzugxh40jhv8xcq9qxpqysgq2lry5dgzu2g04s74tpvctwe37rkprs3k579jw6yt7ncrsg62p29yalw8gf5fawfvpydqv4jjve0nsysfhsxa35dtwug9e6gzxkq0h5gp636wc3
          description: The lightning invoice to pay for the quote
        hash:
          type: string
          format: string
          example: 189727ef2e0f35921af7858b96e27cbad960b0ec2bb2a4ab73b6a231f9ce8727
          description: The payment hash for the lightning invoice attached to the quote
        customerReference:
          type: string
          format: string
          example: order-1234567890
          description: Your unique identifier for the quote
        totalAmountInSourceCurrency:
          type: number
          format: number
          example: 1499
          description: The total amount in the source currency in its lowest denomination
        customerInternalFee:
          type: number
          format: number
          description: >-
            An internal fee you can set to charge the customer. This fee is in
            the source currency in its lowest denomination
          example: 0
        createdAt:
          type: string
          format: date-time
          example: '2021-07-01T12:00:00Z'
          description: The date and time the quote was created
        updatedAt:
          type: string
          format: date-time
          example: '2021-07-01T12:00:00Z'
          description: The date and time the quote was last updated
        bankName:
          type: string
          format: string
          example: WEMA BANK
          description: Bank name for NGN bank transfer (when paymentMethod is BANKTRANSFER)
        ngnBankAccountNumber:
          type: string
          format: string
          example: '7824655568'
          description: >-
            Bank account number for NGN payment (when paymentMethod is
            BANKTRANSFER)
        ngnAccountName:
          type: string
          format: string
          example: Mava Digital Solutions Limited
          description: Account name for NGN payment (when paymentMethod is BANKTRANSFER)
        ngnBankCode:
          type: string
          format: string
          example: '000027'
          description: NIP bank code for NGN payment (when paymentMethod is BANKTRANSFER)
        orderId:
          type: string
          format: string
          example: 43477-4306
          description: Unique order identifier for tracking
        estimatedRoutingFee:
          type: number
          format: number
          example: 0
          description: Estimated routing fee for Lightning Network payments in satoshis
    Transaction:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: d1614a76-9c7f-4111-98a7-43199f307e5b
          description: The unique identifier for the transaction
        walletId:
          type: string
          format: uuid
          example: d1614a76-9c7f-4111-98a7-43199f307e5b
          description: The unique identifier for the wallet
        ref:
          type: string
          format: string
          example: 99eeff854ffd345fffs67890
          description: The reference for the transaction
        hash:
          type: string
          format: string
          example: 189727ef2e0f35921af7858b96e27cbad960b0ec2bb2a4ab73b6a231f9ce8727
          description: >-
            The payment hash for the lightning invoice attached to the quote
            related to the transaction
        amount:
          type: number
          format: number
          example: 1000
          description: The amount of the transaction in its lowest denomination
        fees:
          type: number
          format: number
          example: 0
          description: The fees for the transaction in its lowest denomination
        currency:
          type: string
          format: string
          enum:
            - NGN
            - KES
            - BTC
            - ZAR
            - GHS
          description: The currency of the transaction
        type:
          type: string
          format: string
          enum:
            - WITHDRAWAL
            - DEPOSIT
          description: The type of the transaction
        status:
          type: string
          format: string
          enum:
            - SUCCESS
            - PENDING
            - FAILED
          description: The status of the transaction
        autopayout:
          type: boolean
          format: boolean
          example: true
          description: Whether the transaction is an instant payout
        createdAt:
          type: string
          format: date-time
          example: '2021-07-01T12:00:00Z'
          description: The date and time the transaction was created
        updatedAt:
          type: string
          format: date-time
          example: '2021-07-01T12:00:00Z'
          description: The date and time the transaction was last updated
        metadata:
          $ref: '#/components/schemas/TransactionMetadata'
    TransactionMetadata:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: d1614a76-9c7f-4111-98a7-43199f307e5b
        orderId:
          type: string
          format: string
          example: 99854-2345
        bankCode:
          type: string
          format: string
          example: '090267'
        bankAccountName:
          type: string
          format: string
          example: Satoshi Nakamoto
        bankAccountNumber:
          type: string
          format: string
          example: '0123456789'
        customerInternalFee:
          type: number
          format: number
          example: 0
        createdAt:
          type: string
          format: date-time
          example: '2021-07-01T12:00:00Z'
        updatedAt:
          type: string
          format: date-time
          example: '2021-07-01T12:00:00Z'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
    bearerAuth:
      type: http
      scheme: bearer

````