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

# Off-ramp

> This endpoint converts stablecoins to fiat.



## OpenAPI

````yaml /openapi/api-production.yaml post /transactions/off-ramp
openapi: 3.1.0
info:
  version: 1.0.0
  title: Lumx API
  description: >-
    A cross-border banking API with instant settlements and unmatched liquidity,
    powered by stablecoins.
servers:
  - url: https://api.lumx.io
  - url: https://api-sandbox.lumx.io
security: []
paths:
  /transactions/off-ramp:
    post:
      tags:
        - Transactions
      summary: Off-ramp
      description: This endpoint converts stablecoins to fiat.
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        content:
          application/json:
            examples:
              Floating:
                value:
                  destinationId: e80d3137-eddd-4791-b9b8-6e36b289f284
                  sourceCurrency: USDC
                  sourceAmount: '1000.00'
                  purpose: PERSONAL_ACCOUNT
              Locked:
                value:
                  destinationId: e80d3137-eddd-4791-b9b8-6e36b289f284
                  exchangeRateId: 123e4567-e89b-12d3-a456-426614174000
                  purpose: PERSONAL_ACCOUNT
            schema:
              $ref: '#/components/schemas/TransactionOffRampRequest'
      responses:
        '202':
          description: Off-ramp transaction started successfully.
          content:
            application/json:
              examples:
                Floating:
                  $ref: '#/components/examples/TransactionOffRampFloatingExample'
                Locked:
                  $ref: '#/components/examples/TransactionOffRampLockedExample'
              schema:
                $ref: '#/components/schemas/TransactionOffRampResponse'
      security:
        - apiKey: []
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      schema:
        type: string
        format: uuid
      description: >-
        Optional UUID v4 idempotency key. If you resend the same key with a
        different request body, the API returns a 409 error. Cached responses
        include the header `X-Idempotency-Cached: true`. Keys expire after 24
        hours.
  schemas:
    TransactionOffRampRequest:
      allOf:
        - oneOf:
            - allOf:
                - type: object
                  description: Off-ramp using floating exchange rate.
                  title: Floating
                - $ref: '#/components/schemas/TransactionOffRampFloating'
            - allOf:
                - type: object
                  description: Off-ramp using locked exchange rate.
                  title: Locked
                - $ref: '#/components/schemas/TransactionOffRampLocked'
    TransactionOffRampResponse:
      oneOf:
        - type: object
          title: Floating
          properties:
            id:
              type: string
              format: uuid
              description: Off-ramp operation's unique identifier.
              example: 123e4567-e89b-12d3-a456-426614174003
            customerId:
              type: string
              description: Customer's unique identifier.
              format: uuid
              example: 3c90c3cc-0d44-4b50-8888-8dd25736052a
            type:
              type: string
              description: Off-ramp operation's type.
              enum:
                - OFF_RAMP
              example: OFF_RAMP
            request:
              type: object
              properties:
                customerId:
                  type: string
                  description: Customer's unique identifier.
                  format: uuid
                  example: 3c90c3cc-0d44-4b50-8888-8dd25736052a
                destinationId:
                  type: string
                  format: uuid
                  description: Destination's unique identifier.
                  example: e80d3137-eddd-4791-b9b8-6e36b289f284
                sourceCurrency:
                  type: string
                  description: Transaction's source currency.
                  example: USDC
                sourceAmount:
                  type: string
                  description: Transaction's source amount.
                  example: '1000.00'
                targetCurrency:
                  type: string
                  description: Fiat currency to be received.
                  example: BRL
                purpose:
                  type: string
                  enum:
                    - PAYMENTS_FOR_GOODS_OR_SERVICES
                    - INTER_COMPANY_TRANSFER
                    - INVESTMENTS
                    - PAYROLL
                    - TREASURY_MANAGEMENT
                  description: Transaction's purpose.
                  example: PERSONAL_ACCOUNT
            state:
              type: object
              description: >-
                Off-ramp operation's current state. See examples for more
                details.
            metadata:
              type: object
              description: Metadata object attached to the transaction.
              additionalProperties: true
              example:
                orderId: ord_789
                source: checkout
            createdAt:
              type: string
              format: date-time
              description: Creation date and time (UTC).
              example: '2024-03-20T15:30:00Z'
            updatedAt:
              type: string
              format: date-time
              description: Last update date and time (UTC).
              example: '2024-03-20T15:30:05Z'
        - type: object
          title: Locked
          properties:
            id:
              type: string
              format: uuid
              description: Off-ramp operation's unique identifier.
              example: 123e4567-e89b-12d3-a456-426614174004
            customerId:
              type: string
              description: Customer's unique identifier.
              format: uuid
              example: 3c90c3cc-0d44-4b50-8888-8dd25736052a
            type:
              type: string
              description: Off-ramp operation's type.
              enum:
                - OFF_RAMP
              example: OFF_RAMP
            request:
              type: object
              properties:
                customerId:
                  type: string
                  description: Customer's unique identifier.
                  format: uuid
                  example: 3c90c3cc-0d44-4b50-8888-8dd25736052a
                destinationId:
                  type: string
                  format: uuid
                  description: Destination's unique identifier.
                  example: e80d3137-eddd-4791-b9b8-6e36b289f284
                exchangeRateId:
                  type: string
                  format: uuid
                  description: Exchange rate ID for this transaction.
                  example: 123e4567-e89b-12d3-a456-426614174000
                purpose:
                  type: string
                  enum:
                    - PAYMENTS_FOR_GOODS_OR_SERVICES
                    - INTER_COMPANY_TRANSFER
                    - INVESTMENTS
                    - PAYROLL
                    - TREASURY_MANAGEMENT
                  description: Transaction's purpose.
                  example: PERSONAL_ACCOUNT
            state:
              type: object
              description: >-
                Off-ramp operation's current state. See examples for more
                details.
            metadata:
              type: object
              description: Metadata object attached to the transaction.
              additionalProperties: true
              example:
                orderId: ord_789
                source: checkout
            createdAt:
              type: string
              format: date-time
              description: Creation date and time (UTC).
              example: '2024-03-20T15:30:00Z'
            updatedAt:
              type: string
              format: date-time
              description: Last update date and time (UTC).
              example: '2024-03-20T15:30:05Z'
    TransactionOffRampFloating:
      type: object
      properties:
        destinationId:
          type: string
          format: uuid
          description: Destination's unique identifier.
          example: e80d3137-eddd-4791-b9b8-6e36b289f284
        sourceCurrency:
          type: string
          enum:
            - USDC
            - USDT
          description: Transaction's source currency.
          example: USDC
        sourceAmount:
          type: string
          description: Transaction's source amount.
          example: '10000.00'
        purpose:
          type: string
          enum:
            - PERSONAL_ACCOUNT
            - INVESTMENT
            - REAL_ESTATE
            - TRADE_TRANSACTIONS
            - TAX
            - LOAN
            - BILLS
            - EXPENSES_REIMBURSEMENT
            - PROFESSIONAL_SERVICES
          description: >-
            Transaction's purpose. Note that PERSONAL_ACCOUNT can only be used
            with SELF relationship destinations.
          example: PERSONAL_ACCOUNT
        memo:
          type: string
          description: Transaction's memo. Optional reference for the wire transfer.
          example: INV-2024-10-1547
        blockchain:
          type: string
          enum:
            - ETHEREUM
            - BASE
            - TRON
            - POLYGON
          description: >-
            Target blockchain for the transaction. If not provided, the
            project's default blockchain will be used.
          example: POLYGON
        partnerFeeId:
          type: string
          description: >-
            Transaction's partner fee ID. If not provided, partner fees will be
            zero.
          format: uuid
          example: 123e4567-e89b-12d3-a456-426614174004
        metadata:
          type: object
          description: >-
            Optional metadata object to attach to the transaction. Accepts any
            valid JSON object.
          additionalProperties: true
          example:
            orderId: ord_789
            source: checkout
      required:
        - destinationId
        - sourceCurrency
        - sourceAmount
        - purpose
    TransactionOffRampLocked:
      type: object
      properties:
        destinationId:
          type: string
          format: uuid
          description: Destination's unique identifier.
          example: e80d3137-eddd-4791-b9b8-6e36b289f284
        exchangeRateId:
          type: string
          format: uuid
          description: Exchange Rate's unique identifier.
          example: 123e4567-e89b-12d3-a456-426614174000
        purpose:
          type: string
          enum:
            - PERSONAL_ACCOUNT
            - INVESTMENT
            - REAL_ESTATE
            - TRADE_TRANSACTIONS
            - TAX
            - LOAN
            - BILLS
            - EXPENSES_REIMBURSEMENT
            - PROFESSIONAL_SERVICES
          description: >-
            Transaction's purpose. Note that PERSONAL_ACCOUNT can only be used
            with SELF relationship destinations.
          example: PERSONAL_ACCOUNT
        memo:
          type: string
          description: Transaction's memo. Optional reference for the wire transfer.
          example: INV-2024-10-1547
        metadata:
          type: object
          description: >-
            Optional metadata object to attach to the transaction. Accepts any
            valid JSON object.
          additionalProperties: true
          example:
            orderId: ord_789
            source: checkout
      required:
        - destinationId
        - exchangeRateId
        - purpose
  examples:
    TransactionOffRampFloatingExample:
      value:
        id: 123e4567-e89b-12d3-a456-426614174003
        customerId: 3c90c3cc-0d44-4b50-8888-8dd25736052a
        type: OFF_RAMP
        request:
          destinationId: e80d3137-eddd-4791-b9b8-6e36b289f284
          sourceCurrency: USDC
          sourceAmount: '1000.00'
          purpose: PERSONAL_ACCOUNT
        state:
          status: TRANSFERRING_STABLECOIN
        metadata: {}
        createdAt: '2024-03-20T15:30:00Z'
        updatedAt: '2024-03-20T15:30:05Z'
    TransactionOffRampLockedExample:
      value:
        id: 123e4567-e89b-12d3-a456-426614174004
        customerId: 3c90c3cc-0d44-4b50-8888-8dd25736052a
        type: OFF_RAMP
        request:
          destinationId: e80d3137-eddd-4791-b9b8-6e36b289f284
          exchangeRateId: 123e4567-e89b-12d3-a456-426614174000
          purpose: PERSONAL_ACCOUNT
        state:
          status: TRANSFERRING_STABLECOIN
        metadata: {}
        createdAt: '2024-03-20T15:30:00Z'
        updatedAt: '2024-03-20T15:30:05Z'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Bearer authentication header on the format `Bearer <API_KEY>`.

````