MPChatMPChat/Docs

MP Merchant API

Accept USDT stablecoin payments with a few lines of code. The MP Merchant API lets you create payment orders, receive real-time blockchain confirmations, and manage payouts — all through a simple REST interface.

Base URLs

EnvironmentBase URL
Productionhttps://api.mpchat.com/v1
Sandboxhttps://api-sandbox.mpchat.com/v1

Authentication

All API requests require authentication using an API key. Each key consists of two parts: a key_id (public, used to identify the key) and a secret (private, never transmitted).

â„šī¸ HMAC-SHA256 Authentication

The secret is never sent over the wire. Instead, you sign a request timestamp with HMAC-SHA256 and pass the signature in the Authorization header. This protects against replay attacks and credential theft.

Authorization header format:

text
Authorization: Bearer {key_id}:{timestamp}:{hmac_signature}

# Example
Authorization: Bearer mk_live_abc123:1700000000:a1b2c3d4e5...

Request Format

All request bodies use JSON. Set Content-Type: application/json on all POST/PUT requests. All responses return JSON with a consistent structure.

Errors

Errors return a JSON body with a single error field describing the problem. HTTP status codes follow REST conventions.

JSON
{
  "error": "order not found"
}

See the Error Reference for a complete list of error messages and status codes.

Rate Limiting

Requests are limited to 60 per minute per API key. When exceeded, the API returns HTTP 429 with a Retry-After header indicating seconds to wait.

Pagination

List endpoints accept page (1-based) and per_page (max 100) query parameters. Responses include a total field.

bash
GET /v1/orders?page=2&per_page=20