Meld Environments
Meld offers both production and sandbox environments. The below table contains the URL for each environment:| Environment | API Base URL |
|---|---|
| Sandbox | https://api-sb.meld.io |
| Production | https://api.meld.io |
Sandbox and Production use separate API keys and separate data. A key issued for one environment will not work against the other. Test transactions in Sandbox do not move real funds.
Authentication
Meld uses API keys to authenticate requests. These keys carry many privileges such as authorizing payments and accessing financial accounts data. It is important to keep them private and secure during both storage and transmission. Authentication is handled via HTTP headers, using theAuthorization header.
Example request:
API Status Codes
The following table lists the status code you will receive from our APIs.API Error Schema
Any status code of400 or higher returns an error payload. Inspect the code and errors fields to determine how to handle the failure, and surface requestId when contacting Meld support so we can trace the exact call.
All errors are returned in the form of JSON and contain the following data:
| Key | Description |
|---|---|
code | A categorization of the error |
message | A developer-friendly representation of the error code. This may change over time and is not safe for programmatic use |
errors | A user-friendly representation of the error code. This may change over time and is not safe for programmatic use. |
requestId | The request Id |
timestamp | The date and time when the request was made |
Security
- CORS — Meld does not need to whitelist any of our customer’s URL or IPs for them to call our public Production & Sandbox APIs. You can use whichever URL you desire, as we authenticate via your Meld API Key.
-
For security reasons, Meld recommends using your backend server to make the calls to Meld’s API. If you make these calls from your frontend instead, it may not work and you may get back a CORS error. This is because making calls to Meld APIs requires that you pass in an
Authorizationheader with the API Key we issued you. It is insecure to keep this API Key hardcoded in your mobile app or web app. - All our customers need to treat the Meld API Key they’ve been issued like any other password. It is an extremely sensitive credential that needs to be protected at all cost. The security measures you need to ensure are: a) strict controls to the backend server (as it has access to your Meld API Key), b) a way to authenticate your FE/app to your backend server, c) reject/ignore all other calls to your backend server.
Dates
All Meld dates and timestamps returned via Meld’s API are in UTC time and formatted using ISO 8601 (for example,
2022-01-19T20:32:30.784928Z).