curl -X POST "https://api.yourdomain.com/api/v1/merchants/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/operations" \
-H "Authorization: Bearer uwk_YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"operationType": "cash-out",
"amount": "20000.00",
"distributorToShortCode": "100000",
"memo": "Cash withdrawal"
}'
curl -X POST "https://api.yourdomain.com/api/v1/merchants/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/operations" \
-H "Authorization: Bearer uwk_YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"operationType": "pay-merchant",
"amount": "15000.00",
"merchantToShortCode": "100001",
"memo": "Wholesale payment"
}'
curl -X POST "https://api.yourdomain.com/api/v1/merchants/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/operations" \
-H "Authorization: Bearer uwk_YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"operationType": "pay-individual",
"amount": "3000.00",
"phoneTo": "+234 8123456781",
"memo": "Refund for order #1234"
}'
const axios = require('axios');
const response = await axios.post(
'https://api.yourdomain.com/api/v1/merchants/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/operations',
{
operationType: 'pay-merchant',
amount: '15000.00',
merchantToShortCode: '100001',
memo: 'Wholesale payment'
},
{
headers: {
'Authorization': 'Bearer uwk_YOUR_API_KEY_HERE',
'Content-Type': 'application/json'
}
}
);
console.log('Operation ID:', response.data.operationID);
import requests
response = requests.post(
'https://api.yourdomain.com/api/v1/merchants/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/operations',
json={
'operationType': 'pay-individual',
'amount': '3000.00',
'phoneTo': '+234 8123456781',
'memo': 'Refund for order #1234'
},
headers={'Authorization': 'Bearer uwk_YOUR_API_KEY_HERE'}
)
print('Operation ID:', response.json()['operationID'])
{
"operationID": "op_8b7c9d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e"
}
{
"type": "/problems/input-validation-problems",
"status": 400,
"title": "There are some validation errors",
"detail": "Please fix the validation issues and try again",
"errors": [
{
"type": "/problems/input-validation-problems/invalid-field",
"field": "amount",
"detail": "Amount must be a valid decimal number"
}
]
}
{
"type": "/problems/access-forbidden",
"status": 403,
"title": "Access Forbidden",
"detail": "API key does not have Perform Operations permission"
}
{
"type": "/problems/insufficient-balance",
"status": 403,
"title": "Insufficient Balance",
"detail": "Insufficient balance to complete this operation"
}
Merchant API
Create Operation
Create a new merchant operation (cash-out, pay-merchant, or pay-individual)
POST
/
api
/
v1
/
merchants
/
{merchantID}
/
operations
curl -X POST "https://api.yourdomain.com/api/v1/merchants/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/operations" \
-H "Authorization: Bearer uwk_YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"operationType": "cash-out",
"amount": "20000.00",
"distributorToShortCode": "100000",
"memo": "Cash withdrawal"
}'
curl -X POST "https://api.yourdomain.com/api/v1/merchants/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/operations" \
-H "Authorization: Bearer uwk_YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"operationType": "pay-merchant",
"amount": "15000.00",
"merchantToShortCode": "100001",
"memo": "Wholesale payment"
}'
curl -X POST "https://api.yourdomain.com/api/v1/merchants/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/operations" \
-H "Authorization: Bearer uwk_YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"operationType": "pay-individual",
"amount": "3000.00",
"phoneTo": "+234 8123456781",
"memo": "Refund for order #1234"
}'
const axios = require('axios');
const response = await axios.post(
'https://api.yourdomain.com/api/v1/merchants/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/operations',
{
operationType: 'pay-merchant',
amount: '15000.00',
merchantToShortCode: '100001',
memo: 'Wholesale payment'
},
{
headers: {
'Authorization': 'Bearer uwk_YOUR_API_KEY_HERE',
'Content-Type': 'application/json'
}
}
);
console.log('Operation ID:', response.data.operationID);
import requests
response = requests.post(
'https://api.yourdomain.com/api/v1/merchants/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/operations',
json={
'operationType': 'pay-individual',
'amount': '3000.00',
'phoneTo': '+234 8123456781',
'memo': 'Refund for order #1234'
},
headers={'Authorization': 'Bearer uwk_YOUR_API_KEY_HERE'}
)
print('Operation ID:', response.json()['operationID'])
{
"operationID": "op_8b7c9d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e"
}
{
"type": "/problems/input-validation-problems",
"status": 400,
"title": "There are some validation errors",
"detail": "Please fix the validation issues and try again",
"errors": [
{
"type": "/problems/input-validation-problems/invalid-field",
"field": "amount",
"detail": "Amount must be a valid decimal number"
}
]
}
{
"type": "/problems/access-forbidden",
"status": 403,
"title": "Access Forbidden",
"detail": "API key does not have Perform Operations permission"
}
{
"type": "/problems/insufficient-balance",
"status": 403,
"title": "Insufficient Balance",
"detail": "Insufficient balance to complete this operation"
}
Endpoint
POST /api/v1/merchants/{merchantID}/operations
Authentication
string
required
Bearer token with your API key. Must have Perform Operations permission.
string
required
Must be
application/jsonPath Parameters
string
required
The unique identifier of the merchant. Must match the merchant ID associated with the API key.
Request Body
Cash-Out Operation
string
required
Must be
"cash-out"string
required
Amount to withdraw (e.g., “20000.00”)
string
required
Distributor short code to withdraw to
string
Optional reference note or description for the operation
Pay Merchant Operation
string
required
Must be
"pay-merchant"string
required
Amount to pay (e.g., “15000.00”)
string
required
Destination merchant’s short code
string
Optional reference note or description for the operation
Pay Individual Operation
string
required
Must be
"pay-individual"string
required
Amount to pay (e.g., “3000.00”)
string
required
Recipient’s phone number in international format (e.g., “+234 8123456781”)
string
Optional reference note or description for the operation
Response
string
Unique identifier for the created operation
curl -X POST "https://api.yourdomain.com/api/v1/merchants/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/operations" \
-H "Authorization: Bearer uwk_YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"operationType": "cash-out",
"amount": "20000.00",
"distributorToShortCode": "100000",
"memo": "Cash withdrawal"
}'
curl -X POST "https://api.yourdomain.com/api/v1/merchants/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/operations" \
-H "Authorization: Bearer uwk_YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"operationType": "pay-merchant",
"amount": "15000.00",
"merchantToShortCode": "100001",
"memo": "Wholesale payment"
}'
curl -X POST "https://api.yourdomain.com/api/v1/merchants/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/operations" \
-H "Authorization: Bearer uwk_YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"operationType": "pay-individual",
"amount": "3000.00",
"phoneTo": "+234 8123456781",
"memo": "Refund for order #1234"
}'
const axios = require('axios');
const response = await axios.post(
'https://api.yourdomain.com/api/v1/merchants/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/operations',
{
operationType: 'pay-merchant',
amount: '15000.00',
merchantToShortCode: '100001',
memo: 'Wholesale payment'
},
{
headers: {
'Authorization': 'Bearer uwk_YOUR_API_KEY_HERE',
'Content-Type': 'application/json'
}
}
);
console.log('Operation ID:', response.data.operationID);
import requests
response = requests.post(
'https://api.yourdomain.com/api/v1/merchants/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/operations',
json={
'operationType': 'pay-individual',
'amount': '3000.00',
'phoneTo': '+234 8123456781',
'memo': 'Refund for order #1234'
},
headers={'Authorization': 'Bearer uwk_YOUR_API_KEY_HERE'}
)
print('Operation ID:', response.json()['operationID'])
{
"operationID": "op_8b7c9d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e"
}
{
"type": "/problems/input-validation-problems",
"status": 400,
"title": "There are some validation errors",
"detail": "Please fix the validation issues and try again",
"errors": [
{
"type": "/problems/input-validation-problems/invalid-field",
"field": "amount",
"detail": "Amount must be a valid decimal number"
}
]
}
{
"type": "/problems/access-forbidden",
"status": 403,
"title": "Access Forbidden",
"detail": "API key does not have Perform Operations permission"
}
{
"type": "/problems/insufficient-balance",
"status": 403,
"title": "Insufficient Balance",
"detail": "Insufficient balance to complete this operation"
}
Maker-Checker Workflow
Operations created via API follow the maker-checker approval pattern. The operation is created in a pending state and requires approval by a checker before execution.
- Operation is saved with status pending
- A checker with appropriate permissions must approve it via the web interface
- Once approved, the operation is executed on the blockchain
- The operation status changes to completed or failed
Related Endpoints
Get Balance
Check merchant balance before creating operations
Get Operations
Query operation history and status