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
    • CashLib
    • Cleo
    • Contiant
    • emerchantpay
    • Flexepin
    • ForumPay
    • Gigadat
    • Neosurf
    • OFApay
    • PayModum
    • PayOne
    • PawaPay
    • Trust Payments
    • Worldpay
  • 8. Redirect Flow APIs
    • Redirect Flow APIs - overview
    • Pay-In
      • Brite
      • CashLib
      • Cleo
      • Contiant
      • emerchantpay
      • Flexepin
      • Forumpay
      • Gigadat
      • Neosurf
      • OFApay
      • PayOne
      • PawaPay
      • Trust Payments
      • WorldPay
    • Pay-Out
      • Cleo
      • Forumpay
      • Gigadat withdraw ACH
      • Gigadat withdraw ETO
      • PawaPay
      • PayOne
      • Trust Payments
  • Webhook
    • ForumPay status webhook
    • PayOne status webhook
  • Schemas
    • TransactionData
  1. 7. Payment Providers (PSPs)

CashLib

Prepaid voucher payment method for European markets. Payers buy a CASHlib voucher offline (at a retail point of sale) and redeem the 16-digit PIN on a CashLib-hosted iframe launched from your cashier. Supports Pay-In only.
Operations: Pay-In ✓ | Pay-Out - | Webhook ✓
Processing: Asynchronous - the cashier call creates a session and returns an iframe URL. The payer enters their voucher PIN on the CashLib-hosted page; final status arrives via webhook
Payment type: Prepaid voucher (PIN-based)
Currency must match the country: CashLib charges in the local currency of the selected country. Supported pairs - France, Germany, Spain, Italy, Belgium, Netherlands, Austria, Portugal → EUR; United Kingdom → GBP; Switzerland → CHF; Poland → PLN; Czech Republic → CZK.
Amounts are converted to minor units when sent to CashLib: submit baseamount in major units (e.g. 1.97 EUR). Mozarto multiplies by 100 before calling CashLib. The webhook receives the amount in minor units ("197") and Mozarto converts it back to major units (1.97) before forwarding to your webhook.
CashLib requires a phone number: send phone in the request body. If you omit it, Mozarto falls back to the phone number on the authenticated user's profile (x-user-token). A phone in the body always takes precedence over the profile value. If neither is present the call is rejected with phone_number is required.
Fields marked with * are required.

Configuration (Mozarto back office)#

FieldDescription
accountName *Display name for this account
apiKey *CashLib merchant API key. Sent as the apikey header on every CashLib request. Stored per brand, encrypted at rest, and masked in the back office
mid *CashLib Merchant ID assigned by KAYROS/CashLib. Encrypted at rest
siteUrlBase URL used when a transaction does not send its own hppSuccessUrl / hppCancelUrl
webhookUrl *Your HTTPS endpoint that receives the final settlement notification
commentOptional free-text note for this configuration

Pay-In#

POST /v1/api/mozarto/cashier
Creates a CashLib voucher-payment session. Returns an iframe URL you must open (typically in a redirect or embed) so the payer can enter their 16-digit voucher PIN on the CashLib-hosted page. The final status arrives later via webhook.

Request body#

FieldTypeDescription
pspType *stringAlways "CASHLIB"
type *stringAlways "PAYIN"
baseamount *numberAmount in major units (e.g. 1.97 for €1.97). Mozarto converts to minor units before calling CashLib
currency *stringISO 4217 currency code. Must match the country's local currency (see currency-pair note above)
country *stringCountry name (e.g. "France") - display value used for reporting
countryCode *stringISO 3166-1 alpha-3 country code (e.g. "FRA"). This is what is sent to CashLib. Supported: FRA, DEU, ESP, ITA, BEL, NLD, AUT, PRT, GBR, CHE, POL, CZE
dob *stringPayer's date of birth in YYYY-MM-DD format
address *stringPayer's street address
city *stringPayer's city
zipcode *stringPayer's postal/ZIP code
phone *stringPayer's mobile number in international format (e.g. "33612345678"). Sent to CashLib as phone_number. Falls back to the authenticated user's profile phone when omitted - see the phone note above
hppSuccessUrl *stringURL the payer is redirected to after a successful redemption on the CashLib page
hppCancelUrl *stringURL the payer is redirected to if they cancel on the CashLib page
webhookUrlstringOverrides the configured webhookUrl for this transaction
merchantReferencestringYour reference, echoed back on the webhook

