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

# Create Quote

> Creates a quote for a source and destination currency specified by a user.

## Error responses

| **Status** | **Message**                                                             | **What it means**                                             | **How to fix**                                                              |
| ---------- | ----------------------------------------------------------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------- |
| 400        | `Invalid country or currency ISO code`                                  | Source/target country or currency combination is unsupported. | Send ISO pairs for corridors enabled on your workspace.                     |
| 400        | `Invalid Payment Channel, check docs or contact support`                | `paymentChannel` is not valid for the corridor.               | Switch to a supported channel for the requested route.                      |
| 400        | `Required field missing or invalid request`                             | Payload is missing mandatory attributes.                      | Validate `source`, `target`, `paymentChannel`, and metadata before calling. |
| 400        | `Minimum target amount for transaction is {minimum_transaction_amount}` | Target amount is below the minimum allowed.                   | Increase the amount to at least the stated threshold.                       |
| 400        | `Maximum target amount for transaction is {maximum_transaction_amount}` | Target amount exceeds the allowed limit.                      | Reduce the amount to stay under the maximum.                                |
| 400        | `Transaction target amount {transaction_amount} requires invoice`       | Amount requires invoice documentation.                        | Attach the relevant invoice and retry.                                      |
| 401        | `API key missing or incorrect`                                          | `x-api-key` header missing/invalid.                           | Include the correct API key for sandbox/production.                         |
| 403        | `Quote route not available, contact support`                            | Quote endpoint disabled in the current environment.           | Reach out to support to enable the route.                                   |
| 403        | `Access denied: IP address not whitelisted`                             | IP address has not been whitelisted.                          | Add your server IP in the dashboard.                                        |
| 429        | `API rate limit exceeded`                                               | Too many quote requests in a short window.                    | Implement exponential backoff before retrying.                              |
| 500        | `Service temporarily unavailable`                                       | Temporary backend outage or maintenance.                      | Retry shortly and escalate if it continues.                                 |


## OpenAPI

