1. 7. Payment Providers (PSPs)
Mozarto - The Payments Orchestration Platform
  • 1. Introduction
  • 2. Quick Start
  • 3. Authentication
  • 4. Webhook Setup
  • 5. Errors
  • 6. Redirect flow
    • Pay-In Flow
    • Pay-Out Flow
  • 7. Payment Providers (PSPs)
    • Overview
    • Brite
    • Cleo
    • Contiant
    • emerchantpay
    • Flexepin
    • ForumPay
    • Gigadat
    • Neosurf
    • PayOne
    • PawaPay
    • Trust Payments
    • Worldpay
  • 8. Redirect Flow APIs
    • Redirect Flow APIs - overview
    • Pay-In
      • Brite
      • Cleo
      • Contiant
      • emerchantpay
      • Flexepin
      • Forumpay
      • Gigadat
      • Neosurf
      • PayOne
      • PawaPay
      • Trust Payments
      • WorldPay
    • Pay-Out
      • Cleo
      • Gigadat withdraw ETO
      • Gigadat withdraw ACH
      • Forumpay
      • PayOne
      • PawaPay
  • Webhook
    • Payone status webhook
  • Schemas
    • TransactionData
  1. 7. Payment Providers (PSPs)

Cleo

Bank transfer payment provider for Latin American markets (Chile, Peru, Mexico). Chile is processed through the Fintoc bank widget on Cleo's hosted page. Supports Pay-In and Pay-Out.
Operations: Pay-In ✓ | Pay-Out ✓ | Webhook ✓
Processing: Asynchronous - redirect user to Cleo's hosted page; final status via webhook
Markets: Chile (CLP), Peru (PEN), Mexico (MXN)
Currency: Cleo processes only the local currency of the selected market. The currency is derived from the country you send (Chile → CLP, Peru → PEN, Mexico → MXN); Cleo returns the effective currency from its country settings, so the amount is charged in that local currency.
Fields marked with * are required.

Configuration (Mozarto back office)#

FieldDescription
accountName *Display name for this account
cleoApiKey.chileApiKey *API key for Chile (CL) transactions
cleoApiKey.peruApiKey *API key for Peru (PE) transactions
cleoApiKey.mexicoApiKey *API key for Mexico (MX) transactions
siteUrl *Your site URL - Cleo redirects the user here after a Pay-In. This configured value is always used; it cannot be overridden per transaction
webhookUrl *Your HTTPS endpoint for transaction status updates
The correct regional API key is selected automatically from the country sent in the transaction request.

Pay-In#

POST /v1/api/mozarto/cashier
The user is redirected to Cleo's hosted page (Fintoc widget for Chile) to complete the bank transfer. The final status arrives later via webhook.

Request body#

FieldTypeDescription
pspType *stringAlways "CLEO"
type *stringAlways "PAYIN"
baseamount *numberAmount as a number (e.g. 10000)
currency *stringCurrency code (e.g. "CLP", "PEN", "MXN"). Used only as a fallback - the effective currency is derived from country (see the currency note above)
country *stringMarket to process the transaction in. Must be "Chile", "Peru", or "Mexico" - selects the regional API key and local currency
userId *stringYour internal user/player identifier - also used as Cleo's customer external key
email *stringUser's email address - used as the customer external key when userId is absent
merchantReferencestringYour reference, echoed back in the response and webhook

Example request#

{
  "pspType": "CLEO",
  "type": "PAYIN",
  "baseamount": 10000,
  "currency": "CLP",
  "country": "Chile",
  "userId": "user_123",
  "email": "player@example.com",
  "merchantReference": "ORDER-4821"
}

Response#

{
  "status": "success",
  "message": "Successfully",
  "isSuccess": true,
  "data": {
    "status": "PENDING",
    "url": "https://checkout.cleo.finance/...",
    "sessionId": "60a74038-5b94-427e-8cff-abc123",
    "transactionId": "64a1f2b3c4d5e6f7a8b9c0d1",
    "merchantReference": "ORDER-4821",
    "amount": 10000
  }
}
FieldDescription
data.urlCleo hosted payment page URL - redirect the user here
data.sessionIdCleo session identifier - used to match the incoming webhook to the transaction
data.statusInitial Cleo status - "PENDING" on creation
data.transactionIdMozarto transaction ID - use for status queries and idempotency
data.merchantReferenceThe merchant reference passed in the request - empty string if not set
data.amountTransaction amount as a number

Pay-Out#

POST /v1/api/mozarto/cashier
Uses the same request body as Pay-In with type set to "PAYOUT". Pay-Out is not redirect-based - no data.url is returned; the final status arrives via webhook.

Response#

{
  "status": "success",
  "message": "Successfully",
  "isSuccess": true,
  "data": {
    "status": "PENDING",
    "sessionId": "60a74038-5b94-427e-8cff-abc123",
    "transactionId": "64a1f2b3c4d5e6f7a8b9c0d1",
    "merchantReference": "ORDER-4821",
    "amount": 10000
  }
}

Webhook#

Mozarto calls your webhookUrl when the transaction reaches a final state. Cleo notifies Mozarto on its own callback URL first; Mozarto then forwards a normalized notification to you.
The method field will be CLEO_PAYIN or CLEO_PAYOUT.

Payload example#

{
  "transaction_id": "64a1f2b3c4d5e6f7a8b9c0d1",
  "user_id": "000000000000000000000001",
  "status": "SUCCESS",
  "transaction_status": "Approved",
  "message": "Transaction completed successfully",
  "amount": 10000,
  "merchantReference": "ORDER-4821"
}
FieldDescription
transaction_idMozarto transaction ID - matches data.transactionId from the Pay-In/Pay-Out response
user_idThe user ID from the original transaction
statusRaw Cleo status - do not use for business logic (Pay-In success is SUCCESS, Pay-Out success is PAID)
transaction_statusNormalized Mozarto status - "Approved" or "Declined". Use this for all business logic
messageHuman-readable description of the outcome
amountTransaction amount as a number
merchantReferenceThe merchant reference passed in the original request - empty string if not set

Error codes#

Cleo Pay-In transport failures are mapped to normalized Mozarto errorCode values. Use errorCode for programmatic handling rather than parsing the raw Cleo response.
Mozarto errorCodePSP raw signalWhen
INVALID_PSP_CREDENTIALSHTTP 404 / 401 / 403Cleo API key (per-country) is missing, wrong, or the account is not active
PSP_TIMEOUTHTTP 408 or response body contains "timeout"Cleo did not respond in time - safe to retry
PSP_UNAVAILABLEHTTP 5xxCleo service error - safe to retry with backoff
PSP_RATE_LIMITEDHTTP 429Too many requests - retry after a delay
UNKNOWN_PSP_ERRORAny other responseUnrecognised error - check the raw response and contact support if it persists
A missing or invalid country (not one of Chile, Peru, Mexico) is rejected before the Cleo call with an HTTP 400 and the message "Invalid country selected. Please choose either Chile, Peru, or Mexico."
For the full list of errorCode values and retryability guidance, see Errors.
Modified at 2026-07-28 13:30:25
Previous
Brite
Next
Contiant
Built with