Skip to main content

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
HeaderDescription
X-SIGNATUREThe signature header of the request

See 2-security.md for information about how to create a valid signature.

Request Parameters:

ParameterTypeDescription
customerstringCustomer mobile number Ex: +212655112233
agent_idstring(optional) ID of the agent/cashier performing the transaction
amountfloatThe amount to cashin to the customer
request_idstring(optional) The partner request id
timestringISO 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:

ParameterTypeDescription
statusstringthe status of the transaction (pending / approved / rejected)
mpay_uuidstringThe unique ID representing the operation
request_idstringThe unique ID of the request
timestringISO 8601 string representing the time the sale was completed
reasonstringthe reason of rejection
feestringthe 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"
}