1. 4. Hosted page API
Mozarto - The Payments Orchestration Platform
  • 1. Introduction
  • 2. Authentication
  • 3. Redirect API
    • Pay-In Flow
    • Pay-Out Flow
    • Webhook Setup
    • Country Codes
    • Errors
    • Payment Providers (PSPs)
      • Overview
      • Brite
      • CashLib
      • Cleo
      • Contiant
      • emerchantpay
      • Flexepin
      • ForumPay
      • Gigadat
      • Neosurf
      • OFApay
      • PawaPay
      • PayModum
      • PayOne
      • Trust Payments
      • Worldpay
    • Sample requests
      • Overview
      • Pay-In
        • Brite
        • CashLib
        • Cleo
        • Contiant
        • emerchantpay
        • Flexepin
        • Forumpay
        • Gigadat
        • Neosurf
        • OFApay
        • PawaPay
        • Paymodum
        • PayOne
        • Trust Payments
        • WorldPay
      • Pay-Out
        • Cleo
        • Forumpay
        • Gigadat withdraw ACH
        • Gigadat withdraw ETO
        • OFApay
        • PawaPay
        • PayOne
        • Trust Payments
      • Webhook
        • PayOne status webhook
        • ForumPay status webhook
  • 4. Hosted page API
    • Pay-In Flow
    • Webhook Setup
    • Country Codes
    • Errors
    • Payment Providers (PSPs)
      • emerchantpay
      • Worldpay
      • Overview
    • Sample requests
      • Overview
  • Schemas
    • TransactionData
  1. 4. Hosted page API

Errors

Errors returned by POST /v1/api/mozarto/checkout/session.

HTTP status codes#

CodeMeaning
200 OKRequest succeeded
400 Bad RequestInvalid request body - missing required field or validation failure
401 UnauthorizedMissing or invalid brand JWT or user token
403 ForbiddenToken valid but action not permitted (e.g. a company key used to create a session)
404 Not FoundRoute not enabled for your environment
500 Internal Server ErrorUnexpected server error - retry with backoff

Authentication errors#

The Hosted page API uses the same headers as the Redirect API (see Authentication). A failed check returns 401 Unauthorized with a plain-text body, not JSON:
BodyCause
No token available, authorization denied!Authorization header missing or not a Bearer token
Invalid Token, authorization deniedBrand JWT invalid, or no brand matches its API key
External user auth token is missing!Neither x-user-token nor x-user-authorization is present
"Failed to Complete the Authentication Check"Unexpected error during the check (JSON string)
Read the body as text before parsing it as JSON.

Session errors#

The body has no errorCode. Branch on the HTTP status and message:
{
  "status": "error",
  "message": "country is required to resolve the payment configuration",
  "isSuccess": false
}
StatusmessageFix
403Checkout sessions require a brand API keyAuthenticate with a brand JWT, not a company JWT
400country is required to resolve the payment configurationSend country
400Country not supportedSend a value from Country codes
400currency is required as an ISO 4217 code, e.g. EURSend a three-letter currency code
400returnUrls.<key> must be an https URL (http only for localhost)Use https URLs in returnUrls
400amount is incorrectSend baseamount as a JSON number, not a string
400No active payment page is configured for this brand and countryActivate a Payment Page for the country in the back office
400PSP Configuration not found. Please check you psp ConfigurationConfigure a provider account whose Processing Scope covers the country and currency
404Not Found (body: {"error":{"message":"Not Found","status":404}})The Hosted page API is not enabled in this environment - contact Mozarto
Modified at 2026-10-29 16:47:06
Previous
Country Codes
Next
emerchantpay
Built with