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
- Create a customer in the Account API. (one time per user)
- Configure webhooks (including KYC events). (one time)
- Read the offramp provider’s requirements and complete what they list, KYC included. (one time per user / provider)
- Get a sell quote from the Payment API. (every transaction)
- Create a headless offramp order with fiat payout details. (every transaction)
- The end user sends crypto to the returned
walletAddress. (every transaction) - Track the order by its status, and read it again on every webhook. (every transaction)
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
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 addresscountry when creating / sharing the provider customer.
Endpoint: POST /accounts/customers/{customerId}/addresses
subaccountCustomerId, externalSubaccountCustomerId.
2. Configure webhooks
Set this up before KYC so you receiveCUSTOMER_KYC_STATUS_CHANGE as well as transaction events.
In the Meld dashboard (Developer → Webhooks), subscribe at minimum to:
CUSTOMER_KYC_STATUS_CHANGETRANSACTION_CRYPTO_PENDINGTRANSACTION_CRYPTO_TRANSFERRINGTRANSACTION_CRYPTO_COMPLETETRANSACTION_CRYPTO_FAILEDORDER_CRYPTO_FAILED
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:- Read the provider’s requirements:
GET /crypto/onramp/{serviceProvider}/requirements?customerId={customerId}, withMeld-Version: 2026-11-01and no order parameters. - Start Sumsub via
POST /accounts/customers/{customerId}/kyc/initiate(once per customer), naming the offramp provider intargetServiceProviders, as theMELD_KYCstep’sactiondoes. - After each
CUSTOMER_KYC_STATUS_CHANGEwebhook, read the requirements again and do what they list, untileligibleistrue. Then create the first sell order for that provider.
Initiate KYC
Endpoint:POST /accounts/customers/{customerId}/kyc/initiate
Header: Meld-Version: 2026-11-01
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:
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 withFor a sell quote,integrationMode=HEADLESSincludeCRYPTO_VIRTUAL_ACCOUNT_OFFRAMPproviders (Noah, Due, and similar) as well as standard crypto offramp providers.
sourceCurrencyCode is crypto and destinationCurrencyCode is fiat:
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
externalOrderId: your reference for the order, unique per account. A reused one returns400 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 aliasesstreet_line_1/street_line_2for 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
6. User sends crypto
Instruct the user (or your ops/treasury process) to send exactly thesourceAmount / 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.
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, callGET /crypto/order/{orderId}/status and act on the status it returns:
- Webhooks can arrive out of order.
orderStatuson 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 version2026-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 sendPATCH /notifications/webhooks/{webhookProfileId}with"eventVersion": "2026-09-01". The version applies to every event the endpoint receives.
"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.