Create a payment link (v2)
PUThttps://core-prod.malipopay.co.tz/api/v1/payment
Creates a shareable payment link using the PaymentLinkIntentPayload schema.
Request
- application/json
- Body
- Example (auto)
Bodyrequired
amountnumberrequired
Amount the customer should pay.
Example:
120000phoneNumberstringrequired
Optional customer phone number to prefill on the checkout page.
Example:
255742200105{
"amount": 120000,
"phoneNumber": "255742200105"
}
Responses
- 200
- 400
- 401
- 500
Payment link created 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 -X PUT 'https://core-prod.malipopay.co.tz/api/v1/payment' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'apiToken: <apiToken>' \
-d '{
"amount": 120000,
"phoneNumber": "255742200105"
}'
Response