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

# Create a quote

> Mints a single-use held quote for the requested currency pair. `intent` selects the action: 'payout' prices a held cross-rate / USD-source / same-currency quote (the corridor picks the engine), and 'convert' prices an in-wallet conversion between the caller's own balances (specifying the source `amount` to convert). The quote prices FX + markup only and locks the rate until it is consumed by the matching executor or expires; a payout's fixed fee and payment rail are applied at payout creation, not here. Both intents return the same QuoteResponseDto, always carrying a `rate` (1 for a same-currency or stablecoin-par quote).



## OpenAPI

````yaml /openapi.json post /v1/quotes
openapi: 3.0.0
info:
  contact: {}
  description: >-
    Comprehensive payment platform API supporting fiat and crypto payments,
    currency conversion, and compliance management
  title: Zuba Payment Platform API
  version: '1.0'
servers: []
security: []
tags:
  - description: Manage M2M API keys and credentials
    name: API Keys
  - description: Internal ledger accounts and transactions
    name: Ledger
  - description: Handle incoming payments and deposits
    name: Pay-ins
  - description: Manage payouts, beneficiaries, and SEPA transfers
    name: Payouts
  - description: Manage outbound webhook endpoints and deliveries
    name: Webhooks
paths:
  /v1/quotes:
    post:
      tags:
        - Quotes
      summary: Create a quote
      description: >-
        Mints a single-use held quote for the requested currency pair. `intent`
        selects the action: 'payout' prices a held cross-rate / USD-source /
        same-currency quote (the corridor picks the engine), and 'convert'
        prices an in-wallet conversion between the caller's own balances
        (specifying the source `amount` to convert). The quote prices FX +
        markup only and locks the rate until it is consumed by the matching
        executor or expires; a payout's fixed fee and payment rail are applied
        at payout creation, not here. Both intents return the same
        QuoteResponseDto, always carrying a `rate` (1 for a same-currency or
        stablecoin-par quote).
      operationId: QuoteController_createQuote
      parameters:
        - description: Client-generated idempotency key
          in: header
          name: Idempotency-Key
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              discriminator:
                mapping:
                  convert:
                    $ref: '#/components/schemas/ConvertQuoteRequestDto'
                  payout:
                    $ref: '#/components/schemas/PayoutQuoteRequestDto'
                  order:
                    $ref: '#/components/schemas/OrderQuoteRequestDto'
                propertyName: intent
              oneOf:
                - $ref: '#/components/schemas/PayoutQuoteRequestDto'
                - $ref: '#/components/schemas/ConvertQuoteRequestDto'
                - $ref: '#/components/schemas/OrderQuoteRequestDto'
        description: >-
          The `intent` field discriminates the body: a payout quote requires
          `targetAmount`; a convert quote requires `amount`. The runtime body is
          a single CreateQuoteDto validated per-intent.
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteResponseDto'
          description: The minted quote. Both intents return the same shape.
        '400':
          description: >-
            UNSUPPORTED_CORRIDOR | AMOUNT_OUT_OF_BOUNDS | SAME_CURRENCY |
            NO_PRICING_PLAN | CORRIDOR_NOT_ENABLED. A convert
            AMOUNT_OUT_OF_BOUNDS from the per-conversion ceiling also carries
            details: { maxCad, maxUsd } — the cap and its USD value at the
            current rate.
        '409':
          description: IDEMPOTENCY_KEY_CONSUMED
        '422':
          description: >-
            INSUFFICIENT_LIQUIDITY (both intents); IDEMPOTENCY_PARAM_MISMATCH
            (payout); POSITION_LIMIT_EXCEEDED | IDEMPOTENCY_KEY_REUSED (convert)
        '502':
          description: PROVIDER_UNAVAILABLE
      security:
        - bearer: []
components:
  schemas:
    ConvertQuoteRequestDto:
      properties:
        amount:
          description: >-
            Exact amount of fromCurrency to convert: the total source debit, in
            fromCurrency (required). Major-unit decimal string, up to 4 dp.
          example: '100'
          type: string
        fromCurrency:
          description: Source currency (debited from the caller balance)
          example: USD
          type: string
        intent:
          description: Must be 'convert' for this variant.
          enum:
            - convert
          example: convert
          type: string
        toCurrency:
          description: Target currency (credited to the caller balance)
          example: USDC
          type: string
      required:
        - fromCurrency
        - toCurrency
        - intent
        - amount
      type: object
    PayoutQuoteRequestDto:
      properties:
        fromCurrency:
          description: Source currency (debited from the client)
          example: NGN
          type: string
        intent:
          description: Must be 'payout' for this variant.
          enum:
            - payout
          example: payout
          type: string
        targetAmount:
          description: Amount the beneficiary receives, in toCurrency (required).
          example: '100'
          type: string
        toCurrency:
          description: Target currency (received by the beneficiary)
          example: GBP
          type: string
      required:
        - fromCurrency
        - toCurrency
        - intent
        - targetAmount
      type: object
    OrderQuoteRequestDto:
      properties:
        fromAmount:
          description: >-
            Amount to sell, in fromCurrency. Fixes the funded leg; the pair
            takes exactly one of fromAmount / toAmount. Major-unit decimal
            string, up to 4 dp.
          example: '1000'
          type: string
        fromCurrency:
          description: Sell (source) currency, funded from the client balance
          example: USDT
          type: string
        intent:
          description: Must be 'order' for this variant.
          enum:
            - order
          example: order
          type: string
        toAmount:
          description: >-
            Amount to deliver, in toCurrency. Fixes the delivered leg; the pair
            takes exactly one of fromAmount / toAmount. Major-unit decimal
            string, up to 4 dp.
          example: '1500000'
          type: string
        toCurrency:
          description: Buy (target) currency, delivered to the beneficiary
          example: NGN
          type: string
      required:
        - fromCurrency
        - toCurrency
        - intent
      type: object
    QuoteResponseDto:
      properties:
        expiresAt:
          description: Quote expiry timestamp (ISO 8601)
          example: '2026-04-13T12:00:30Z'
          type: string
        fromCurrency:
          description: Source currency (debited from the caller)
          example: NGN
          type: string
        id:
          description: Quote identifier
          example: uuid-here
          type: string
        rate:
          description: >-
            All-in rate: fromCurrency per 1 toCurrency. Always present; a
            same-currency or stablecoin-par quote (no FX leg) reports
            "1.00000000".
          example: '2524.47560000'
          type: string
        status:
          description: Quote status (only included on GET)
          enum:
            - active
            - used
            - expired
          type: string
        targetAmount:
          description: Amount received in toCurrency
          example: '100'
          type: string
        toCurrency:
          description: >-
            Target currency (received by the beneficiary, or credited to the
            caller's own balance for a convert quote)
          example: GBP
          type: string
        totalDebitAmount:
          description: >-
            Total amount debited from the caller in fromCurrency. The quote
            prices FX + markup only, so this is the FX base; a payout's fixed
            fee is added at payout creation.
          example: '252447.5600'
          type: string
      required:
        - id
        - fromCurrency
        - toCurrency
        - targetAmount
        - totalDebitAmount
        - rate
        - expiresAt
      type: object
  securitySchemes:
    bearer:
      bearerFormat: JWT
      description: Enter Auth0 JWT token
      scheme: bearer
      type: http

````