Before you begin
- You have a Meld sandbox or production API key
- You have decided which products you need (you can also use optional products)
- You know the regions your customers bank in, or are comfortable leaving regions unset
- Your server is calling the endpoint — never call this endpoint from the browser or mobile client, the API key is a secret
Create the token
Send aPOST request to {api_base_url}/bank-linking/connect/start using your API key. The response contains the connectToken you will use in Step 2: Launch the widget.
For the full request and response schema, refer to the Bank Linking — Create Connect Token API reference.
customerId returned in the response, or the externalCustomerId you optionally pass in.
Disabling / re-enabling service providersIf you disable a service provider in the Meld dashboard and later re-enable it (with the same or different credentials), use new
customerId / externalCustomerId values for subsequent connections. Reusing prior identifiers can result in an Error creating user when the customer selects an institution.Skipping or prepopulating the Meld picker
If you already know which institution the user wants to link (for example, you collect that in your own UI), you have two options to make the flow more seamless:- Prepopulate the search box. Pass the institution name as a string when creating the connect token. The Meld picker autofills the search input so matching institutions appear by default. The user can still edit the search string.
- Skip the picker entirely. Pass the
institutionIdcorresponding to the user’s bank. This skips the Meld picker screen and sends the user straight to the institution login.
institutionId, use the /institutions endpoint. Note that for MX, not all institutions that support transactions also support historical transactions, so HISTORICAL_TRANSACTIONS appears as a separate product in the institution search response. However, when listing products in /connect/start, pass TRANSACTIONS only — HISTORICAL_TRANSACTIONS is not a valid value for the products array on /connect/start.
A key part of building the request body is the list of products. For more information on the available products and which to request, see Supported Bank Linking Products.
Sample request
Sample response
Key response fields
| Field | Description |
|---|---|
id | The Meld connection id. Use this to look up the connection later. |
connectToken | The JWT used to launch the widget. Expires after 3 hours. |
customerId | Meld’s id for the customer. Persist this to track the customer across connections. |
externalCustomerId | The id you passed in (if any), echoed back. |
widgetUrl | The full URL with the token attached. You can load this directly in an iframe to launch the widget. |
Common errors
| HTTP status | Likely cause | Developer action |
|---|---|---|
401 Unauthorized | Missing or invalid Authorization header | Verify the API key value and the BASIC prefix; confirm you are hitting the correct environment |
400 Bad Request | Invalid product name, both required and optional product overlap, or unsupported region | Check products / optionalProducts / regions values against the API reference |
400 Bad Request | No required product specified when using optionalProducts | Move at least one product into the products array |
404 Not Found | The institutionId you passed does not exist | Re-resolve the institution via the /institutions endpoint |
5xx | Transient Meld or provider issue | Retry with backoff; if it persists, contact Meld support |