MPay cash-in
Endpoint url
This endpoint perform an mpay cashin for giving customer mobile_number and an amount
POST /api/v1/shops/<shop_uuid>/mpay-partner-cashin
Authentication
- Uses signature authentication
| Header | Description |
|---|---|
X-SIGNATURE | The signature header of the request |
See 2-security.md for information about how to create a valid signature.
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
customer | string | Customer mobile number Ex: +212655112233 |
agent_id | string | (optional) ID of the agent/cashier performing the transaction |
amount | float | The amount to cashin to the customer |
request_id | string | (optional) The partner request id |
time | string | ISO 8601 string representing the time the sale was completed |
Sample Request:
{
"customer": "+212655112233",
"amount": 10.15,
"agent": "code-agent",
"request_id": "f8080959-554e-4cc5-89b1-f10c616d5858",
"time": "2025-04-07T17:20:30+01:00"
}
Response
Response Parameters:
| Parameter | Type | Description |
|---|---|---|
status | string | the status of the transaction (pending / approved / rejected) |
mpay_uuid | string | The unique ID representing the operation |
request_id | string | The unique ID of the request |
time | string | ISO 8601 string representing the time the sale was completed |
reason | string | the reason of rejection |
fee | string | the calculated fee for the transaction |
Sample Response:
Status Code: 201 Created
{
"status" : "approved",
"mpay_uuid": "269cac45-0684-4338-8831-9d3f7324106d",
"request_id": "f8080959-554e-4cc5-89b1-f10c616d5858",
"time": "2025-04-07T17:20:30+01:00",
"reason" : "",
"fee": "2.50"
}
Status Code: 418 Error
{
"status" : "rejected",
"mpay_uuid": "269cac45-0684-4338-8831-9d3f7324106d",
"request_id": "f8080959-554e-4cc5-89b1-f10c616d5858",
"time": "2025-04-07T17:20:30+01:00",
"reason" : "Requested amount is above customer current KYC level",
"fee": "0.00"
}