HppResultMessage

Sent once, when the checkout ends, however it ends. Covers every terminal state via outcome, so this is the only "it's over" message you need to handle.

  • How many times the customer pressed Pay. Always 0 on error, since the form never loaded.

  • { message } describing the most recent failure: either a failed payment attempt, or, on error, why the session couldn't be loaded. null if nothing failed. Can be set even when outcome is completed, if earlier attempts failed before the one that succeeded. A decline never produces a message of its own: the customer stays in the iframe and can retry; declines only surface here, on the eventual result.

    Properties: 1
  • Answers exactly one question: how did the checkout end. completed once the customer submits (regardless of whether the payment itself succeeded). canceled if they left first. expired if the session's valid_until ran out before they submitted, whether caught by the page's own proactive timer while the tab sat open, or by the submit itself being blocked. error if the page could not even load the session (unreachable, invalid, or an already-expired link). Unlike the other outcomes, error means the customer was never shown the card form at all, so there is nothing left for them to do inside the iframe: treat it as terminal (e.g. close the iframe) rather than expect a later result.

    None of this is a payment-success indicator. Read payment_intent.status for that (watch for requires_capture: authorized but not yet captured, not a failure).

    values
    completedcanceledexpirederror
  • The complete, unserialized payment intent object from the hosted page's own confirmation step. Present whenever an attempt was made, including on a canceled or expired result if the customer tried and failed before giving up or running out of time, and null only when there was no attempt at all, which is always the case on error.

    Properties: 7