Pay-In Flow#
Pay-In transactions use Mozarto's redirect flow: your backend initiates the Pay-In, Mozarto returns a hosted payment page URL, and your frontend redirects the user to complete payment. The final outcome arrives asynchronously via webhook.How it works#
The Pay-In API call returns quickly (transaction/session created). The final status arrives later via webhook.Endpoint#
POST /v1/api/mozarto/cashier
Include the required authentication headers:Authorization: Bearer <company-jwt>
x-user-token: Bearer <user-token>
Content-Type: application/json
Common request fields#
Fields marked with * are required.| Field | Type | Description |
|---|
pspType * | string | Payment provider code (e.g. "FORUMPAY", "GIGADAT") - see PSP pages for the full list |
type * | string | Always "PAYIN" for Pay-In |
baseamount * | number | Pay-In amount as a number (e.g. 50.00) |
currency * | string | Currency code (e.g. "EUR") |
userId * | string | Your internal user/player identifier |
email * | string | User's email address |
country | string | User's country code (e.g. "DE") - required for some providers |
brandId | string | Brand identifier for multi-brand setups |
Some providers require additional fields. See each PSP page for the exact payload.
Response (redirect URL)#
A successful response always has this shape:{
"status": "success",
"message": "Successfully",
"isSuccess": true,
"data": {
"status": "PENDING",
"url": "https://payment-provider.com/pay/session/xyz",
"sessionId": "60a74038-5b94-427e-8cff-abc123"
}
}
| Field | Description |
|---|
data.url | Hosted payment page URL - redirect the user here |
data.sessionId | Session identifier - use for transaction status queries |
data.status | Initial transaction status - always PENDING on creation |
Redirect the user to data.url.
Redirecting the user#
Set a pending state before redirecting - the payment outcome does not arrive on return from the PSP page, it arrives later via webhook.Do not treat the user returning from the PSP page as payment confirmation. The PSP return URL is a UI navigation event only - it carries no authoritative outcome. The only authoritative source of truth is the transaction_status delivered via webhook. Keep the pending state visible until the webhook fires.
Your UI must handle the following states explicitly:
Pay-In APIs#
For the full request and response reference for each Pay-In provider, see the Pay-In APIs in the left sidebar. Example: ForumPay Pay-In.
Webhook result#
Mozarto calls your configured webhookUrl when the transaction reaches a final state. For payload details, security, duplicate handling, and local testing, see Webhook Setup.Modified at 2026-05-08 07:35:57