Client onboarding
Getting your credentials
Everything you need to go from zero to authenticated. Get your API credentials, set up your environment, and be ready to make your first request.
The path to your first API call
Four steps from landing here to a working integration:
Step 1: Request your credentials
To access the Mercury API, you need two credentials issued by the Mercury team. These are provided as part of your distributor partnership onboarding.
Identifies your distributor account. Sent in the x-api-key header on every request. Not secret, but do not share publicly.
Used to generate HMAC-SHA256 signatures. Never transmitted over the wire. Treat like a password. If compromised, contact Mercury immediately to rotate.
Tell us about your integration and the Mercury team will be in touch to set up your sandbox access:
Request API accessThe form asks for your company name, use case, and expected transaction volumes. The Mercury team reviews each enquiry and will provision your sandbox credentials once your programme is set up.
What you will receive
Mercury will provide you with two sets of credentials and environment details:
Sandbox API Key
Sandbox Secret Key
Sandbox base URL
Mirrors production behaviour. No real money movement. Use for all development and testing.
Production API Key
Production Secret Key
Production base URL
Provided after integration reviewSeparate credentials. Same API surface. Only a base URL change needed. Issued when your integration passes review.
Step 2: Set up your environment
Store your credentials securely and configure your development environment. Never hardcode secrets in source code.
# Add to your shell profile (.bashrc, .zshrc) or .env file
export MERCURY_API_KEY="your-sandbox-api-key"
export MERCURY_SECRET_KEY="your-sandbox-secret-key"
export MERCURY_BASE_URL="https://www.api.external.test.mercury.global"# .env file (add to .gitignore!)
MERCURY_API_KEY=your-sandbox-api-key
MERCURY_SECRET_KEY=your-sandbox-secret-key
MERCURY_BASE_URL=https://www.api.external.test.mercury.global
# In your code
from dotenv import load_dotenv
import os
load_dotenv()
API_KEY = os.getenv("MERCURY_API_KEY")
SECRET_KEY = os.getenv("MERCURY_SECRET_KEY")
BASE_URL = os.getenv("MERCURY_BASE_URL")// .env file (add to .gitignore!)
// MERCURY_API_KEY=your-sandbox-api-key
// MERCURY_SECRET_KEY=your-sandbox-secret-key
// MERCURY_BASE_URL=https://www.api.external.test.mercury.global
require("dotenv").config();
const API_KEY = process.env.MERCURY_API_KEY;
const SECRET_KEY = process.env.MERCURY_SECRET_KEY;
const BASE_URL = process.env.MERCURY_BASE_URL;Add
.env to your .gitignore immediatelyNever log it, print it, or include it in error reports
Use separate credentials for sandbox and production
Verify your setup
Before diving into authentication, confirm your credentials work by calling an unauthenticated lookup endpoint. This verifies network connectivity and that you can reach the Mercury API:
curl -s "https://www.api.external.test.mercury.global/api/v1/lookup/currencies" | head -c 200{
"status": "success",
"data": [
{ "display": "British Pound", "value": "GBP" },
{ "display": "Euro", "value": "EUR" }
]
}If you get a JSON response, you are connected. If you get a timeout or connection error, check your network and firewall settings.
Choose your tooling
Pick the approach that fits your workflow. All three get you to the same place.
Write signing logic in your language of choice and call the API directly from code or terminal.
Auth guide with code examplesImport our pre-built collection with auto-signing. Explore every endpoint with zero code.
Postman setup guideGenerate auth headers in your browser. Paste into cURL. Great for quick testing and debugging.
Helper tool guideSandbox vs production
The sandbox is a full replica of the production environment. Build and test your entire integration here first.
Design your integration with the base URL as a configuration variable from the start. This makes the sandbox-to-production switch a one-line change.
Going to production
When your sandbox integration is complete, the Mercury team will review it and issue production credentials. Here is what to expect:
Quick reference
Updated about 2 hours ago