Example request#

{
  "pspType": "CASHLIB",
  "type": "PAYIN",
  "baseamount": 1.97,
  "currency": "EUR",
  "country": "France",
  "countryCode": "FRA",
  "dob": "1990-01-01",
  "address": "123 Main Street",
  "zipcode": "F-75001",
  "city": "Paris",
  "phone": "33612345678",
  "hppSuccessUrl": "https://example.com/success",
  "hppCancelUrl": "https://example.com/cancel",
  "merchantReference": "ORDER-4821"
}

Response#

{
  "status": "success",
  "message": "Successfully",
  "isSuccess": true,
  "data": {
    "redirectUrl": "https://backoffice-test.cashlib.com/purchase/...",
    "transactionId": "6a723e2b7ef5d966c4dcbd9c",
    "psp_transaction_id": "1152066205307-202608041708277320",
    "transaction_status": "Pending"
  }
}
FieldTypeDescription
redirectUrlstringCashLib-hosted iframe URL - open this so the payer can enter their voucher PIN
transactionIdstringMozarto transaction ID - use it to match the incoming webhook
psp_transaction_idstringCashLib's own transaction reference (echoed on the webhook as transaction_reference)
transaction_statusstringAlways "Pending" at this point. The final outcome arrives by webhook

Webhook#

Mozarto calls your webhookUrl when the transaction reaches a final state. CashLib notifies Mozarto on its own callback URL first; Mozarto then forwards a normalized notification to you.
Non-final statuses (e.g. still awaiting the payer to enter the PIN) are acknowledged with 200 OK but not forwarded. Duplicate terminal webhooks are also ignored (idempotency guard).

Payload example#

{
  "transaction_id": "6a723e2b7ef5d966c4dcbd9c",
  "psp_transaction_id": "1152066205307-202608041708277320",
  "user_id": "000000000000000000000001",
  "status": "success",
  "transaction_status": "Approved",
  "amount": 1.97,
  "currency": "EUR",
  "merchantReference": "ORDER-4821"
}
FieldDescription
transaction_idMozarto transaction ID - matches data.transactionId from the Pay-In response
psp_transaction_idCashLib's transaction reference
user_idThe user ID from the original transaction
statusRaw settlement result - success or the CashLib status string. Do not use for business logic
transaction_statusNormalized Mozarto status - "Approved", "Failed", or "Cancelled". Use this for all business logic
amountTransaction amount in major units (e.g. 1.97). Mozarto converts from CashLib's minor units before forwarding
currencyTransaction currency
merchantReferenceThe merchant reference passed in the original request - empty string if not set

Error codes#

The cashier call returns an error when the payment session cannot be created. Payer-side failures (invalid PIN, insufficient balance, etc.) are reported later through the webhook with transaction_status: "Failed", not on this call.
When CashLib returns a numeric status code that maps to a known Mozarto errorCode, the response carries the normalized code alongside the human message. Unmapped codes surface CashLib's raw error_message (whitespace-normalized) with no errorCode field.
HTTP statuserrorCodemessageWhen
400-PSP Configuration not found. Please check you psp ConfigurationThe CashLib apiKey or mid is missing from the back office configuration
400-The currency provided is not accepted in this country. Please use <X>.The currency sent does not match the country's local currency
400-Array of validation messages, e.g. ["phone_number is required"]A required payer field is missing. Most commonly phone, when neither the request body nor the authenticated user's profile supplies one. Raised by Mozarto before CashLib is called
400INVALID_PSP_CREDENTIALSPayment could not be processed due to invalid PSP credentials.CashLib returned numeric status 12 (Could not authenticate you.) - the merchant apiKey or mid is wrong
400-CashLib's error_message (whitespace-normalized)Any other CashLib rejection. The numeric CashLib status code is preserved under transactionDetails.pspStatusCode and the raw body under transactionDetails.pspResponse

Example error response#

{
  "status": "error",
  "message": "Payment could not be processed due to invalid PSP credentials.",
  "isSuccess": false,
  "errorCode": "INVALID_PSP_CREDENTIALS",
  "data": {
    "error": {
      "status": 12,
      "error_message": "Could not authenticate you."
    },
    "statusCode": 403
  },
  "transaction_status": "Failed"
}
For the full list of errorCode values and retryability guidance, see Errors.
Modified at 2026-09-14 11:34:13
Previous
Brite
Next
Cleo
Built with