QuickStart
Quickstart
This guide walks you from zero to your first successful Mpay User API call.
What This API Does
The Mpay User API lets you manage four things on behalf of your users:
- Wallet Operations — balances and transaction history
- Wallet Deposits — supported networks, deposit addresses, and deposit history
- Cardholder Setup — cardholder profile information
- Card Operations — issuing, recharging, and managing cards
Every endpoint is documented in the API Reference, with parameters, response shapes, and a live Try It console.
Step 1: Get Your Credentials
You'll need two values, issued to you by Mpay:
- API Key — identifies your client
- API Secret — used to sign requests; never sent over the network
Don't have these yet? Contact your Mpay account manager, or check the API Key table on the Authentication reference page if you're already logged in.
Step 2: Pick an Environment
| Environment | Base URL | Use for |
|---|---|---|
| Sandbox | https://uapidev.mpay.cards | Development and testing. No real funds are used. |
| Production | https://uapi.mpay.cards | Live operations with real crypto and fiat balances. |
Start on Sandbox. Nothing you do there touches real money.
Step 3: Understand Request Signing (Briefly)
Every request must carry four headers, computed with HMAC-SHA256: x-api-key, x-timestamp, x-nonce, and x-signature.
The full algorithm, with copy-paste Node.js, Python, and Java code, lives on the Authentication reference page — you'll need that before your first request succeeds. If you're using an official SDK, signing is handled for you and you can skip ahead.
Step 4: Install an SDK (Optional but Recommended)
Node.js
npm install @mpaycards/uapi-sdkconst { MpayUapiClient } = require('@mpaycards/uapi-sdk');
const client = new MpayUapiClient({
baseUrl: 'https://uapidev.mpay.cards',
apiKey: 'YOUR_API_KEY',
apiSecret: 'YOUR_API_SECRET',
});Python
pip install mpay-uapi-sdkfrom mpay_uapi_sdk import MpayUapiClient
client = MpayUapiClient(
base_url="https://uapidev.mpay.cards",
api_key="YOUR_API_KEY",
api_secret="YOUR_API_SECRET",
)Java
<dependency>
<groupId>cards.mpay</groupId>
<artifactId>uapi-sdk</artifactId>
<version>1.0.1</version>
</dependency>MpayUapiClient client = MpayUapiClient.builder()
.baseUrl("https://uapidev.mpay.cards")
.apiKey("YOUR_API_KEY")
.apiSecret("YOUR_API_SECRET")
.build();Working in another language? Every endpoint in the API Reference includes a
curlexample showing exactly which headers are required — compute the signature yourself using the algorithm on the Authentication page.
Step 5: Make Your First Call
With the SDK
const balance = await client.wallet.getWalletBalance();
console.log(balance);With raw HTTP
curl -X GET "https://uapidev.mpay.cards/v1/wallet/balance" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-timestamp: 1755123456789" \
-H "x-nonce: 550e8400-e29b-41d4-a716-446655440000" \
-H "x-signature: <computed-signature>"A 200 response means you're set up correctly. Getting a 401? See the troubleshooting table on the Authentication page — it's almost always a signature issue.
Where to Go Next
- Wallet Operations — balances and transactions
- Wallet Deposits — how deposits work
- Cardholder Setup — managing cardholder profiles
- Card Operations — issuing and recharging cards
- API Reference — full endpoint list and live Try It console
Updated about 1 hour ago
