Skip to main content
This guide is for developers who want Meld to host the KYC flow. You’ll call Meld’s API to launch the KYC provider UI, KYC the user, then route them to an onramp that accepts the shared KYC token so they don’t need to verify again.

Summary of the steps

  1. Create a Meld customer and store the customerId
  2. Check whether that customer is already approved at the level their onramps need
  3. If not, launch Meld’s hosted KYC link and wait for the APPROVED webhook
  4. Start the transaction with bypassKyc: true. Meld refuses it with 400 CUSTOMER_KYC_NOT_APPROVED until the user is approved at the onramp’s level

Before you begin

  • You have contacted your Meld account manager to enable a KYC provider for you
  • You can store the Meld customerId against each of your users
  • You have a webhook endpoint configured to receive CUSTOMER_KYC_STATUS_CHANGE events (or you plan to poll)
To test this flow in Meld’s sandbox, see KYC testing.
If the user’s KYC status ends in REJECTED, the user has failed KYC. They can retry once, but a user who fails KYC here will very likely also fail directly with any onramp.
To enable this flow, do the following:

Step 1: Create a Meld customer

This step is required for the user to skip logging into the onramp, and is a one-time setup per user. Call POST /accounts/customers and pass in the user’s first name, last name, email address, phone number, and birthday.

Request

Response

The id in the response is now the Meld customerId of that user. The customerId is critical for all of the following steps, make sure you safely store it and tie it to the user in your system.

Step 2: Check if the User is Already KYCed

You can keep track in your own system if a particular user has been KYCed via Meld. If you don’t keep track, you can call GET /accounts/customers, passing the customerId of the user, to check whether the user has already been KYCed with Meld. If the user has been KYCed successfully, then you do not have to KYC the user again. The response will look something like this for a KYCed user, with the key field being serviceProviderCustomers.kyc.status.

Response

If the user has not been successfully KYCed, then either serviceProviderCustomers.kyc.status will show a status other than APPROVED, or the serviceProviderCustomers object will be blank, depending on if the user has attempted KYC previously or not. Either way, the user will have to be KYCed successfully with Meld first. kyc.approvedLevel is the highest KYC level the user is approved at, and kyc.level the level of their current verification. An onramp accepts the user once approvedLevel reaches its minimum level, so an APPROVED user at LEVEL_1 still steps up for an onramp that needs LEVEL_2.

Step 3: Have Meld KYC the User

This step is only needed if the user isn’t already successfully KYCed at the level their onramps need. Calling it for a user already approved at that level is safe: they get status: APPROVED and nothing to open, and Meld shares the verification with any named onramp the customer has not been shared to yet. To KYC the user, call POST /accounts/customers/{customerId}/kyc/initiate with the header Meld-Version: 2026-11-01. The customerId is in the path. Note that Sumsub is being used as the sample KYC provider in these requests.

Request

The response will include a url that you should then launch from your UI. targetServiceProviders names the onramps the user may use. Meld verifies the user at the highest level they need and, for each onramp that takes a KYC share, shares this verification with it once it is approved and the onramp has what it needs before the share. See KYC levels and Share KYC with providers.

Response

As the user goes through the KYC flow, you will receive webhooks informing you that the KYC status of the user has changed. The body of the webhook will look like this:
Each time you receive a webhook, repeat Step 2 until the serviceProviderCustomers.kyc.status shows as APPROVED. If the serviceProviderCustomers.kyc.status is REJECTED, this means the user has failed KYC. They may retry submit with corrected data. If they still fail, then the user will have to try KYCing with the onramp directly, in the onramp’s widget.

Step 4: Initiate a transaction

Pass Meld the customerId of the user when you call POST /crypto/session/widget. Make sure to include the param "bypassKyc": true, which tells Meld to look up that customer’s KYC information and forward it to the onramp. Meld forwards it only when the user is approved at the onramp’s level, and otherwise refuses the session with 400 CUSTOMER_KYC_NOT_APPROVED.

Request

Response

If you executed every step correctly, then when you open either the widgetUrl or serviceProviderWidgetUrl, then the user go straight to the onramp’s payment screen, as seen in this demo video.
And that’s it! Congrats, you are now using Meld’s Unified KYC product to enhance your users’ experience!