Skip to main content
End-to-end guide for integrating Meld’s headless offramp (crypto → fiat) over the Payment and Account APIs.
This guide walks through customer creation, KYC, quoting, order creation, and webhook tracking for the headless offramp flow. Callers collect a provider deposit wallet address from Meld, have the user send crypto, and the provider pays out fiat to the bank / mobile money details you supplied.

Before you begin

  • You have a Meld API key with payment access (sandbox first, production for go-live)
For the sandbox testing guide, please refer to Virtual Account Flow Testing Credentials
  • You have a webhook endpoint configured in Developer → Webhooks in the dashboard
  • At least one headless-capable offramp provider is enabled on your account (for example Noah, Due Network, Brale, or Yellowcard)
  • If you are using Meld to KYC, then your Meld account must have Sumsub configured. Reach out to Meld for help enabling this if needed.

How it works

  1. Create a customer in the Account API. (one time per user)
  2. Configure webhooks (including KYC events). (one time)
  3. Read the offramp provider’s requirements and complete what they list, KYC included. (one time per user / provider)
  4. Get a sell quote from the Payment API. (every transaction)
  5. Create a headless offramp order with fiat payout details. (every transaction)
  6. The end user sends crypto to the returned walletAddress. (every transaction)
  7. Track the order by its status, and read it again on every webhook. (every transaction)
Step 6 stays its own step: the user (or your treasury) must send the correct crypto amount to the provider-issued address before the fiat payout can complete.

1. Create a customer

Endpoint: POST /accounts/customers Once per end user. Reuse the same Meld customerId for all later KYC, quote, and order calls.

Required fields

Response:
Save the returned id — offramp create requires customerId.

Add a customer address (required for Due Network)

If you plan to use Due Network, add a residential address before KYC. Due uses address country when creating / sharing the provider customer. Endpoint: POST /accounts/customers/{customerId}/addresses
Response:
Optional grouping fields on the offramp order: subaccountCustomerId, externalSubaccountCustomerId.

2. Configure webhooks

Set this up before KYC so you receive CUSTOMER_KYC_STATUS_CHANGE as well as transaction events. In the Meld dashboard (Developer → Webhooks), subscribe at minimum to:
  • CUSTOMER_KYC_STATUS_CHANGE
  • TRANSACTION_CRYPTO_PENDING
  • TRANSACTION_CRYPTO_TRANSFERRING
  • TRANSACTION_CRYPTO_COMPLETE
  • TRANSACTION_CRYPTO_FAILED
  • ORDER_CRYPTO_FAILED
Put the endpoint on webhook version 2026-09-01 or later, so that events carry the order’s id and status. See Webhook version. Verify signatures per Webhook authentication docs.

3. KYC

Offramp providers that take a Sumsub share (Noah, Due Network, and similar) follow the same ASYNC KYC pattern as the virtual account onramp. KYC is per provider, not per direction, so the same requirements endpoint answers for an offramp:
  1. Read the provider’s requirements: GET /crypto/onramp/{serviceProvider}/requirements?customerId={customerId}, with Meld-Version: 2026-11-01 and no order parameters.
  2. Start Sumsub via POST /accounts/customers/{customerId}/kyc/initiate (once per customer), naming the offramp provider in targetServiceProviders, as the MELD_KYC step’s action does.
  3. After each CUSTOMER_KYC_STATUS_CHANGE webhook, read the requirements again and do what they list, until eligible is true. Then create the first sell order for that provider.
Brale and Yellow Card verify the customer themselves, so their requirements list no KYC steps.
In an app or a web page, Meld.ensureReady can run these steps for you: create a requirements session for the customer and the offramp provider, without an order, and create the sell order once it ends READY.

Initiate KYC

Endpoint: POST /accounts/customers/{customerId}/kyc/initiate Header: Meld-Version: 2026-11-01
Meld shares with each named provider once Sumsub approves the customer and the provider has what it needs before the share. Due Network needs a first and last name, an email and an address with a country. A provider still missing one never fails the call: the response lists it in sharePrerequisites, the requirements list it as a CUSTOMER_DETAILS step, and Meld shares once you add it. See What a provider needs before the share. Or import an existing Sumsub applicant:
Response:
Direct the user to url when present, before expiresAt. Listen for CUSTOMER_KYC_STATUS_CHANGE. If the offramp provider needs its own onboarding or terms after the share, its requirements list a NOAH_HOSTED_ONBOARDING, DUENETWORK_HOSTED_ONBOARDING or DUENETWORK_HOSTED_TERMS step with an OPEN_URL action: handle it as in Payins, step 4c.

4. Get a quote (sell)

Endpoint: POST /payments/crypto/quote?integrationMode=HEADLESS Header: Meld-Version: 2026-05-01 Note that Brale does not support quotes. All Brale transactions are 1:1 (USD to USD backed stablecoin). customerId is optional on quote (same as widget crypto quote). Pass it when available so ramp intelligence / previously-used scoring can use it.
Sell quotes with integrationMode=HEADLESS include CRYPTO_VIRTUAL_ACCOUNT_OFFRAMP providers (Noah, Due, and similar) as well as standard crypto offramp providers.
For a sell quote, sourceCurrencyCode is crypto and destinationCurrencyCode is fiat:
Response:
Capture the selected serviceProvider and amounts for order creation. Quote coverage varies by provider and rail. Headless rows include kycMode (ASYNC or SYNC).

