This endpoint is used to initiate a PayIn (deposit) transaction for a specific user via a selected Payment Service Provider (PSP).
The request includes both user and merchant-level authorization for secure transaction processing.
| Header Name | Value Format | Description |
|---|
| X-User-Authorization | Bearer token | JWT token identifying which provided by customer |
| Authorization | Bearer token | JWT token for merchant/API-level authentication, containing apiKey and secretKey. |
| Content-Type | application/json | Specifies that the request body format is JSON. |
On success, the API responds with a JSON object containing a transactionId and a redirectUrl (or payment URL), depending on the selected PSP.
All possible responses, along with their respective HTTP status codes, are detailed in this documentation.
The customer must complete the transaction using the provided redirectUrl.
Once the transaction is completed, the final status (success/failure) will be communicated to Mozarto via its webhook system.
Request
Provide your bearer token in the Authorization
header when making requests to protected resources. Example:Authorization: Bearer ********************
Body Params application/json
{
"baseamount": 101,
"userId": 1,
"pspType": "FORUMPAY",
"type": "PAYIN OR PAYOUT",
"currency": "AED"
}
Request Code Samples
curl --location --request POST 'https://backend.app.mozarto.io/v1/api/mozarto/cashier' \
--header 'X-User-Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjIiLCJlbWFpbCI6ImRpZ2JpamF5ZGFzOTlAZ21haWwuY29tIiwiaWF0IjoxNzUwMTQ5MzY4LCJleHAiOjE3NTAyMzU3Njh9.fyuAuoUpjpdIrSwfec69GG-HFDmW4VZxzZPzngcyB_w' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"baseamount": 101,
"userId": 1,
"pspType": "FORUMPAY",
"type": "PAYIN OR PAYOUT",
"currency": "AED"
}'
Responses
application/json {
"status": "success",
"message": "Successfully",
"isSuccess": true,
"data": {
"transactionId": "67f8dd931e7b94f7840faa62",
"pspTransactionId": "486b4108-d792-42e5-8330-d664c0bf240c",
"status": "PENDING",
"url": "https://cleopagos.com?id=fb-4ab1-9088-728",
"sessionId": "60a74sdf8-5bdd4-4273se-8csdfsdff-a74sdfsd17aeef42a"
}
}
Modified at 2025-08-12 09:27:16