Skip to main content
POST
/
api
/
v1
/
auth
/
merchants
Create master merchant (vendor) with default wallets
curl --request POST \
  --url https://crypto.westminister.tech/api/v1/auth/merchants \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "merchant1@gmail.com",
  "phone_number": "+254700000011",
  "first_name": "Alice",
  "last_name": "Merchant",
  "password": "secret",
  "kyc_status": "pending",
  "is_active": true,
  "pin": "123456"
}
'
{
  "message": "Merchant created successfully with default wallets",
  "merchant": {
    "id": "a2aeca1d-9686-4158-b4be-d0a3fd04760e",
    "email": "merchant1@gmail.com",
    "phone_number": "+254700000011",
    "first_name": "Alice",
    "last_name": "Merchant",
    "role": "vendor",
    "kyc_status": "pending",
    "is_active": true,
    "parent_vendor_id": null
  },
  "wallets": [
    {
      "id": "ee7104ad-4ac4-4a9f-aee5-3b0445c3b0d9",
      "network": "ethereum",
      "address": 8.481441789197193e+47,
      "is_default": true,
      "wallet_type": "hot"
    },
    {
      "id": "4284c38a-4d09-4534-8e9e-43ba65b66ef0",
      "network": "tron",
      "address": "TSQLub2pZZTmiBf1GUbJpjsx48dnuBj3nY",
      "is_default": false,
      "wallet_type": "hot"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
email
string<email>
required
phone_number
string
required

E.164 format (e.g. +2547xxxxxxx)

first_name
string
required
last_name
string
required
password
string<password>
required

Merchant password (min 6 chars).

kyc_status
enum<string>
required
Available options:
pending,
approved,
rejected
is_active
boolean
default:true
pin
string

Optional 6-digit PIN for PIN-based login.

Pattern: ^[0-9]{6}$

Response

201 - application/json

Merchant created with wallets

message
string
merchant
any
wallets
any[]