5. Create a headless offramp order

Endpoint: POST /crypto/order/headless/offramp Auth: Payment charge permission on your API key / session. Idempotency (recommended): X-Idempotency-Key: <uuid>
  • Successful create → HTTP 201
  • Same key after success → cached body, HTTP 200
  • After a failed attempt that left an empty idempotency row → HTTP 425 TOO_EARLY — mint a new key
Optional fields:
  • externalOrderId: your reference for the order, unique per account. A reused one returns 400 EXTERNAL_ORDER_ID_NOT_UNIQUE. The order status and the webhooks echo it.
  • refundWalletAddress: where the crypto goes back if the order is refunded. It must be an address on the source currency’s chain, and you can’t change it after the order is created.

ACH / bank payout example

Address fields also accept snake_case aliases street_line_1 / street_line_2 for compatibility with older examples.

SEPA details shape

Mobile money details shape

Payout type options

Provider support for each type is account- and rail-specific.

Response

When the order is refused

SERVICE_PROVIDER_ERROR on create. A 500 reading CryptoAuthorizedAmount <n> exceeds customer deposit <m> — rate may have moved means the provider re-priced between your quote and the order. Take a fresh quote and submit the order with the amount from that quote rather than a rounded figure, and mint a new X-Idempotency-Key for the retry.

6. User sends crypto

Instruct the user (or your ops/treasury process) to send exactly the sourceAmount / currency from the order request to walletAddress. Incorrect amount, asset, or network can prevent payout. This is a required human (or treasury) action after order create — the order alone does not move crypto.

7. Track the order

Track a sell by its order status. The transaction status can’t tell an expired order from a cancelled one, or a provider’s review from a pending payout, and an order that ends before any deposit may have no transaction at all. Use the transaction for amounts, fees and the blockchain hash.

Read the order status

Endpoint: GET /crypto/order/{orderId}/status orderId is the id returned in Step 5. The call needs an API key that can read transactions. It returns the same shape on every Meld-Version, with Cache-Control: no-store.
Every field is always present. null means not set yet. A 404 (NOT_FOUND) means your account has no sell order with that id: the id is unknown, belongs to another account, or is an onramp, transfer or other order. Only sell orders have an order status.

Order statuses

An order moves only along these paths:
  • An order can pass through several statuses between two reads, so don’t wait for each status in turn.
  • Treat a status you don’t recognise as still in progress, and read the order again later. New statuses may be added.
errorCode values you can see: Other codes can appear. Show errorText for a code you don’t recognise.

Webhooks

Webhooks tell you when to read the order again. When one arrives for a sell, call GET /crypto/order/{orderId}/status and act on the status it returns:
  • Webhooks can arrive out of order. orderStatus on an event is the status when Meld created the event, and the status endpoint returns the order as it is now.
  • Not every status change sends a webhook. Read orders that aren’t final on a schedule as well.
An endpoint that subscribes to ORDER_CRYPTO_FAILED by name doesn’t also get TRANSACTION_CRYPTO_FAILED for an order that ended before any deposit. An endpoint that subscribes to every event gets both.

Webhook version

On webhook version 2026-09-01 or later, every event of a sell’s transaction carries the order:
paymentTransactionId, paymentTransactionStatus, externalOrderId, errorCode and errorText are always sent, as null when empty. Other empty fields are left out. A headless order has no sessionId or externalSessionId, so don’t key your handler on them. To get this shape:
  • An endpoint you created on or after 2026-09-01 without naming a version is on it already.
  • To move another endpoint, open Developer → Webhooks in the dashboard, choose API Version from the endpoint’s menu, and enter 2026-09-01. Or send PATCH /notifications/webhooks/{webhookProfileId} with "eventVersion": "2026-09-01". The version applies to every event the endpoint receives.
Events in this shape carry "version": "2026-09-01" in the envelope. ORDER_CRYPTO_FAILED always does, whatever the endpoint’s version. On an earlier version, events don’t carry the order. Match each one through its transaction: take paymentTransactionId, call GET /payments/transactions/{paymentTransactionId}, and read orderId. Store the order id against paymentTransactionId on the first event, so you look it up once per transaction.

Fetch the full transaction

Endpoint: GET /payments/transactions/{paymentTransactionId} Use paymentTransactionId from the order status or the webhook. Read amounts, fees, the provider’s reference and the blockchain hash here. Its status is the transaction’s: show your user the order status. Example response:

Sequence Diagram


Notes and limits

  • Create the sell order once the provider’s requirements answer eligible: true. The order is still the final check.
  • Send the correct crypto amount and network/asset implied by your quote and order — the provider matches inbound crypto to the order.
  • Provider sandboxes may not complete full fiat settlement; you may stop at wallet address issuance.