1. 5. Redirect flow
Mozarto - The Payments Orchestration Platform
  • 1. Introduction
  • 2. Quick Start
  • 3. Authentication
  • 4. Errors
  • 5. Redirect flow
    • Pay-In Flow
    • Pay-Out Flow
    • Webhook Setup
  • 6. Payment Providers (PSPs)
    • Overview
    • Brite
    • Cleo
    • Flexepin
    • ForumPay
    • Gigadat
    • Neosurf
    • Payone
    • Trust Payments
    • WorldPay
  • 7. Redirect Flow APIs
    • PayIn
      • Forumpay
      • Payone
    • PayOut
      • Forumpay
      • Payone
  • Schemas
    • TransactionData
  1. 5. Redirect flow

Pay-In Flow

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.
FieldTypeDescription
pspType *stringPayment provider code (e.g. "FORUMPAY", "GIGADAT") - see PSP pages for the full list
type *stringAlways "PAYIN" for Pay-In
baseamount *numberPay-In amount as a number (e.g. 50.00)
currency *stringCurrency code (e.g. "EUR")
userId *stringYour internal user/player identifier
email *stringUser's email address
countrystringUser's country code (e.g. "DE") - required for some providers
brandIdstringBrand 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"
  }
}
FieldDescription
data.urlHosted payment page URL - redirect the user here
data.sessionIdSession identifier - use for transaction status queries
data.statusInitial 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
Previous
5. Redirect flow
Next
Pay-Out Flow
Built with