Card payment processing through Trust Payments hosted Payment Pages. The cardholder enters card details on a Trust-hosted page, so no PAN, expiry, or CVV data passes through the Mozarto API.Operations: Pay-In ✓ | Pay-Out - | Webhook ✓
Processing: Asynchronous - redirect the user to a hosted page, then receive settlement by webhook
Payment type: Card (Visa, Mastercard), Apple Pay, and Google Pay, depending on what the site reference has enabled. All are collected on the Trust hosted Payment Pages.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 |
|---|
sitereference * | Trust Payments site reference |
siteSecurityPassword | Site security password. When set, requests are signed and success/failure redirect URLs are sent to Trust |
siteUrl | Default URL the cardholder returns to after payment, used when a transaction does not supply its own redirect URLs |
webhookUrl | Endpoint Mozarto calls with the settlement notification once the payment completes |
Pay-In#
POST /v1/api/mozarto/cashier
The cashier call does not charge the card directly. It creates a transaction and returns a paymentUrl. Redirect the cardholder to that URL to complete payment on the Trust hosted page.Request body#
| Field | Type | Description |
|---|
pspType * | string | Always "TRUST" |
type * | string | Always "PAYIN" |
baseamount * | number | Amount as a number (e.g. 100) |
currency * | string | Currency code (e.g. "EUR") |
userId * | string | Your internal user/player identifier |
merchantReference | string | Your reference for the order, echoed back in the response and webhook |
firstName | string | Cardholder first name, prefilled on the hosted page |
lastName | string | Cardholder last name, prefilled on the hosted page |
email | string | Cardholder email, prefilled on the hosted page |
phone | string | Cardholder phone number, prefilled on the hosted page |
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 and converted to alpha-2 to prefill the hosted page. Omit it and Mozarto geo-locates the caller's IP instead |
address | object | Billing address prefill. See address fields below |
hppSuccessUrl | string | URL the cardholder returns to after a successful payment. Overrides the configured siteUrl |
hppFailureUrl | string | URL the cardholder returns to after a failed or cancelled payment. Overrides the configured siteUrl |
Billing fields are optional. When supplied, they are forwarded to Trust to prefill the hosted page; they do not change whether the request is accepted.Do not send card data (pan, expiry, cvv) to this endpoint. The cardholder enters card details on the Trust hosted Payment Pages.
Address fields#
All address fields are optional and used only for prefill.| Field | Type | Description |
|---|
address.line1 | string | Street address line 1 |
address.line2 | string | Street address line 2 |
address.city | string | City |
address.state | string | State or region |
address.postalCode | string | Postal / ZIP code |
address.country | string | Country code |
Example request#
{
"pspType": "TRUST",
"type": "PAYIN",
"currency": "EUR",
"baseamount": 100,
"country": "GB",
"merchantReference": "ORDER-REF-001",
"userId": "64a1f2b3c4d5e6f7a8b9c0d2",
"phone": "+447911123456"
}
Response#
{
"status": "success",
"message": "Successfully",
"isSuccess": true,
"data": {
"paymentUrl": "https://backend.dev-app.mozarto.io/v1/transactions/trust/redirect/64a1f2b3c4d5e6f7a8b9c0d1?token=<redirect-token>",
"transactionId": "64a1f2b3c4d5e6f7a8b9c0d1",
"merchantReference": "ORDER-REF-001",
"amount": 100,
"transaction_status": "Pending"
}
}
| Field | Type | Description |
|---|
paymentUrl | string | Single-use URL to redirect the cardholder to. Expires five minutes after it is issued |
transactionId | string | Mozarto transaction identifier. Use it to match the settlement webhook |
merchantReference | string | Your reference from the request, or an empty string if none was sent |
amount | number | The transaction baseamount |
transaction_status | string | Always "Pending" at this point. The final outcome arrives by webhook |
Redirect the cardholder to paymentUrl. It serves a self-submitting form that posts to the Trust hosted Payment Pages, where the card details are entered. The paymentUrl is single-use and expires five minutes after it is issued.
Settlement webhook#
Once Trust settles the transaction, Mozarto sends a POST to your configured webhookUrl. The payload is the same shape for approvals and declines; read transaction_status for the outcome.{
"transaction_id": "64a1f2b3c4d5e6f7a8b9c0d1",
"psp_transaction_id": "<trust-transaction-reference>",
"user_id": "64a1f2b3c4d5e6f7a8b9c0d2",
"status": "SUCCESS",
"transaction_status": "Approved",
"message": "Transaction approved and successfully processed",
"amount": 100,
"merchantReference": "ORDER-REF-001"
}
| Field | Description |
|---|
transaction_id | Mozarto transaction identifier returned by the Pay-In call |
psp_transaction_id | Trust transaction reference |
user_id | The userId from the Pay-In request |
status | Raw Mozarto status (SUCCESS, FAILED, or CANCELLED) |
transaction_status | Normalized outcome - Approved, Failed, or Cancelled. Use this for business logic |
amount | Settled amount |
merchantReference | Your reference from the Pay-In request |
The request carries an Authorization header with a Mozarto-generated signature token. Verify it before applying any balance or state change. See Webhook Setup.
Error codes#
The Pay-In call returns an error when the request cannot be set up. Transaction declines are reported later through the settlement webhook with transaction_status: "Failed", not on this call.| HTTP status | Response | When |
|---|
| 400 | message: "PSP Configuration not found. Please check you psp Configuration" | Trust sitereference is missing from the back office configuration |
| 500 | errorCode / message from the normalized error set | Unexpected server error while preparing the hosted payment |
For the full list of errorCode values and retryability guidance, see Errors. Modified at 2026-11-02 13:21:46