Skip to main content
  • All API calls use an HMAC authentication strategy with pre-shared API and secret keys.
  • Sandbox and production environments have different API credentials. Do not reuse across environments.
  • All requests must use HTTPS (TLS 1.2 or higher).
  • You must allow outbound connections to the Meridian Base URLs.
  • IP whitelisting may be required for production access depending on your program configuration. Meridian provides details if applicable.
Every request must include the following headers:
Meridian issues your API Key and Secret during Sandbox and production provisioning.
When Meridian receives the request, it validates the signature. If the signature does not match, the API immediately returns a 401 Unauthorized response.

Constructing the signature

1

Build the canonical string

Compute the signature as an HMAC SHA-256 hash over a canonical string that concatenates the following values in order:
2

Compute the HMAC

Compute the HMAC using the language-appropriate crypto library with the secret key.
Make sure you compute the HMAC with the API Secret that Meridian issued to you.
3

Compute the SHA-256 hash

Hash the final value using the SHA-256 algorithm and set it as the X-Meridian-Signature header.

Common errors

Meridian returns 401 Unauthorized for requests with missing or invalid signatures.
The most common causes are:
  • Canonical string fields concatenated in the wrong order.
  • Timestamp too far from the server’s current time.
  • Forgetting to compute the HMAC with your unique API Secret.
  • Forgetting to SHA-256 hash the final string.