Initiate a payment
POSThttps://core-prod.malipopay.co.tz/api/v1/payment
Creates a new payment intent (collection or disbursement) for the project.
Request
- application/json
- Body
- Example (auto)
Bodyrequired
modestringrequired
Direction/type of the payment.
Possible values: [PAYOUT, CHARGE, REFUND]
Example:
CHARGEamountnumberrequired
Amount in the smallest currency unit (e.g. TZS).
Example:
1000referencestringnullable
Optional merchant reference. Left empty for server-generated.
Example:
ORDER-2026-0091currencystringnullable
Three-letter currency code. Defaults to TZS.
Possible values: [TZS, USD, NGN]
Example:
TZSpaymentMethodDetails objectrequired
customer object
{
"mode": "CHARGE",
"amount": 1000,
"reference": "ORDER-2026-0091",
"currency": "TZS",
"paymentMethodDetails": {
"type": "MPESA_TZ_PUSH",
"phoneNumber": "255742200105",
"cardNumber": 0,
"expiryMonth": 0,
"expiryYear": 0,
"holderName": "string",
"brand": "string",
"cvc": 0
},
"customer": {
"email": "jane@example.com",
"phoneNumber": "255742200105",
"firstname": "JANE",
"lastname": "DOE",
"billingAddress": {
"address": "Mikocheni, Plot 14",
"alternativeAddress": "",
"city": "Dar es Salaam",
"region": "Dar es Salaam",
"postcode": "14112",
"country": "TZ"
}
}
}
Responses
- 201
- 400
- 401
- 500
Payment initiated successfully
- application/json
- Schema
- Example (auto)
Schema
successbooleanrequired
Example:
truecodeintegerrequired
MALIPOPAY-specific status code (see error codes reference)
Example:
800messagestringrequired
Example:
Operation completed successfullydata object
{
"success": true,
"code": 800,
"message": "Operation completed successfully",
"data": {}
}
Bad request or validation error
- application/json
- Schema
- Example (auto)
Schema
codeint32required
messagestringrequired
{
"code": 0,
"message": "string"
}
Unauthorized
- application/json
- Schema
- Example (auto)
Schema
codeint32required
messagestringrequired
{
"code": 0,
"message": "string"
}
Internal server error
- application/json
- Schema
- Example (auto)
Schema
codeint32required
messagestringrequired
{
"code": 0,
"message": "string"
}
Authorization: apiToken
name: apiTokentype: apiKeyin: headerdescription: Project API key. Get yours from the Malipopay dashboard under Settings → API Keys.
- curl
- python
- nodejs
- php
- java
- go
- CURL
curl -L 'https://core-prod.malipopay.co.tz/api/v1/payment' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'apiToken: <apiToken>' \
--data-raw '{
"mode": "CHARGE",
"amount": 1000,
"reference": "ORDER-2026-0091",
"currency": "TZS",
"paymentMethodDetails": {
"type": "MPESA_TZ_PUSH",
"phoneNumber": "255742200105",
"cardNumber": 0,
"expiryMonth": 0,
"expiryYear": 0,
"holderName": "string",
"brand": "string",
"cvc": 0
},
"customer": {
"email": "jane@example.com",
"phoneNumber": "255742200105",
"firstname": "JANE",
"lastname": "DOE",
"billingAddress": {
"address": "Mikocheni, Plot 14",
"alternativeAddress": "",
"city": "Dar es Salaam",
"region": "Dar es Salaam",
"postcode": "14112",
"country": "TZ"
}
}
}'
Response