openapi: 3.1.0
info:
  title: Fonbnk On-ramp API
  description: |-
    API for requesting on-ramp quotes, limits and transactions
  termsOfService: https://fonbnk.com/terms-of-service
  contact:
    email: hello@fonbnk.com
  version: 1.0.0
externalDocs:
  description: Find out more about Fonbnk
  url: https://docs.fonbnk.com/docs/intro
servers:
  - url: https://aten.fonbnk-services.com
  - description: Production server
  - url: https://sandbox-api.fonbnk.com
    description: Development server
tags:
  - name: on-ramp
    description: On-ramp API
  - name: off-ramp
    description: Off-ramp API
paths:
  /api/pay-widget-merchant/order:
    get:
      tags:
        - on-ramp
      summary: Get order
      description: Returns a single pay widget order by its ID or orderParams query parameter.
      operationId: getOnrampOrderById
      security:
        - ClientIdHeader: []
        - TimestampHeader: []
        - SignatureHeader: []
      parameters:
        - name: orderId
          in: query
          description: id of the order which you could receive via a webhook or iframe events
          required: false
          schema:
            type: string
        - name: orderParams
          in: query
          required: false
          description: Value which you provided in the orderParams parameter of the pay widget URL
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnrampOrder'
              examples:
                example1:
                  $ref: '#/components/examples/OnrampOrderExample'
  /api/pay-widget-merchant/orders:
    get:
      tags:
        - on-ramp
      summary: Get orders
      description: Returns a paginated list of pay widget orders. Filters can be applied to the list by providing query parameters.
      operationId: getOnrampOrders
      security:
        - ClientIdHeader: []
        - TimestampHeader: []
        - SignatureHeader: []
      parameters:
        - name: cursor
          in: query
          description: this parameter should be provided in order to get a next page from the pagination, it should be taken from "nextCursor" response value
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: number from 1 to 100, describes how many records should be in each pagination page
          required: true
          schema:
            type: integer
        - name: walletType
          in: query
          description: wallet type of orders
          required: false
          schema:
            $ref: '#/components/schemas/OnrampNetwork'
        - name: walletAddress
          in: query
          required: false
          schema:
            type: string
        - name: userPhoneNumber
          in: query
          description: phone number of the client, should include country code
          required: false
          schema:
            type: string
        - name: swapProvider
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/OnRampProvider'
        - name: buySwapStatus
          in: query
          description: status of a buy swap
          required: false
          schema:
            $ref: '#/components/schemas/BuySwapStatus'
        - name: withdrawalStatus
          in: query
          description: status of a crypto transfer
          required: false
          schema:
            $ref: '#/components/schemas/WithdrawalStatus'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedOnrampOrders'
              examples:
                example1:
                  $ref: '#/components/examples/OnrampOrderPaginatedExample'
  /api/pay-widget-merchant/price:
    get:
      tags:
        - on-ramp
      summary: Get price
      description: Returns expected price in USDC, cUSD etc. for a given amount of mobile money and vice versa.
      operationId: getPrice
      security:
        - ClientIdHeader: []
        - TimestampHeader: []
        - SignatureHeader: []
      parameters:
        - name: network
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/OnrampNetwork'
        - name: asset
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/OnrampAsset'
        - name: currency
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/OnrampCurrency'
        - name: amount
          in: query
          required: true
          schema:
            type: number
        - name: country
          in: query
          required: true
          description: country ISO code, e.g. NG
          schema:
            type: string
        - name: provider
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/OnRampProvider'
        - name: carrierId
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnrampPriceResponse'
              examples:
                example1:
                  $ref: '#/components/examples/OnrampPriceResponseExample'
  /api/pay-widget-merchant/providers:
    get:
      tags:
        - on-ramp
      summary: Get providers
      description: Returns a list of providers. Optionally includes limitations data.
      operationId: getProviders
      security:
        - ClientIdHeader: []
        - TimestampHeader: []
        - SignatureHeader: []
      parameters:
        - name: includeLimits
          in: query
          description: Should limitations data be included in the response. Defaults to true. If limitations are not included the request will be much faster.
          required: false
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnrampProvidersListResponse'
              examples:
                example1:
                  $ref: '#/components/examples/OnrampProviderLimitsExample'
  /api/pay-widget-merchant/limits:
    get:
      tags:
        - on-ramp
      summary: Get limits
      description: Returns minimum and maximum amount of order in crypto and local currency and applied fees.
      operationId: getLimits
      security:
        - ClientIdHeader: []
        - TimestampHeader: []
        - SignatureHeader: []
      parameters:
        - name: network
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/OnrampNetwork'
        - name: asset
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/OnrampAsset'
        - name: country
          in: query
          required: true
          schema:
            type: string
        - name: provider
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/OnRampProvider'
        - name: carrierId
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnrampLimitsResponse'
              examples:
                example1:
                  $ref: '#/components/examples/OnrampLimitsResponseExample'
  /api/offramp/order/{id}:
    get:
      tags:
        - off-ramp
      summary: Get off-ramp order
      description: Returns a single order by its ID.
      operationId: getOfframpOrderById
      security:
        - ClientIdHeader: []
        - TimestampHeader: []
        - SignatureHeader: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OfframpOrder'
              examples:
                example1:
                  $ref: '#/components/examples/OfframpOrderExample'
  /api/offramp/orders:
    get:
      tags:
        - off-ramp
      summary: Get off-ramp orders
      description: Returns a paginated list of orders. Filters can be applied to the list by providing query parameters.
      operationId: getOfframpOrders
      security:
        - ClientIdHeader: []
        - TimestampHeader: []
        - SignatureHeader: []
      parameters:
        - name: cursor
          in: query
          description: this parameter should be provided in order to get a next page from the pagination, it should be taken from "nextCursor" response value
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: number from 1 to 100, describes how many records should be in each pagination page
          required: true
          schema:
            type: integer
        - name: paymentType
          in: query
          description: payment type of orders
          required: false
          schema:
            $ref: '#/components/schemas/OfframpPaymentType'
        - name: network
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/OfframpNetwork'
        - name: asset
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/OfframpAsset'
        - name: fromAddress
          in: query
          description: address of a user wallet
          required: false
          schema:
            type: string
        - name: userPhoneNumber
          in: query
          description: phone number of the client, should include country code
          required: false
          schema:
            type: string
        - name: hash
          in: query
          description: hash of the user transaction
          required: false
          schema:
            type: string
        - name: countryIsoCode
          in: query
          description: country ISO code, e.g. NG
          required: false
          schema:
            type: string
        - name: offrampType
          in: query
          description: type of the offramp
          required: false
          schema:
            $ref: '#/components/schemas/OfframpType'
        - name: orderParams
          in: query
          description: value of the orderParams query param during order creation
          required: false
          schema:
            type: string
        - name: status
          in: query
          description: status of the order
          required: false
          schema:
            $ref: '#/components/schemas/OfframpOrderStatus'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Paginated'
                  - type: object
                    properties:
                      list:
                        type: array
                        items:
                          $ref: '#/components/schemas/OfframpOrder'
              examples:
                example1:
                  $ref: '#/components/examples/OfframpOrdersExample'
  /api/offramp/best-offer:
    get:
      tags:
        - off-ramp
      summary: Get best offer
      description: Returns the best offer for the provided country, amount and off-ramp type.
      operationId: getBestOffer
      security:
        - ClientIdHeader: []
        - TimestampHeader: []
        - SignatureHeader: []
      parameters:
        - name: amount
          in: query
          description: Amount of usd user wants to pay or amount of local currency user wants to receive depending on the currency param value
          required: true
          schema:
            type: number
        - name: currency
          in: query
          description: Currency of the amount param
          required: true
          schema:
            $ref: '#/components/schemas/OfframpAmountCurrency'
        - name: country
          in: query
          description: country ISO code, for example KE for Kenya, NG for Nigeria
          required: true
          schema:
            type: string
        - name: type
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/OfframpType'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BestOfframpOfferResponse'
              examples:
                example1:
                  $ref: '#/components/examples/BestOfframpOfferResponseExample'
  /api/offramp/limits:
    get:
      tags:
        - off-ramp
      summary: Get off-ramp limits
      description: Returns minimum and maximum amount of order in USD and local currency with applied fees.
      operationId: getOfframpLimits
      security:
        - ClientIdHeader: [ ]
        - TimestampHeader: [ ]
        - SignatureHeader: [ ]
      parameters:
        - name: type
          in: query
          description: offramp type
          required: true
          schema:
              $ref: '#/components/schemas/OfframpType'
        - name: country
          in: query
          description: country ISO code
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OfframpLimitsResponse'
              examples:
                example1:
                  $ref: '#/components/examples/OfframpLimitsExample'
  /api/offramp/countries:
    get:
      tags:
        - off-ramp
      summary: Get supported countries
      description: Returns a list of supported countries and their offramp types
      operationId: getSupportedCountries
      security:
        - ClientIdHeader: [ ]
        - TimestampHeader: [ ]
        - SignatureHeader: [ ]
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OfframpSupportedCountry'
              examples:
                example1:
                  $ref: '#/components/examples/OfframpSupportedCountriesExample'
  /api/offramp/wallets:
    get:
      tags:
          - off-ramp
      summary: Get supported blockchain assets
      description: Returns a list of supported wallet networks and their assets for crypto wallet orders
      responses:
        '200':
          description: A list of supported wallet networks and their assets
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OfframpWallet'
              examples:
                OfframpWalletsExample:
                  $ref: '#/components/examples/OfframpWalletsExample'
  /api/offramp/validate-fields:
    post:
      tags:
        - off-ramp
      summary: Validate user required fields
      description: The get best offer endpoint returns the required fields that need to be provided by a user. This endpoint allows you to validate the fields provided by a user. Endpoint might return a list of user information that can help a user to verify the correctness of the provided information.
      operationId: validateUserRequiredFields
      security:
        - ClientIdHeader: [ ]
        - TimestampHeader: [ ]
        - SignatureHeader: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OfframpValidateFieldsRequest'
            examples:
              ValidateFieldsRequestExample:
                $ref: '#/components/examples/OfframpValidateFieldsRequestExample'
      responses:
        '200':
          description: Validation successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OfframpValidateFieldsResponse'
              examples:
                ValidateFieldsResponseExample:
                  $ref: '#/components/examples/OfframpValidateFieldsResponseExample'
  /api/offramp/create-order:
    post:
      tags:
        - off-ramp
      summary: Create order
      description: Creates an order for a provided user details.
      operationId: createOfframpOrder
      security:
        - ClientIdHeader: [ ]
        - TimestampHeader: [ ]
        - SignatureHeader: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderRequest'
            examples:
              CreateOrderRequestExample:
                $ref: '#/components/examples/CreateOrderRequestExample'
      responses:
        '200':
          description: Order created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OfframpOrder'
              examples:
                CreateOrderResponseExample:
                  $ref: '#/components/examples/OfframpOrderExample'
  /api/offramp/confirm-order:
    post:
      tags:
        - off-ramp
      summary: Confirm order
      description: Confirms an order by providing a transaction hash for crypto orders and order ID returned from the create order endpoint.
      operationId: confirmOfframpOrder
      security:
        - ClientIdHeader: [ ]
        - TimestampHeader: [ ]
        - SignatureHeader: [ ]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfirmOrderRequest'
            examples:
              ConfirmOrderRequestExample:
                $ref: '#/components/examples/ConfirmOrderRequestExample'
      responses:
        '200':
          description: Order confirmed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OfframpOrder'
              examples:
                OfframpOrderExample:
                  $ref: '#/components/examples/OfframpOrderExample'
