1. Cashier APIs
  • Introduction
  • Transaction Flow: PayIn
  • Transaction Flow: PayOut
  • Merchant Endpoint Setup
  • Cashier APIs
    • PayIn Transaction
      POST
    • PayOut Transaction
      POST
    • User Verification Endpoint (X-User-Authorization)
      POST
    • Webhook Endpoint
      POST
  • PSP Configuration
    • ForumPay Configuration (Crypto)
  • Schemas
    • Sample Schemas
      • Pet
      • Category
      • Tag
  1. Cashier APIs

PayIn Transaction

POST
/v1/api/mozarto/cashier
Endpoint:
Method: POST
Url: https://backend.app.mozarto.io/v1/api/mozarto/cashier
Description:
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.
Request Headers
Header NameValue FormatDescription
X-User-AuthorizationBearer tokenJWT token identifying which provided by customer
AuthorizationBearer tokenJWT token for merchant/API-level authentication, containing apiKey and secretKey.
Content-Typeapplication/jsonSpecifies that the request body format is JSON.
Response
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

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params

Body Params application/json

Example
{
    "baseamount": 101,
    "userId": 1,
    "pspType": "FORUMPAY",
    "type": "PAYIN OR PAYOUT",
    "currency": "AED"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
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

🟢200PayIn OK
application/json
Body

Examples
{
    "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"
    }
}
🔴500Server Error
🟠400Bad Request
Modified at 2025-08-12 09:27:16
Previous
Cashier APIs
Next
PayOut Transaction
Built with