Prepaid voucher payment method. Users pay using a Flexepin voucher PIN - no bank account or card required.Operations: Pay-In ✓ | Pay-Out - | Webhook -
Processing: Synchronous voucher redemption
Payment type: Prepaid voucher (PIN-based)Fields marked with * are required.
Configuration (Mozarto back office)#
These fields are in the locked API Credentials section of the account's Processing Scope tab. Unlock it with your 2FA code first - see Unlock API credentials.
| Field | Description |
|---|
accountName * | Display name for this account |
apiKey * | Flexepin API key (terminal ID) - identifies the merchant in the HMAC Authorization header |
secret * | Flexepin secret key - used to sign the HMAC request signature |
Pay-In#
POST /v1/api/mozarto/cashier
The user enters their Flexepin voucher PIN in your cashier before you call this endpoint.Request body#
| Field | Type | Description |
|---|
pspType * | string | Always "FLEXEPIN" |
type * | string | Always "PAYIN" |
voucherPin * | string | The Flexepin voucher PIN entered by the user |
baseamount * | number | Amount to redeem as a number (e.g. 25.00) |
currency * | string | Currency code (e.g. "EUR") |
currencyCode * | string | Currency code |
userId * | string | Your internal user/player identifier |
email * | string | User's email address |
country * | string | Payer's country - full name, ISO 3166-1 alpha-2, or alpha-3 (e.g. "Germany", "DE", "DEU"). See Country codes. Matched against the account's Processing Scope. Omit it and Mozarto geo-locates the caller's IP instead |
Example request#
{
"pspType": "FLEXEPIN",
"type": "PAYIN",
"voucherPin": "1234567890123456",
"baseamount": 25.00,
"currency": "EUR",
"currencyCode": "EUR",
"country": "DE",
"userId": "user_123",
"email": "player@example.com"
}
Responses#
200 - Success#
Returned when the voucher is validated and redeemed. data.result is "0".{
"status": "success",
"message": "Successfully",
"isSuccess": true,
"data": {
"result": "0",
"result_description": "Voucher redeemed successfully",
"status": "USED",
"currency": "EUR",
"value": 25.00,
"serial": "FP-9876543210",
"transactionId": "64a1f2b3c4d5e6f7a8b9c0d1",
"merchantReference": "",
"amount": 25.00
}
}
| Field | Description |
|---|
data.result | "0" indicates successful redemption |
data.result_description | Human-readable redemption outcome |
data.status | Voucher status after redemption - "USED" on success |
data.currency | Voucher currency - matches the currency in the request |
data.value | Voucher face value - matches baseamount |
data.serial | Flexepin voucher serial number |
data.transactionId | Mozarto transaction ID - use for idempotency checks |
data.amount | Transaction amount as a number |
400 - PSP error#
Two distinct failures return HTTP 400. Inspect errorCode first: when present, the failure is a normalized transport error; when absent, the failure is a voucher-level rejection.Normalized transport error. Flexepin rejected the request at the protocol level (for example, the HMAC terminal ID or secret is wrong, mapped from Flexepin HTTP 404/401/403). Use errorCode for programmatic handling.{
"status": "error",
"isSuccess": false,
"errorCode": "INVALID_PSP_CREDENTIALS",
"message": "Payment could not be processed due to invalid PSP credentials.",
"transactionId": "64a1f2b3c4d5e6f7a8b9c0d1",
"errors": []
}
Voucher-level rejection. The voucher itself is not redeemable: invalid PIN, mismatched currency, mismatched amount, or an already-redeemed voucher. These carry no errorCode; the reason is in message, with the raw Flexepin response in data when available.{
"status": "error",
"message": "Mismatched amount",
"isSuccess": false
}
{
"status": "error",
"message": "Invalid voucher PIN",
"isSuccess": false,
"data": {
"result": "4075",
"result_description": "Invalid voucher PIN"
}
}
| Field | Description |
|---|
errorCode | Normalized Mozarto error code. Present only on transport errors. See Error codes |
message | Human-readable failure reason |
transactionId | Mozarto transaction ID. Present on normalized transport errors |
data | Raw Flexepin voucher response, when the provider returned one |
500 - Internal error#
An unexpected server-side failure. The transaction is marked failed. Retry the request; if the failure persists, contact support with the transactionId.{
"status": "error",
"message": "Internal server error",
"isSuccess": false,
"data": "Something went wrong"
}
A transport error that Flexepin could not classify is normalized to UNKNOWN_PSP_ERROR and also returns HTTP 500, using the normalized error shape.{
"status": "error",
"isSuccess": false,
"errorCode": "UNKNOWN_PSP_ERROR",
"message": "An unexpected error occurred. Contact support if it continues.",
"transactionId": "64a1f2b3c4d5e6f7a8b9c0d1",
"errors": []
}
Flexepin does not support webhooks. The API response is the final result for this transaction.
Error codes#
Flexepin transport failures are mapped to normalized Mozarto errorCode values. Use errorCode for programmatic handling rather than parsing raw voucher response fields.Mozarto errorCode | PSP raw signal | When |
|---|
INVALID_PSP_CREDENTIALS | HTTP 404 / 401 / 403 | HMAC key or terminal ID is missing or rejected by Flexepin |
PSP_TIMEOUT | HTTP 408 or response body contains "timeout" | Flexepin did not respond in time - safe to retry |
PSP_UNAVAILABLE | HTTP 5xx | Flexepin service error - safe to retry with backoff |
PSP_RATE_LIMITED | HTTP 429 | Too many requests - retry after a delay |
UNKNOWN_PSP_ERROR | Any other response | Unrecognised transport error - check the raw response and contact support if it persists |
Voucher-level rejections (invalid PIN, mismatched currency/amount, already-redeemed voucher) arrive with HTTP 200 and are returned in the standard data field with the raw result_description; these are distinct from transport errors and do not produce an errorCode.For the full list of errorCode values and retryability guidance, see Errors. Modified at 2026-11-02 13:19:53