Merchants & API Keys
Retrieve your merchant profile and manage API keys. Each key is scoped to either the live or test environment.
The Merchant object
| Field | Type | Description |
|---|---|---|
id | string | Unique merchant UUID |
name | string | Merchant display name |
email | string | Contact email address |
status | string | PENDING_KYB · ACTIVE · SUSPENDED |
tier | string | BASIC · STANDARD · PREMIUM — affects fee rate |
fee_rate | string | Fee deducted from payments. E.g. "0.01" = 1%. |
environment | string | live or test |
created_at | string | ISO 8601 creation timestamp |
Retrieve merchant profile
/v1/merchants/meGet the authenticated merchant's profile
No parameters.
Returns Returns the Merchant object for the authenticated API key.
Request
curl https://api.mpchat.com/v1/merchants/me \
-H "Authorization: Bearer mk_live_abc:{ts}:{sig}"Response 200
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"platform_user_id": "usr_abc123",
"name": "Acme Store",
"email": "[email protected]",
"status": "ACTIVE",
"tier": "STANDARD",
"fee_rate": "0.01",
"environment": "live",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-10T08:00:00Z"
}Register a merchant
/v1/merchantsRegister a new merchant account — public endpoint, no auth required
Body parameters
namestringrequiredMerchant display name.
emailstringrequiredContact email address.
platform_user_idstringrequiredUnique user ID on your platform. Used for deduplication.
Returns Returns the Merchant object. New accounts start with status PENDING_KYB and operate in test mode.
Request
curl -X POST https://api.mpchat.com/v1/merchants \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Store",
"email": "[email protected]",
"platform_user_id": "usr_abc123"
}'Response 201
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"platform_user_id": "usr_abc123",
"name": "Acme Store",
"email": "[email protected]",
"status": "PENDING_KYB",
"tier": "BASIC",
"fee_rate": "0",
"environment": "test",
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
}API keys
/v1/merchants/api-keysList all API keys for your merchant account
No parameters.
Returns Returns an array of API key summaries. The secret is never returned after initial creation.
Request
curl https://api.mpchat.com/v1/merchants/api-keys \
-H "Authorization: Bearer mk_live_abc:{ts}:{sig}"Response 200
{
"api_keys": [
{
"key_id": "mk_live_01HQ8ZTXV...",
"name": "Production",
"environment": "live",
"is_active": true,
"created_at": "2024-01-15T10:01:00Z",
"last_used_at": "2024-01-15T14:00:00Z"
},
{
"key_id": "mk_test_01HQ8ABCD...",
"name": "Development",
"environment": "test",
"is_active": true,
"created_at": "2024-01-10T09:00:00Z",
"last_used_at": null
}
]
}/v1/merchants/api-keysCreate a new API key
🚨 Secret shown once
secret cannot be retrieved after creation. If lost, delete the key and create a new one.Body parameters
namestringoptionalHuman-readable label, e.g. "Production".
environmentstringrequiredEnvironment the key is valid for.One of: live, test
Returns Returns key_id and secret. The secret is shown only once — store it immediately.
Request
curl -X POST https://api.mpchat.com/v1/merchants/api-keys \
-H "Authorization: Bearer mk_live_abc:{ts}:{sig}" \
-H "Content-Type: application/json" \
-d '{"name": "Production", "environment": "live"}'Response 201
{
"key_id": "mk_live_01HQ8ZTXV...",
"secret": "4f3c2e1d0a9b8c7d6e5f4c3b2a109876543210abcdef...",
"name": "Production",
"environment": "live",
"created_at": "2024-01-15T10:01:00Z"
}/v1/merchants/api-keys/{key_id}Revoke an API key immediately
Path parameters
key_idstringrequiredThe key ID to revoke, e.g. mk_live_01HQ...
Returns Returns a confirmation message. Any in-flight requests using this key will fail immediately.
Request
curl -X DELETE \
https://api.mpchat.com/v1/merchants/api-keys/mk_live_01HQ8ZTXV... \
-H "Authorization: Bearer mk_live_abc:{ts}:{sig}"Response 200
{"message": "API key deleted"}See also: Error Reference