````yaml post /v1/quote
openapi: 3.0.3
info:
  title: meCash API
  version: 3.0.3
  description: >-
    API for meCash services, including FIAT and Ramp operations. This is the
    OpenAPI specification for the meCash API, covering all available endpoints
    for wallet management, currency quotes, and payouts.


    It follows a design-first approach based on OpenAPI 3.0.


    Authentication is handled via an API key passed in the `x-api-key` header.
    Replace `YOUR_API_KEY` with your actual key when making requests.


    Some useful links:

    - [meCash Documentation](https://docs.me-cash.com/)

    - [Authentication Guide](https://docs.me-cash.com/authentication)
servers:
  - url: https://sandboxapi.me-cash.com
    description: Sandbox Server for Testing
security:
  - ApiKeyAuth: []
tags:
  - name: Wallet
    description: Wallet management operations
  - name: Quote
    description: Currency quote operations
  - name: Payout
    description: Payout operations
  - name: Transaction
    description: Transaction management
  - name: Virtual Account
    description: Virtual account operations for static and dynamic accounts
  - name: Bank
    description: Bank account and list operations
  - name: Ramp
    description: Ramp operations for crypto
  - name: Miscellaneous
    description: Utility and miscellaneous operations
  - name: Collection
    description: Mobile money and wallet funding operations
  - name: Bulk Payout
    description: >-
      Bulk transfer operations for sending to multiple beneficiaries in a single
      request
paths:
  /v1/quote:
    post:
      tags:
        - Quote
      summary: Create Quote
      description: >-
        Creates a quote for a source and destination currency specified by a
        user.
      operationId: createQuote
      requestBody:
        description: Details for the new quote.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateQuoteRequest'
      responses:
        '200':
          $ref: '#/components/responses/QuoteCreatedSuccess'
        '400':
          $ref: '#/components/responses/QuoteBadRequest'
        '401':
          $ref: '#/components/responses/QuoteValidationError'
components:
  schemas:
    CreateQuoteRequest:
      type: object
      required:
        - paymentChannel
        - source
        - target
      properties:
        paymentChannel:
          $ref: '#/components/schemas/PaymentChannel'
        source:
          $ref: '#/components/schemas/QuoteSource'
        target:
          $ref: '#/components/schemas/QuoteTarget'
    PaymentChannel:
      type: string
      description: >-
        The channel through which the payment will be processed. For SWIFT
        transfers, use `SWIFT_CUSTOMER` (sender/customer bears all transfer
        charges), `SWIFT_SHARED` (charges split between sender and beneficiary),
        or `SWIFT_BENEFICIARY` (beneficiary bears all transfer charges).
      example: BANK_TRANSFER
      enum:
        - BANK_TRANSFER
        - INTERAC
        - SWIFT_CUSTOMER
        - SWIFT_SHARED
        - SWIFT_BENEFICIARY
        - MOBILE_MONEY
    QuoteSource:
      type: object
      required:
        - amount
        - country
        - currency
      properties:
        amount:
          type: number
          description: The amount in the source currency.
          example: 150000
        country:
          type: string
          description: The source country code (ISO 3166-1 alpha-2).
          enum:
            - NG
            - MW
            - US
        currency:
          type: string
          description: The source currency code (ISO 4217).
          enum:
            - NGN
            - MWK
            - USD
    QuoteTarget:
      type: object
      required:
        - country
        - currency
      properties:
        country:
          $ref: '#/components/schemas/CountryCode'
        currency:
          $ref: '#/components/schemas/CurrencyCode'
    CreateQuoteSuccessData:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: e5eec724-38f9-40e2-9i86-xxxxxxxxxxxxx
        paymentChannel:
          $ref: '#/components/schemas/PaymentChannel'
        source:
          type: object
          properties:
            currency:
              type: string
              example: NGN
            country:
              type: string
              example: NG
            amount:
              type: number
              example: 150000
        target:
          type: object
          properties:
            currency:
              type: string
              example: USD
            country:
              type: string
              example: US
            amount:
              type: number
              example: 81.97
        rate:
          type: number
          example: 1830
        fee:
          type: object
          properties:
            amount:
              type: number
              example: 0
            stampDuty:
              type: number
              example: 0
        rules:
          type: array
          items:
            type: object
            properties:
              category:
                type: string
                example: LIMIT
              appliedCurrency:
                type: string
                example: USD
              appliedCountry:
                type: string
                example: US
              transaction:
                type: object
                properties:
                  minimum:
                    type: number
                    example: 1
                  maximum:
                    type: number
                    example: 20000000000000
              invoice:
                type: number
                example: 200000000000
        summary:
          type: object
          properties:
            total:
              type: number
              example: 150000
        settlementTime:
          type: string
          example: 1 hr
        settlement:
          type: string
          example: 1 hr
        quoteCurrency:
          type: string
          example: USD
        expiresInSeconds:
          type: integer
          example: 600
    QuoteFailedResponse:
      type: object
      properties:
        message:
          type: string
        status:
          type: string
          example: failed
      required:
        - message
        - status
    QuoteValidationErrorResponse:
      type: object
      properties:
        message:
          type: string
        status:
          type: string
          example: error
      required:
        - message
        - status
    CountryCode:
      type: string
      description: Country code (ISO 3166-1 alpha-2).
      example: NG
      enum:
        - NG
        - US
        - GB
        - DE
        - MW
        - CA
        - SG
        - KR
        - TH
        - MY
        - VN
        - CN
        - GH
        - CI
        - KE
        - RW
        - SN
        - ZA
        - AT
        - DK
    CurrencyCode:
      type: string
      description: Currency code (ISO 4217).
      example: NGN
      enum:
        - NGN
        - USD
        - GBP
        - EUR
        - MWK
        - CAD
        - SGD
        - KRW
        - THB
        - MYR
        - VND
        - CNY
        - GHS
        - KES
        - RWF
        - XOF
        - ZAR
        - DKK
  responses:
    QuoteCreatedSuccess:
      description: Quote created successfully.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: quote successfully created
              status:
                type: string
                example: success
              data:
                $ref: '#/components/schemas/CreateQuoteSuccessData'
    QuoteBadRequest:
      description: Bad Request. The request could not be processed due to a client error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/QuoteFailedResponse'
          examples:
            InvalidAPIKey:
              summary: Invalid API Key
              value:
                message: Invalid API key
                status: failed
            QuoteNotFoundExample:
              summary: Quote Not Found
              value:
                message: Quote does not exist
                status: failed
    QuoteValidationError:
      description: Unauthorized. A required parameter may be missing.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/QuoteValidationErrorResponse'
          example:
            message: paymentChannel is required
            status: error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````