components:
  securitySchemes:
    ClientIdHeader:
      type: apiKey
      in: header
      name: x-client-id
    TimestampHeader:
      type: apiKey
      in: header
      name: x-timestamp
    SignatureHeader:
      type: apiKey
      in: header
      name: x-signature

  schemas:
    OnrampNetwork:
      type: string
      enum:
        - POLYGON
        - ETHEREUM
        - STELLAR
        - AVALANCHE
        - SOLANA
        - ALGORAND
        - CELO
        - BASE
        - TON
        - LISK
    OnrampAsset:
      type: string
      enum:
        - USDC
        - USDC_E
        - USDT
        - CUSD
        - CKES
    BuySwapStatus:
      type: string
      enum:
        - initiated
        - expired
        - buyer_confirmed
        - seller_confirmation_pending
        - seller_confirmation_failed
        - seller_confirmed
        - seller_rejected
      description: |-
        - initiated: The buy swap has been initiated
        - expired: The buy swap has expired
        - buyer_confirmed: The buyer has confirmed the buy swap
        - seller_confirmation_pending: The agent is yet to confirm the buy swap
        - seller_confirmation_failed: The agent has failed to confirm the buy swap
        - seller_confirmed: The agent has confirmed the buy swap
        - seller_rejected: The agent has rejected the buy swap
    OnRampProvider:
      type: string
      enum:
        - bank_transfer
        - mobile_money
        - mpesa
        - carrier
    WithdrawalStatus:
      type: string
      enum:
        - pending
        - complete
        - failed
    OnrampOrder:
      type: object
      properties:
        _id:
          type: string
          description: Order ID
        walletType:
          $ref: '#/components/schemas/OnrampNetwork'
          description: Network type
        asset:
          $ref: '#/components/schemas/OnrampAsset'
          description: Asset type
        walletAddress:
          type: string
          description: User wallet address
        feePercent:
          type: number
          description: total fee percent (fonbnk fee + partner fee)
        fonbnkFeePercent:
          type: number
        partnerFeePercent:
          type: number
        gasUsdAmount:
          type: number
        merchantId:
          type: string
        createdAt:
          type: string
          format: date-time
        buySwap:
          type: object
          properties:
            _id:
              type: string
            buyerUserPhone:
              type: string
            sellerUserPhone:
              type: string
            amount:
              type: number
              description: Amount in cents
            airtimeAmount:
              type: number
            status:
              $ref: '#/components/schemas/BuySwapStatus'
            provider:
              $ref: '#/components/schemas/OnRampProvider'
            expiresAt:
              type: string
              format: date-time
            createdAt:
              type: string
              format: date-time
            buyerConfirmedAt:
              type: string
              format: date-time
            countryIsoCode:
              type: string
        withdrawal:
          type: object
          properties:
            _id:
              type: string
            status:
              $ref: '#/components/schemas/WithdrawalStatus'
            withdrawAmount:
              description: Amount in USD
              type: number
            withdrawCryptoAmount:
              description: Amount in crypto
              type: number
            transactionHash:
              type: string
        feeAmount:
          type: number
          description: Total fee amount in USD
        localCurrencyFeeAmount:
          type: number
          description: Total fee amount in local currency
        fonbnkFeeAmount:
          type: number
        localCurrencyFonbnkFeeAmount:
          type: number
        partnerFeeAmount:
          type: number
        localCurrencyPartnerFeeAmount:
          type: number
        networkFeeAmount:
          type: number
        localCurrencyNetworkFeeAmount:
          type: number
        resumeUrl:
          type: string
    Paginated:
      type: object
      properties:
        nextCursor:
          type: string
    PaginatedOnrampOrders:
      allOf:
        - $ref: '#/components/schemas/Paginated'
        - type: object
          properties:
            list:
              type: array
              items:
                $ref: '#/components/schemas/OnrampOrder'
    OnrampPriceResponse:
      type: object
      properties:
        quoteId:
          type: string
          description: Unique quote id
        cryptoTotalAmount:
          type: number
          description: Amount of crypto user should receive before fees
        cryptoWithdrawAmount:
          type: number
          description: Amount of crypto user should receive after fees
        cryptoFeeAmount:
          type: number
          description: Total fee amount (fonbnk fee + partner fee) in crypto
        cryptoGasAmount:
          type: number
          description: Network fee in crypto
        localCurrencyAmount:
          type: number
          description: Amount of local currency user should pay
        feePercent:
          type: number
          description: Total fee percent (fonbnk fee + partner fee)
        fonbnkFeePercent:
          type: number
        partnerFeePercent:
          type: number
        totalAmount:
          type: number
          description: Amount of funds user will receive before fees
        withdrawAmount:
          type: number
          description: Amount of funds user will receive after fees
        feeAmount:
          type: number
          description: Total fee amount (fonbnk fee + partner fee)
        localCurrencyFeeAmount:
          type: number
          description: Total fee amount in local currency (fonbnk fee + partner fee)
        fonbnkFeeAmount:
          type: number
        localCurrencyFonbnkFeeAmount:
          type: number
        partnerFeeAmount:
          type: number
        localCurrencyPartnerFeeAmount:
          type: number
        networkFeeAmount:
          type: number
        localCurrencyNetworkFeeAmount:
          type: number
        usdcTotalAmount:
          type: number
          description: Amount of usd user will receive before fees (deprecated)
        usdcWithdrawAmount:
          type: number
          description: Amount of usd user will receive after fees (deprecated)
        usdcFeeAmount:
          type: number
          description: Fonbnk service fee (deprecated)
        usdcGasAmount:
          type: number
          description: Network fee (deprecated)
    OnrampCurrency:
      type: string
      enum:
        - usdc
        - local
    OnrampProviderLimit:
      type: object
      properties:
        cryptoLimits:
          type: object
          properties:
            min:
              type: number
            max:
              type: number
        fees:
          type: object
          properties:
            feePercent:
              type: number
            fonbnkFeePercent:
              type: number
            partnerFeePercent:
              type: number
            gasAmount:
              type: number
            minFee:
              type: number
        localCurrency:
          type: object
          properties:
            type:
              type: string
              enum:
                - open_range
                - fixed_list
            max:
              type: number
            min:
              type: number
            step:
              type: number
            withCents:
              type: boolean
            values:
              type: array
              items:
                type: number
    OnrampProviderLimitations:
      type: object
      properties:
        AVALANCHE:
          $ref: '#/components/schemas/OnrampProviderLimit'
        CELO:
          $ref: '#/components/schemas/OnrampProviderLimit'
        POLYGON:
          $ref: '#/components/schemas/OnrampProviderLimit'
        STELLAR:
          $ref: '#/components/schemas/OnrampProviderLimit'
        SOLANA:
          $ref: '#/components/schemas/OnrampProviderLimit'
        BASE:
          $ref: '#/components/schemas/OnrampProviderLimit'
        TON:
          $ref: '#/components/schemas/OnrampProviderLimit'
    OnrampProvidersListResponse:
      type: array
      items:
        type: object
        properties:
          countryIsoCode:
            type: string
          currencyIsoCode:
            type: string
          providers:
            type: array
            items:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                requiresCarrier:
                  type: boolean
                limits:
                  $ref: '#/components/schemas/OnrampProviderLimitations'
                carriers:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      limits:
                        $ref: '#/components/schemas/OnrampProviderLimitations'
    OnrampLimitsResponse:
      type: object
      properties:
        cryptoLimits:
          type: object
          properties:
            min:
              type: number
            max:
              type: number
        localCurrencyLimits:
          oneOf:
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - open_range
                    - fixed_list
                min:
                  type: number
                max:
                  type: number
                step:
                  type: number
                withCents:
                  type: boolean
                values:
                  type: array
                  items:
                    type: number
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - fixed_list
                values:
                  type: array
                  items:
                    type: number
                withCents:
                  type: boolean
        fees:
          type: object
          properties:
            feePercent:
              type: number
            fonbnkFeePercent:
              type: number
            partnerFeePercent:
              type: number
            gasAmount:
              type: number
            minFee:
              type: number
    OfframpOrderStatus:
      type: string
      enum:
        - initiated
        - awaiting_transaction_confirmation
        - transaction_confirmed
        - transaction_failed
        - offramp_success
        - offramp_pending
        - offramp_failed
        - offramp_retry
        - refunding
        - refunded
        - refund_failed
        - expired
      description: |-
        - initiated: The offramp order has been initiated
        - awaiting_transaction_confirmation: User sent the transaction hash and system is awaiting confirmation
        - transaction_confirmed: User transaction has been confirmed
        - transaction_failed: User transaction has failed
        - offramp_success: The offramp transaction has been successful
        - offramp_pending: The offramp transaction is pending
        - offramp_failed: The offramp transaction has failed
        - offramp_retry: The offramp transaction is being retried
        - refunding: The offramp transaction is being refunded
        - refunded: The offramp transaction has been refunded
        - refund_failed: The offramp transaction refund has failed
        - expired: The offramp order has expired
    OfframpNetwork:
      type: string
      enum:
        - AVALANCHE
        - POLYGON
        - CELO
        - ETHEREUM
    OfframpAsset:
      type: string
      enum:
        - USDC
        - USDT
        - CUSD
    OfframpType:
      type: string
      enum:
        - bank
        - airtime
        - mobile_money
        - paybill
    OfframpPaymentType:
      type: string
      enum:
        - CRYPTO_WALLET
        - VIRTUAL_WALLET
      description: |-
        - CRYPTO_WALLET: User will pay with a crypto wallet
        - VIRTUAL_WALLET: Order will be paid from a merchant's virtual wallet
    OfframpOrder:
      type: object
      properties:
        _id:
          type: string
        offerId:
          type: string
        paymentType:
          $ref: '#/components/schemas/OfframpPaymentType'
        network:
          $ref: '#/components/schemas/OfframpNetwork'
        asset:
          $ref: '#/components/schemas/OfframpAsset'
        exchangeRate:
          type: number
        cashout:
          type: object
          properties:
            localCurrencyAmount:
              type: number
            usdAmount:
              type: number
            feeAmountUsd:
              type: number
            feeAmountUsdFonbnk:
              type: number
            feeAmountUsdPartner:
              type: number
            feeAmountLocalCurrency:
              type: number
            feeAmountLocalCurrencyFonbnk:
              type: number
            feeAmountLocalCurrencyPartner:
              type: number
        fromAddress:
          type: string
        toAddress:
          type: string
        status:
          $ref: '#/components/schemas/OfframpOrderStatus'
        createdAt:
          type: string
          format: date-time
        expiresAt:
          type: string
          format: date-time
        hash:
          type: string
        statusHistory:
          type: array
          items:
            type: object
            properties:
              status:
                $ref: '#/components/schemas/OfframpOrderStatus'
              changedAt:
                type: string
                format: date-time
        requiredFields:
          type: object
          description: Fields that was required to be filled by the user
        countryIsoCode:
          type: string
        currencyIsoCode:
          type: string
        offerRequiredFields:
          type: array
          items:
            type: object
            properties:
              label:
                type: string
              type:
                type: string
              value:
                type: string
        orderParams:
          type: string
    RequiredFieldType:
      type: string
      enum:
        - number
        - string
        - date
        - boolean
        - email
        - enum
    BestOfframpOfferResponse:
      type: object
      properties:
        offer:
          type: object
          properties:
            _id:
              type: string
            countryIsoCode:
              type: string
            currencyIsoCode:
              type: string
            exchangeRate:
              type: number
            requiredFields:
              type: object
              properties:
                fieldName:
                  type: object
                  properties:
                    type:
                      ref: '#/components/schemas/RequiredFieldType'
                    label:
                      type: string
                    required:
                      type: boolean
                    options:
                      type: array
                      items:
                        type: object
                        properties:
                          value:
                            type: string
                          label:
                            type: string
            type:
              $ref: '#/components/schemas/OfframpType'
        cashout:
          type: object
          properties:
            localCurrencyAmount:
              type: number
            usdAmount:
              type: number
            feeAmountUsd:
              type: number
            feeAmountUsdFonbnk:
              type: number
            feeAmountUsdPartner:
              type: number
            feeAmountLocalCurrency:
              type: number
            feeAmountLocalCurrencyFonbnk:
              type: number
            feeAmountLocalCurrencyPartner:
              type: number
    OfframpAmountCurrency:
      type: string
      enum:
        - local
        - usd
    OfframpLimitsResponse:
      type: object
      properties:
        minUsd:
          type: number
        maxUsd:
          type: number
        minLocalCurrency:
          type: number
        maxLocalCurrency:
          type: number
    OfframpSupportedCountry:
      type: object
      properties:
        countryIsoCode:
          type: string
        currencyIsoCode:
          type: string
        name:
          type: string
        offrampTypes:
          type: array
          items:
            type: object
            properties:
              type:
                $ref: '#/components/schemas/OfframpType'
              name:
                type: string
              carriers:
                type: array
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
    OfframpWallet:
      type: object
      properties:
        network:
          $ref: '#/components/schemas/OfframpNetwork'
        asset:
          $ref: '#/components/schemas/OfframpAsset'
    OfframpValidateFieldsRequest:
      type: object
      properties:
        offerId:
          type: string
          description: ID of the offer returned from get best offer endpoint
        requiredFields:
          type: object
          additionalProperties:
            type: string
          description: Object with user required fields
      required:
        - offerId
        - requiredFields

    OfframpValidateFieldsResponse:
      type: object
      properties:
        details:
          type: array
          items:
            type: object
            properties:
              label:
                type: string
              value:
                type: string
    CreateOrderRequest:
      type: object
      properties:
        offerId:
          type: string
          description: ID of the offer returned from get best offer endpoint
        requiredFields:
          type: object
          additionalProperties:
            type: string
          description: Object with user required fields
        paymentType:
          $ref: '#/components/schemas/OfframpPaymentType'
        network:
          $ref: '#/components/schemas/OfframpNetwork'
        asset:
          $ref: '#/components/schemas/OfframpAsset'
        address:
          type: string
          description: Address of the wallet from which funds will be sent
        currency:
          $ref: '#/components/schemas/OfframpAmountCurrency'
        amount:
          type: number
          description: Amount of usd user wants to pay or amount of local currency user wants to receive depending on the currency param value
        ip:
          type: string
          description: IP address of a user
        orderParams:
          type: string
          description: OrderParams that need to be associated with an order
      required:
        - offerId
        - requiredFields
        - paymentType
        - network
        - asset
        - address
        - currency
        - amount
    ConfirmOrderRequest:
      type: object
      properties:
        orderId:
          type: string
          description: ID of the order returned from create order endpoint
        hash:
          type: string
          description: Transaction hash for crypto orders
      required:
        - orderId
        - hash
  examples:
    OnrampOrderExample:
      value:
        _id: 651e764399a4b360c7eb0178
        walletType: SOLANA
        asset: USDC
        walletAddress: 53L9ahwHcNnD4F11TqNHQgVUa75WgaCL2WGeiKiK2gCc
        feePercent: 2.5
        fonbnkFeePercent: 1.5
        partnerFeePercent: 1
        gasUsdAmount: 0
        merchantId: 645a20cbaf1d31dbd52c0fda
        createdAt: '2023-10-05T08:39:31.691Z'
        buySwap:
          _id: 651e764399a4b360c7eb016d
          buyerUserPhone: '380962669394'
          sellerUserPhone: '380960000000'
          amount: 210
          airtimeAmount: 2100
          status: seller_confirmed
          provider: bank_transfer
          expiresAt: '2023-10-05T09:39:31.492Z'
          createdAt: '2023-10-05T08:39:31.500Z'
          buyerConfirmedAt: '2023-10-05T08:39:37.027Z'
          countryIsoCode: NG
        withdrawal:
          _id: 651e7653db37ee6b74883fe1
          status: complete
          withdrawAmount: 2
          withdrawCryptoAmount: 2
          transactionHash: F19TfyGxBgebZt4q8h5bgf9Luabpypm3zSSzWR5ZUp8CKGNvL2r58zqGvWXvKftppiWKszV11jNQtsMUoFppmyb
        feeAmount: 0.05
        localCurrencyFeeAmount: 50
        fonbnkFeeAmount: 0.03
        localCurrencyFonbnkFeeAmount: 30
        partnerFeeAmount: 0.02
        localCurrencyPartnerFeeAmount: 20
        networkFeeAmount: 0
        localCurrencyNetworkFeeAmount: 0
        resumeUrl: https://pay.fonbnk.com/swap-status?orderId=651e764399a4b360c7eb0178
    OnrampOrderPaginatedExample:
      value:
        nextCursor: 651e764399a4b360c7eb0178
        list:
          - _id: 651e764399a4b360c7eb0178
            walletType: SOLANA
            asset: USDC
            walletAddress: 53L9ahwHcNnD4F11TqNHQgVUa75WgaCL2WGeiKiK2gCc
            feePercent: 2.5
            fonbnkFeePercent: 1.5
            partnerFeePercent: 1
            gasUsdAmount: 0
            merchantId: 645a20cbaf1d31dbd52c0fda
            createdAt: '2023-10-05T08:39:31.691Z'
            buySwap:
              _id: 651e764399a4b360c7eb016d
              buyerUserPhone: '380962669394'
              sellerUserPhone: '380960000000'
              amount: 210
              airtimeAmount: 2100
              status: seller_confirmed
              provider: bank_transfer
              expiresAt: '2023-10-05T09:39:31.492Z'
              createdAt: '2023-10-05T08:39:31.500Z'
              buyerConfirmedAt: '2023-10-05T08:39:37.027Z'
              countryIsoCode: NG
            withdrawal:
              _id: 651e7653db37ee6b74883fe1
              status: complete
              withdrawAmount: 2
              withdrawCryptoAmount: 2
              transactionHash: F19TfyGxBgebZt4q8h5bgf9Luabpypm3zSSzWR5ZUp8CKGNvL2r58zqGvWXvKftppiWKszV11jNQtsMUoFppmyb
            feeAmount: 0.05
            localCurrencyFeeAmount: 50
            fonbnkFeeAmount: 0.03
            localCurrencyFonbnkFeeAmount: 30
            partnerFeeAmount: 0.02
            localCurrencyPartnerFeeAmount: 20
            networkFeeAmount: 0
            localCurrencyNetworkFeeAmount: 0
            resumeUrl: https://pay.fonbnk.com/swap-status?orderId=651e764399a4b360c7eb0178
    OnrampPriceResponseExample:
      value:
        quoteId: 651e764399a4b360c7eb0178
        cryptoTotalAmount: 5.12
        cryptoWithdrawAmount: 5
        cryptoFeeAmount: 0.12
        cryptoGasAmount: 0
        localCurrencyAmount: 5120
        feePercent: 2.5
        fonbnkFeePercent: 1.5
        partnerFeePercent: 1
        totalAmount: 5.12
        withdrawAmount: 5
        feeAmount: 0.12
        localCurrencyFeeAmount: 120
        fonbnkFeeAmount: 0.07
        localCurrencyFonbnkFeeAmount: 70
        partnerFeeAmount: 0.05
        localCurrencyPartnerFeeAmount: 50
        networkFeeAmount: 0
        localCurrencyNetworkFeeAmount: 0
        usdcTotalAmount: 5.12
        usdcWithdrawAmount: 5
        usdcFeeAmount: 0.12
        usdcGasAmount: 0
    OnrampProviderLimitsExample:
      value:
        - countryIsoCode: NG
          currencyIsoCode: NGN
          providers:
            - name: bank_transfer
              description: Bank transfer
              requiresCarrier: false
              carriers: []
              limits:
                POLYGON:
                  cryptoLimits:
                    min: 1
                    max: 200
                  localCurrencyLimits:
                    type: open_range
                    min: 1714
                    max: 348047
                    step: 1
                    withCents: false
                  fees:
                    feePercent: 2.5
                    fonbnkFeePercent: 2.5
                    partnerFeePercent: 0
                    gasAmount: 0
                    minFee: 0.01
                STELLAR:
                  cryptoLimits:
                    min: 1
                    max: 200
                  localCurrencyLimits:
                    type: open_range
                    min: 1730
                    max: 348064
                    step: 1
                    withCents: false
                  fees:
                    feePercent: 2.5
                    fonbnkFeePercent: 2.5
                    partnerFeePercent: 0
                    gasAmount: 0.01
                    minFee: 0.01
                AVALANCHE:
                  cryptoLimits:
                    min: 1
                    max: 200
                  localCurrencyLimits:
                    type: open_range
                    min: 1797
                    max: 348132
                    step: 1
                    withCents: false
                  fees:
                    feePercent: 2.5
                    fonbnkFeePercent: 2.5
                    partnerFeePercent: 0
                    gasAmount: 0.05
                    minFee: 0.01
                SOLANA:
                  cryptoLimits:
                    min: 1
                    max: 200
                  localCurrencyLimits:
                    type: open_range
                    min: 1714
                    max: 348047
                    step: 1
                    withCents: false
                  fees:
                    feePercent: 2.5
                    fonbnkFeePercent: 2.5
                    partnerFeePercent: 0
                    gasAmount: 0
                    minFee: 0.01
                BASE:
                  cryptoLimits:
                    min: 1
                    max: 200
                  localCurrencyLimits:
                    type: open_range
                    min: 1714
                    max: 348047
                    step: 1
                    withCents: false
                  fees:
                    feePercent: 2.5
                    fonbnkFeePercent: 2.5
                    partnerFeePercent: 0
                    gasAmount: 0
                    minFee: 0.01
                TON:
                  cryptoLimits:
                    min: 1
                    max: 200
                  localCurrencyLimits:
                    type: open_range
                    min: 1747
                    max: 348081
                    step: 1
                    withCents: false
                  fees:
                    feePercent: 2.5
                    fonbnkFeePercent: 2.5
                    partnerFeePercent: 0
                    gasAmount: 0.02
                    minFee: 0.01
                CELO:
                  cryptoLimits:
                    min: 1
                    max: 200
                  localCurrencyLimits:
                    type: open_range
                    min: 1714
                    max: 348047
                    step: 1
                    withCents: false
                  fees:
                    feePercent: 2.5
                    fonbnkFeePercent: 2.5
                    partnerFeePercent: 0
                    gasAmount: 0
                    minFee: 0.01
        - countryIsoCode: KE
          currencyIsoCode: KES
          providers:
            - name: carrier
              description: Airtime
              requiresCarrier: true
              carriers:
                - id: 618e43914f57e07d255ff353
                  name: Safaricom Kenya
                  limits:
                    POLYGON:
                      cryptoLimits:
                        min: 1
                        max: 1.47
                      localCurrencyLimits:
                        type: open_range
                        min: 157
                        max: 230
                        step: 1
                        withCents: false
                      fees:
                        feePercent: 2.5
                        fonbnkFeePercent: 2.5
                        partnerFeePercent: 0
                        gasAmount: 0
                        minFee: 0.01
                    STELLAR:
                      cryptoLimits:
                        min: 1
                        max: 1.46
                      localCurrencyLimits:
                        type: open_range
                        min: 158
                        max: 230
                        step: 1
                        withCents: false
                      fees:
                        feePercent: 2.5
                        fonbnkFeePercent: 2.5
                        partnerFeePercent: 0
                        gasAmount: 0.01
                        minFee: 0.01
                    AVALANCHE:
                      cryptoLimits:
                        min: 1
                        max: 1.42
                      localCurrencyLimits:
                        type: open_range
                        min: 164
                        max: 230
                        step: 1
                        withCents: false
                      fees:
                        feePercent: 2.5
                        fonbnkFeePercent: 2.5
                        partnerFeePercent: 0
                        gasAmount: 0.05
                        minFee: 0.01
                    SOLANA:
                      cryptoLimits:
                        min: 1
                        max: 1.47
                      localCurrencyLimits:
                        type: open_range
                        min: 157
                        max: 230
                        step: 1
                        withCents: false
                      fees:
                        feePercent: 2.5
                        fonbnkFeePercent: 2.5
                        partnerFeePercent: 0
                        gasAmount: 0
                        minFee: 0.01
                    CELO:
                      cryptoLimits:
                        min: 1
                        max: 1.47
                      localCurrencyLimits:
                        type: open_range
                        min: 157
                        max: 230
                        step: 1
                        withCents: false
                      fees:
                        feePercent: 2.5
                        fonbnkFeePercent: 2.5
                        partnerFeePercent: 0
                        gasAmount: 0
                        minFee: 0.01
                    BASE:
                      cryptoLimits:
                        min: 1
                        max: 1.47
                      localCurrencyLimits:
                        type: open_range
                        min: 157
                        max: 230
                        step: 1
                        withCents: false
                      fees:
                        feePercent: 2.5
                        fonbnkFeePercent: 2.5
                        partnerFeePercent: 0
                        gasAmount: 0
                        minFee: 0.01
                    TON:
                      cryptoLimits:
                        min: 1
                        max: 1.45
                      localCurrencyLimits:
                        type: open_range
                        min: 160
                        max: 230
                        step: 1
                        withCents: false
                      fees:
                        feePercent: 2.5
                        fonbnkFeePercent: 2.5
                        partnerFeePercent: 0
                        gasAmount: 0.02
                        minFee: 0.01
            - name: mpesa
              description: M-PESA
              requiresCarrier: true
              carriers:
                - id: 618e43914f57e07d255ff353
                  name: Safaricom Kenya
                  limits:
                    POLYGON:
                      cryptoLimits:
                        min: 1
                        max: 200
                      localCurrencyLimits:
                        type: open_range
                        min: 153
                        max: 30506
                        step: 1
                        withCents: false
                      fees:
                        feePercent: 2.5
                        fonbnkFeePercent: 2.5
                        partnerFeePercent: 0
                        gasAmount: 0
                        minFee: 0.01
                    AVALANCHE:
                      cryptoLimits:
                        min: 1
                        max: 200
                      localCurrencyLimits:
                        type: open_range
                        min: 161
                        max: 30513
                        step: 1
                        withCents: false
                      fees:
                        feePercent: 2.5
                        fonbnkFeePercent: 2.5
                        partnerFeePercent: 0
                        gasAmount: 0.05
                        minFee: 0.01
                    STELLAR:
                      cryptoLimits:
                        min: 1
                        max: 200
                      localCurrencyLimits:
                        type: open_range
                        min: 155
                        max: 30508
                        step: 1
                        withCents: false
                      fees:
                        feePercent: 2.5
                        fonbnkFeePercent: 2.5
                        partnerFeePercent: 0
                        gasAmount: 0.01
                        minFee: 0.01
                    SOLANA:
                      cryptoLimits:
                        min: 1
                        max: 200
                      localCurrencyLimits:
                        type: open_range
                        min: 153
                        max: 30506
                        step: 1
                        withCents: false
                      fees:
                        feePercent: 2.5
                        fonbnkFeePercent: 2.5
                        partnerFeePercent: 0
                        gasAmount: 0
                        minFee: 0.01
                    CELO:
                      cryptoLimits:
                        min: 1
                        max: 200
                      localCurrencyLimits:
                        type: open_range
                        min: 153
                        max: 30506
                        step: 1
                        withCents: false
                      fees:
                        feePercent: 2.5
                        fonbnkFeePercent: 2.5
                        partnerFeePercent: 0
                        gasAmount: 0
                        minFee: 0.01
                    BASE:
                      cryptoLimits:
                        min: 1
                        max: 200
                      localCurrencyLimits:
                        type: open_range
                        min: 153
                        max: 30506
                        step: 1
                        withCents: false
                      fees:
                        feePercent: 2.5
                        fonbnkFeePercent: 2.5
                        partnerFeePercent: 0
                        gasAmount: 0
                        minFee: 0.01
                    TON:
                      cryptoLimits:
                        min: 1
                        max: 200
                      localCurrencyLimits:
                        type: open_range
                        min: 156
                        max: 30509
                        step: 1
                        withCents: false
                      fees:
                        feePercent: 2.5
                        fonbnkFeePercent: 2.5
                        partnerFeePercent: 0
                        gasAmount: 0.02
                        minFee: 0.01
    OnrampLimitsResponseExample:
      value:
        cryptoLimits:
          min: 1
          max: 200
        localCurrencyLimits:
          type: open_range
          min: 1702
          max: 343959
          step: 1
          withCents: false
        fees:
          feePercent: 2.5
          fonbnkFeePercent: 2.5
          partnerFeePercent: 0
          gasAmount: 0
          minFee: 0.01
    OfframpOrderExample:
      value:
        _id: '6603f8fc1c3f3f94d6b30818'
        offerId: '65b8c6b8b188250081f30165'
        paymentType: 'CRYPTO_WALLET'
        network: 'CELO'
        asset: 'CUSD'
        exchangeRate: 1268.6275
        cashout:
          localCurrencyAmount: 1294
          usdAmount: 1.02
          feeAmountUsd: 0.02
          feeAmountUsdFonbnk: 0.02
          feeAmountUsdPartner: 0
          feeAmountLocalCurrency: 26
          feeAmountLocalCurrencyFonbnk: 26
          feeAmountLocalCurrencyPartner: 0
        fromAddress: '0x5b7ae3c6c87F4A3F94b35c77233b13191eBFAD20'
        toAddress: '0xe9bBDDCF0E8fcD41Bd1345aa5688B565931B0184'
        status: 'offramp_success'
        createdAt: '2024-03-27T10:46:20.513Z'
        expiresAt: '2024-03-27T11:46:20.509Z'
        hash: '0xbda5dd11b17d65249238137f5d542320b66141ac96be3b750804354a6eadfb04'
        statusHistory:
          - status: 'initiated'
            changedAt: '2024-03-27T10:46:20.522Z'
          - status: 'awaiting_transaction_confirmation'
            changedAt: '2024-03-27T10:46:31.007Z'
          - status: 'transaction_confirmed'
            changedAt: '2024-03-27T10:46:43.357Z'
          - status: 'offramp_pending'
            changedAt: '2024-03-27T10:46:44.568Z'
          - status: 'offramp_success'
            changedAt: '2024-03-27T10:50:02.649Z'
        requiredFields:
          bankCode: '011:02'
          buyerBankAccountNumber: '3159586782'
          phoneNumber: '2347000000007'
        countryIsoCode: 'NG'
        currencyIsoCode: 'NGN'
        offerRequiredFields:
          - label: 'Phone number'
            type: 'phone'
            value: '2347000000007'
          - label: 'Bank name'
            type: 'enum'
            value: 'First Bank of Nigeria'
          - label: 'Bank account Number'
            type: 'string'
            value: '3179586682'
        orderParams: '43'
    OfframpOrdersExample:
      value:
        list:
          - _id: '6603f8fc1c3f3f94d6b30818'
            offerId: '65b8c6b8b188250081f30165'
            network: 'CELO'
            asset: 'CUSD'
            paymentType: 'CRYPTO_WALLET'
            exchangeRate: 1268.6275
            cashout:
              localCurrencyAmount: 1294
              usdAmount: 1.02
              feeAmountUsd: 0.02
              feeAmountUsdFonbnk: 0.02
              feeAmountUsdPartner: 0
              feeAmountLocalCurrency: 26
              feeAmountLocalCurrencyFonbnk: 26
              feeAmountLocalCurrencyPartner: 0
            fromAddress: '0x5b7ae3c6c87F4A3F94b35c77233b13191eBFAD20'
            toAddress: '0xe9bBDDCF0E8fcD41Bd1345aa5688B565931B0184'
            status: 'offramp_success'
            createdAt: '2024-03-27T10:46:20.513Z'
            expiresAt: '2024-03-27T11:46:20.509Z'
            hash: '0xbda5dd11b17d65249238137f5d542320b66141ac96be3b750804354a6eadfb04'
            statusHistory:
              - status: 'initiated'
                changedAt: '2024-03-27T10:46:20.509Z'
              - status: 'initiated'
                changedAt: '2024-03-27T10:46:20.522Z'
              - status: 'awaiting_transaction_confirmation'
                changedAt: '2024-03-27T10:46:31.007Z'
              - status: 'transaction_confirmed'
                changedAt: '2024-03-27T10:46:43.357Z'
              - status: 'offramp_pending'
                changedAt: '2024-03-27T10:46:44.568Z'
              - status: 'offramp_success'
                changedAt: '2024-03-27T10:50:02.649Z'
            requiredFields:
              bankCode: '011:02'
              buyerBankAccountNumber: '3159586782'
              phoneNumber: '2347000000007'
            countryIsoCode: 'NG'
            currencyIsoCode: 'NGN'
            offerRequiredFields:
              - label: 'Phone number'
                type: 'phone'
                value: '2347000000007'
              - label: 'Bank name'
                type: 'enum'
                value: 'First Bank of Nigeria'
              - label: 'Bank account Number'
                type: 'string'
                value: '3179586682'
            orderParams: '43'
        nextCursor: '646c7e3ce2597a00921e2c53'
    BestOfframpOfferResponseExample:
      value:
        offer:
          _id: '65b8c6b8b188250081f30165'
          countryIsoCode: 'NG'
          currencyIsoCode: 'NGN'
          exchangeRate: 1260.2
          requiredFields:
            phoneNumber:
              type: 'phone'
              label: 'Phone number'
              required: true
            bankCode:
              required: true
              type: 'enum'
              label: 'Bank name'
              options:
                - value: '120001:02'
                  label: '9Payment Service Bank'
                - value: '801:02'
                  label: 'Abbey Mortgage Bank'
            buyerBankAccountNumber:
              type: 'string'
              label: 'Bank account Number'
              required: true
          type: 'bank'
        cashout:
          localCurrencyAmount: 6301
          usdAmount: 5
          feeAmountUsd: 0.12
          feeAmountUsdFonbnk: 0.12
          feeAmountUsdPartner: 0
          feeAmountLocalCurrency: 155
          feeAmountLocalCurrencyFonbnk: 155
          feeAmountLocalCurrencyPartner: 0
    OfframpLimitsExample:
      value:
        minUsd: 1.02
        maxUsd: 100
        minLocalCurrency: 1292
        maxLocalCurrency: 125921
    OfframpSupportedCountriesExample:
      value:
        - countryIsoCode: NG
          currencyIsoCode: NGN
          name: Nigeria
          offrampTypes:
            - type: bank
              name: Bank
            - type: airtime
              name: Airtime
        - countryIsoCode: KE
          currencyIsoCode: KES
          name: Kenya
          offrampTypes:
            - type: mobile_money
              name: M-PESA
              carriers:
                - id: 618e43914f57e07d255ff353
                  name: Safaricom Kenya
            - type: airtime
              name: Airtime
            - type: paybill
              name: Paybill
        - countryIsoCode: UG
          currencyIsoCode: UGX
          name: Uganda
          offrampTypes:
            - type: mobile_money
              name: Mobile money
            - type: airtime
              name: Airtime
        - countryIsoCode: GH
          currencyIsoCode: GHS
          name: Ghana
          offrampTypes:
            - type: mobile_money
              name: Mobile money
            - type: airtime
              name: Airtime
        - countryIsoCode: ZA
          currencyIsoCode: ZAR
          name: South Africa
          offrampTypes:
            - type: bank
              name: Bank
            - type: airtime
              name: Airtime
        - countryIsoCode: TZ
          currencyIsoCode: TZS
          name: Tanzania
          offrampTypes:
            - type: mobile_money
              name: Mobile money
            - type: airtime
              name: Airtime
    OfframpWalletsExample:
      value:
        - network: POLYGON
          asset: USDC
        - network: CELO
          asset: USDC
        - network: ETHEREUM
          asset: USDC
        - network: AVALANCHE
          asset: USDC
        - network: CELO
          asset: CUSD
        - network: POLYGON
          asset: USDT
        - network: AVALANCHE
          asset: USDT
        - network: CELO
          asset: USDT
        - network: ETHEREUM
          asset: USDT
    OfframpValidateFieldsRequestExample:
      value:
        offerId: "65b8c6b8b188250081f30163"
        requiredFields:
          bankCode: "011:02"
          buyerBankAccountNumber: "3139586782"

    OfframpValidateFieldsResponseExample:
      value:
        details:
          - label: "Bank account holder name"
            value: "JOHN SMITH"
    CreateOrderRequestExample:
      value:
        offerId: "65b8c4b8b188250081f30165"
        network: "CELO"
        asset: "CUSD"
        amount: 1.02
        address: "0x5b7ae3c3c87F4A3F94b35c77233b13191eBFAD20"
        requiredFields:
          bankCode: "011:02"
          buyerBankAccountNumber: "3134586782"
        currency: "usd"
        ip: "192.168.1.1"
        orderParams: "someParams"
    ConfirmOrderRequestExample:
      value:
        orderId: "660528663163c4652145aaba"
        hash: "0xf4c04687dca90a9060861493d7baa8ce761081c44949ec3507c5413304b13ae3"
security:
  - ClientIdHeader: []
  - TimestampHeader: []
  - SignatureHeader: []
