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

Webhook Setup

Mozarto sends the final status of every Hosted page API payment to your webhook URL. The payload, signature, and retries are the same as for the Redirect API, so one endpoint handles both. Use the webhook, not browser events or return URLs, to credit an account or fulfil an order.

When Mozarto sends it#

Mozarto sends one webhook each time a payment reaches a final status:
transaction_statusSent when
ApprovedThe provider approved the payment
DeclinedThe provider or the issuer declined the payment, including a failed 3D Secure authentication
FailedThe provider returned a technical error
No webhook is sent while a payment is pending or in 3D Secure. A resent provider notification with the same status does not trigger a second webhook. If a provider later changes the status, Mozarto sends a new webhook with the new status.

Where Mozarto sends it#

Mozarto sends the webhook to the Webhook URL, and any additional webhook URLs, configured on the provider account that processed the payment (Payments Module - Processing Scope tab - API Credentials). The URLs are not set in the session request.

Payload#

{
  "transaction_id": "6adf517cc7d44034bd18d020",
  "psp_transaction_id": "a80f9ea4af542913ec5930837e54bee8",
  "user_id": "user_123",
  "status": "SUCCESS",
  "transaction_status": "Approved",
  "message": "Transaction approved and successfully processed",
  "amount": "14",
  "currency": "EUR",
  "merchantReference": "ORDER-4821"
}
FieldTypeDescription
transaction_idstringMozarto transaction ID. Matches transactionId in the MOZARTO_HPP_FINAL_STATUS browser event
psp_transaction_idstringThe provider's reference for the payment
user_idstringuserId from the user token used to create the session
statusstringInternal status. Do not use it for business logic
transaction_statusstringNormalized status: Approved, Declined, or Failed. Use this for business logic
messagestringHuman-readable outcome. For a decline, the provider's reason when available
amountstringSession baseamount
currencystringSession currency
merchantReferencestringmerchantReference from the session request. Empty string if not sent

Verify, acknowledge, and de-duplicate#

Handle the webhook exactly as described in Webhook Setup:
Verify the Authorization header before changing any balance or order.
Respond with a 2xx status within 5 seconds. Failed deliveries are retried for about 10.5 hours.
Use the X-Webhook-Id header to ignore duplicates. A retry carries the same ID.

Example flow#

Modified at 2026-11-03 08:10:23
Previous
Pay-In Flow
Next
Country Codes
Built with