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

# Create a headless offramp order

> Creates a headless offramp order. Caller passes customer + provider + source crypto + fiat payout method and receives a provider-issued wallet address to send cryptocurrency to.



## OpenAPI

````yaml /openapi/crypto-20231219.json post /crypto/order/headless/offramp
openapi: 3.1.0
info:
  title: CRYPTO
  termsOfService: urn:tos
  license:
    name: Apache 2.0
    url: https://springdoc.org
  version: '2023-12-19'
  description: ''
servers:
  - url: https://api-sb.meld.io
    description: Meld API sandbox
  - url: https://api.meld.io
    description: Meld API production
security: []
tags:
  - name: Retail Ramp
    description: ''
  - name: Headless
    description: ''
  - name: Payment
    description: ''
  - name: Session
    description: ''
paths:
  /crypto/order/headless/offramp:
    post:
      tags:
        - Headless
      summary: Create a headless offramp order
      description: >-
        Creates a headless offramp order. Caller passes customer + provider +
        source crypto + fiat payout method and receives a provider-issued wallet
        address to send cryptocurrency to.
      operationId: /crypto-order-headless-offramp-create
      parameters:
        - name: X-Idempotency-Key
          in: header
          required: false
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HeadlessOrderOfframpRequest'
            example:
              customerId: ''
              destinationCurrencyCode: ''
              fiatPayoutMethod: ''
              serviceProvider: ''
              sourceAmount: ''
              sourceCurrencyCode: ''
              sourceWalletAddress: ''
        required: true
      responses:
        '201':
          description: Headless offramp order created
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/HeadlessOrderOfframpResponse'
        '400':
          description: 'Bad Request : check request values and format'
        '401':
          description: Invalid credentials
        '403':
          description: Unauthenticated or authenticated with insufficient access
        '500':
          description: Internal Error
          content:
            '*/*':
              schema:
                additionalProperties:
                  default: ''
                default: ''
                allOf:
                  - $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    HeadlessOrderOfframpRequest:
      type: object
      default: null
      description: Request to create a headless offramp order
      properties:
        customerId:
          type: string
          default: ''
          description: Customer id
          minLength: 1
          example: ''
        destinationCurrencyCode:
          type: string
          default: ''
          description: Destination fiat currency code
          example: ''
          minLength: 1
        externalSubaccountCustomerId:
          type: string
          description: >-
            Optional external identifier for the sub-account customer this
            transaction belongs to. Used for tracking when multiple businesses
            operate under one Meld account. A sub-account customer must be
            created first before it can be referenced.
        fiatPayoutMethod:
          default: ''
          description: >-
            Payout method details for how and where the fiat currency will be
            received
          example: ''
          allOf:
            - $ref: '#/components/schemas/FiatPayoutMethod'
        serviceProvider:
          type: string
          default: ''
          description: Service provider to use for this offramp order
          enum:
            - ACROSS
            - AEROPAY
            - AKOYA
            - ALCHEMYPAY
            - APPLEPAY
            - AUTHORIZENET
            - BANXA
            - BILIRA
            - BINANCECONNECT
            - BINANCEPAY
            - BLOCKCHAINDOTCOM
            - BOOMFI
            - BRAINTREE
            - BRALE
            - BTCDIRECT
            - CASHAPP
            - CHECKOUT
            - CIRCLE
            - COINBASEPAY
            - COINFLOW
            - DUENETWORK
            - ELDORADO
            - FINICITY
            - FLASHNET
            - FONBNK
            - GUARDARIAN
            - HARBOUR
            - KOYWE
            - KRYPTONIM
            - MERCURYO
            - MESH
            - MESO
            - MOONPAY
            - MOOV
            - MX
            - NMI
            - NOAH
            - ONMETA
            - ONRAMPMONEY
            - PAYBIS
            - PAYPAL
            - PLAID
            - RAMP
            - REVOLUT
            - ROBINHOOD
            - ROUTERPROTOCOL
            - SALTEDGE
            - SALTEDGEPARTNERS
            - SARDINE
            - SHIFT4
            - SHOPIFY
            - SIMPLEX
            - SKRILLCRYPTO
            - SQUARE
            - STRIPE
            - SUMSUB
            - SWAPPED
            - TANGOCARD
            - TELLER
            - TOPPER
            - TRANSAK
            - TREMENDOUS
            - TRANSFI
            - UNLIMIT
            - UPHOLD
            - WYRE
            - XANPOOL
            - YELLOWCARD
            - YODLEE
          example: ''
        sourceAmount:
          type: number
          default: ''
          description: Source amount in cryptocurrency
          example: ''
          minimum: 0
        sourceCurrencyCode:
          type: string
          default: ''
          description: Source cryptocurrency code
          example: ''
          minLength: 1
        sourceWalletAddress:
          type: string
          default: ''
          description: Source wallet address to send cryptocurrency from
          example: ''
          minLength: 1
        subaccountCustomerId:
          type: string
          description: >-
            Optional Meld customer id used to track the business sub-account
            this transaction belongs to when multiple businesses operate under
            one Meld account.
      required:
        - customerId
        - destinationCurrencyCode
        - fiatPayoutMethod
        - serviceProvider
        - sourceAmount
        - sourceCurrencyCode
        - sourceWalletAddress
    HeadlessOrderOfframpResponse:
      type: object
      default: null
      description: Response containing headless offramp order details
      properties:
        id:
          type: string
          description: Unique order ID for tracking the offramp order
        paymentMethodType:
          type: string
          description: Payment method for receiving the fiat funds
        walletAddress:
          type: string
          description: Wallet address used for the transfer
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
        displayMessage:
          type: string
        errors:
          type: array
          items:
            type: string
        message:
          type: string
        requestId:
          type: string
        serviceProviderDetails:
          type: object
          additionalProperties: {}
        timestamp:
          type: string
          format: date-time
    FiatPayoutMethod:
      type: object
      default: null
      description: Payout method for offramp
      properties:
        details:
          default: ''
          description: Payout method details
          oneOf:
            - title: AchPaymentMethodDetails
              allOf:
                - $ref: '#/components/schemas/AchPaymentMethodDetails'
            - title: MobilePaymentMethodDetails
              allOf:
                - $ref: '#/components/schemas/MobilePaymentMethodDetails'
            - title: SepaPaymentMethodDetails
              allOf:
                - $ref: '#/components/schemas/SepaPaymentMethodDetails'
          example: ''
        owner:
          type: string
          default: ''
          description: Account owner's first and last name
          minLength: 1
          example: ''
        type:
          type: string
          default: ''
          description: Fiat Payout method type
          enum:
            - PAYOUT_TO_BANK
            - ACH
            - SEPA
            - MOBILE_MONEY
            - NG_BANK_TRANSFER
            - ZA_BANK_TRANSFER
          example: ''
      required:
        - details
        - owner
        - type
    AchPaymentMethodDetails:
      allOf:
        - $ref: '#/components/schemas/FiatPayoutMethodDetails'
        - type: object
          properties:
            bankName:
              type: string
              default: ''
              description: Bank's name
            accountType:
              type: string
              default: ''
              description: Bank account type
              example: CHECKING, SAVINGS
              minLength: 1
            routingNumber:
              type: string
              default: ''
              description: Bank routing number
              minLength: 1
            accountNumber:
              type: string
              default: ''
              description: Bank account number
              minLength: 1
            beneficiaryAddress:
              default: ''
              description: Beneficiary's address
              allOf:
                - $ref: '#/components/schemas/Address'
            bankAddress:
              default: ''
              description: Bank address
              allOf:
                - $ref: '#/components/schemas/Address'
      description: >-
        Payout method details for ACH / PAYOUT_TO_BANK / NG_BANK_TRANSFER /
        ZA_BANK_TRANSFER
      required:
        - accountNumber
        - accountType
        - bankAddress
        - beneficiaryAddress
        - routingNumber
    MobilePaymentMethodDetails:
      allOf:
        - $ref: '#/components/schemas/FiatPayoutMethodDetails'
        - type: object
          properties:
            phoneNumber:
              type: string
              default: ''
              description: Customer phone number
              minLength: 1
      description: Payout method details for MOBILE_MONEY
      required:
        - phoneNumber
    SepaPaymentMethodDetails:
      allOf:
        - $ref: '#/components/schemas/FiatPayoutMethodDetails'
        - type: object
          properties:
            iban:
              type: string
              default: ''
              description: IBAN
              minLength: 1
      description: Payout method details for SEPA
      required:
        - iban
    FiatPayoutMethodDetails:
      default: null
      description: Payout method details. The schema depends on fiatPayoutMethod.type.
    Address:
      type: object
      default: null
      description: Address information
      properties:
        city:
          type: string
          default: ''
          description: City
          minLength: 1
          example: ''
        country:
          type: string
          default: ''
          description: Two-letter country code (ISO 3166-1 alpha-2)
          example: ''
          minLength: 1
        postalCode:
          type: string
          default: ''
          description: Postal code
          minLength: 1
          example: ''
        state:
          type: string
          description: State
        streetLineOne:
          type: string
          default: ''
          description: Street line 1
          minLength: 1
          example: ''
        streetLineTwo:
          type: string
          description: Street line 2
      required:
        - city
        - country
        - postalCode
        - streetLineOne
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      x-default: BASIC <Meld API Key>

````