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

# Read the effective Payments fee

> Returns the authenticated partner's server-resolved Payments fee for the key's environment. This is distinct from `/v1/fee-config`, which remains the direct swap widget's caller-selected overlay contract.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/payments/fee-config
openapi: 3.1.0
info:
  title: Hypermid API
  description: >-
    Price and execute cross-chain swaps, read reference data and payer balances,
    and quote the fiat on-ramp. Quotes return an executable `transactionRequest`
    your frontend submits directly, so Hypermid never custodies the funds.


    Payments — `checkout`, `deposit`, and `withdrawal` sessions — and
    payment-link management are available through these merchant REST endpoints
    and the [`@hypermid/sdk`](https://docs.hypermid.io/sdk/payments) package.
    Payer-facing routes are intentionally omitted.
  version: 0.2.0
  contact: {}
servers:
  - url: https://server.hypermid.io
    description: Production — live keys (sk_live_…)
  - url: https://server.hypermid.io
    description: Sandbox — test keys (sk_test_…), testnets only
security: []
tags:
  - name: payments
    description: >-
      Create and read payment sessions, manage webhooks, and configure payout
      addresses with a secret partner key.
  - name: payment links
    description: >-
      Create, read, version, and revoke reusable checkout payment links with a
      secret partner key.
  - name: quote
    description: >-
      Route pricing for the orchestration product. Returns an executable
      `transactionRequest` your frontend submits directly, so Hypermid never
      custodies the funds.
  - name: status
    description: >-
      Resolve the state of a submitted swap or transfer. Two endpoints with
      different audiences — see each one's description before choosing.
  - name: catalog
    description: >-
      Reference data an integration needs to render a picker: supported chains
      and tokens, prices, routable connections, and fee configuration. A sandbox
      key sees only testnets here.
  - name: balances
    description: Read a payer wallet's token balances across supported chains.
  - name: onramp
    description: >-
      The fiat rail — card and bank payment for crypto, quoted and settled
      through our onramp partner. Requires per-partner onramp credentials on
      your account.
  - name: webhooks
    description: >-
      Events Hypermid sends TO you when a session completes. These are requests
      we make to your server, not endpoints you call.
paths:
  /v1/payments/fee-config:
    get:
      tags:
        - payments
      summary: Read the effective Payments fee
      description: >-
        Returns the authenticated partner's server-resolved Payments fee for the
        key's environment. This is distinct from `/v1/fee-config`, which remains
        the direct swap widget's caller-selected overlay contract.
      operationId: PaymentController_paymentsFeeConfig
      parameters: []
      responses:
        '200':
          description: Effective Payments fee for this key.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiEnvelope'
                  - type: object
                    required:
                      - data
                    properties:
                      data:
                        $ref: '#/components/schemas/PaymentFeeConfigResponseDto'
        '401':
          description: Missing, invalid, or non-secret partner key (`UNAUTHORIZED`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentErrorResponseDto'
        '403':
          description: >-
            Key or operation forbidden (`FORBIDDEN` or
            `RECIPIENT_NOT_ALLOWLISTED`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentErrorResponseDto'
        '500':
          description: Unexpected server error (`INTERNAL_ERROR`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentErrorResponseDto'
        '503':
          description: >-
            Required capability or provider is unavailable
            (`SERVICE_UNAVAILABLE`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentErrorResponseDto'
      security:
        - bearer: []
components:
  schemas:
    ApiEnvelope:
      type: object
      properties:
        traceId:
          type: string
          description: W3C trace id of the request — correlate with logs/traces in SigNoz.
          example: 4bf92f3577b34da6a3ce929d0e0e4736
        code:
          type: string
          enum:
            - OK
            - BAD_REQUEST
            - UNAUTHORIZED
            - FORBIDDEN
            - NOT_FOUND
            - CONFLICT
            - RATE_LIMITED
            - PAYLOAD_TOO_LARGE
            - UNSUPPORTED_CHAIN
            - INTERNAL_ERROR
            - UPSTREAM_TIMEOUT
            - UPSTREAM_ERROR
            - SERVICE_UNAVAILABLE
            - KILL_SWITCH_ACTIVE
            - CIRCUIT_BREAKER_OPEN
            - NO_QUOTE_AVAILABLE
            - QUOTE_STALE
            - SIMULATION_REVERTED
            - INVALID_PARAMS
            - AMOUNT_OUT_OF_BOUNDS
            - PAYOUT_TOKEN_NOT_ALLOWED
            - RECIPIENT_NOT_ALLOWLISTED
            - PAYMENT_EXPIRED
            - PAYMENT_NOT_FOUND
            - NOT_CONFIGURED
            - INSUFFICIENT_LIQUIDITY
            - ROUTE_TEMPORARILY_UNAVAILABLE
            - UNSUPPORTED_ROUTE
            - OVER_DELIVERY_CAP
          description: >-
            Domain error code. `OK` on success; non-OK values come with a
            non-null `error`.
          example: OK
        error:
          type:
            - string
            - 'null'
          description: Human-readable error message. `null` on success.
          example: null
        data:
          type:
            - object
            - 'null'
          description: Endpoint-specific payload. `null` on error.
      required:
        - traceId
        - code
        - error
        - data
    PaymentFeeConfigResponseDto:
      type: object
      properties:
        scope:
          type: string
          enum:
            - payments
          description: >-
            Explicit scope; this is Payments pricing, not the direct swap-widget
            overlay.
        environment:
          type: string
          enum:
            - live
            - test
          description: Environment derived from the authenticated secret key.
        hypermidBase:
          description: Hypermid's resolved Payments fee for this partner and environment.
          allOf:
            - $ref: '#/components/schemas/PaymentHypermidFeeRateDto'
        partnerOverlay:
          description: >-
            Merchant-controlled developer fee added to Hypermid's fee. Defaults
            to zero and is capped at 100 bps. Settlement differs by rail;
            inspect `settlement` rather than treating this as already paid.
          allOf:
            - $ref: '#/components/schemas/PaymentDeveloperFeeRateDto'
        total:
          description: >-
            Effective payer fee: Hypermid fee plus developer fee, both applied
            to the same base amount.
          allOf:
            - $ref: '#/components/schemas/PaymentFeeRateDto'
      required:
        - scope
        - environment
        - hypermidBase
        - partnerOverlay
        - total
    PaymentErrorResponseDto:
      type: object
      properties:
        traceId:
          type: string
          example: 4bf92f3577b34da6a3ce929d0e0e4736
          description: >-
            Correlation id for this request. Quote it in any support message —
            it is how we find your call in our logs.
        code:
          type: string
          enum:
            - OK
            - BAD_REQUEST
            - UNAUTHORIZED
            - FORBIDDEN
            - NOT_FOUND
            - CONFLICT
            - RATE_LIMITED
            - PAYLOAD_TOO_LARGE
            - UNSUPPORTED_CHAIN
            - INTERNAL_ERROR
            - UPSTREAM_TIMEOUT
            - UPSTREAM_ERROR
            - SERVICE_UNAVAILABLE
            - KILL_SWITCH_ACTIVE
            - CIRCUIT_BREAKER_OPEN
            - NO_QUOTE_AVAILABLE
            - QUOTE_STALE
            - SIMULATION_REVERTED
            - INVALID_PARAMS
            - AMOUNT_OUT_OF_BOUNDS
            - PAYOUT_TOKEN_NOT_ALLOWED
            - RECIPIENT_NOT_ALLOWLISTED
            - PAYMENT_EXPIRED
            - PAYMENT_NOT_FOUND
            - NOT_CONFIGURED
            - INSUFFICIENT_LIQUIDITY
            - ROUTE_TEMPORARILY_UNAVAILABLE
            - UNSUPPORTED_ROUTE
            - OVER_DELIVERY_CAP
          example: INVALID_PARAMS
          description: >-
            Stable machine-readable error code. Branch on this, not on `error`,
            whose wording may change.
        error:
          type: string
          example: orderId is required
          description: >-
            Human-readable explanation. For logs and developers — not intended
            to be shown to a payer verbatim.
        data:
          type:
            - object
            - 'null'
          example: null
          description: >-
            Always null on an error. Present so success and error envelopes have
            the same shape.
      required:
        - traceId
        - code
        - error
        - data
    PaymentHypermidFeeRateDto:
      type: object
      properties:
        fee:
          type: number
          example: 0.003
          description: Decimal fee fraction applied to payer input (`30 bps` is `0.003`).
        feeBps:
          type: number
          example: 30
          description: Fee rate in basis points.
        source:
          type: string
          enum:
            - partner_override
            - global_default
          description: >-
            Whether this key's partner-specific Payments rate overrides the
            environment default.
      required:
        - fee
        - feeBps
        - source
    PaymentDeveloperFeeRateDto:
      type: object
      properties:
        fee:
          type: number
          example: 0.003
          description: Decimal fee fraction applied to payer input (`30 bps` is `0.003`).
        feeBps:
          type: number
          example: 30
          description: Fee rate in basis points.
        settlement:
          description: >-
            Rail-specific settlement semantics. The same developer rate is
            charged, but the payout mechanism differs.
          allOf:
            - $ref: '#/components/schemas/PaymentDeveloperFeeSettlementDto'
      required:
        - fee
        - feeBps
        - settlement
    PaymentFeeRateDto:
      type: object
      properties:
        fee:
          type: number
          example: 0.003
          description: Decimal fee fraction applied to payer input (`30 bps` is `0.003`).
        feeBps:
          type: number
          example: 30
          description: Fee rate in basis points.
      required:
        - fee
        - feeBps
    PaymentDeveloperFeeSettlementDto:
      type: object
      properties:
        evm:
          type: string
          enum:
            - accrued_manual
          description: >-
            On the EVM quote rail the combined fee reaches Hypermid's integrator
            wallet. The developer leg is an amount Hypermid owes the partner and
            settles periodically by manual transfer; it is not paid directly by
            the rail provider.
        near:
          type: string
          enum:
            - provider_direct
          description: >-
            On the Near deposit-address rail the provider pays this developer
            leg directly to the configured recipient.
      required:
        - evm
        - near
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Secret partner API key (`sk_live_…` or `sk_test_…`). Required to create
        or manage payment sessions. Server-side only — it can move money, so it
        must never reach a browser bundle. The key's prefix also selects the
        environment: `sk_test_` is confined to testnets.

````