Skip to main content
The Challenge frame handles verification steps required by another flow. Two upstream flows mount it today:
  • The buy frame emits a challenge event with a URL — use that URL to mount the frame and complete the card transaction.
  • The identity flow mounts the frame directly to capture identity data (for example, document capture or liveness checks).
The frame is self-driving: after the handshake, there are no further parent-to-child messages. It sequences through all required verification steps and emits complete when the pipeline finishes. The complete and cancelled payloads are discriminated by flow so you can branch on the originating flow.

URL

For the buy flow, the URL is provided by the buy frame’s challenge event payload. For the identity flow, the URL is provided by the upstream identity verification call. In both cases, do not construct or modify the URL yourself.

Requirements

Size

Render the frame in a modal or full sheet so the customer can complete verification. The frame adapts to any size, but a full-screen or large modal works best for flows like 3D Secure that load bank-hosted pages.

Initialization parameters

Events

All events are dispatched using the message pattern described in the frames protocol. Below are the event payloads specific to the Challenge frame.

Outbound events

frame->parent These events are sent from this frame to the parent window.

handshake

The frame requests that you open a message channel.

ready

The challenge UI is rendered and visible to the customer.

complete

All required verification steps have resolved. Remove the challenge frame and branch on the discriminated payload:
  • flow: "buy" — the transaction pipeline finished. Remove the buy frame too and navigate to the confirmation screen.
  • flow: "identity" — the customer was verified. Use identityId to continue your onboarding flow.

cancelled

The customer dismissed the challenge. Remove the challenge frame and act on the discriminated payload:
  • flow: "buy" — remove the buy frame too, then offer a retry path. The payload carries transactionId and challengeToken (when known) so you can resume without restarting the pipeline.
  • flow: "identity" — offer a retry path or exit. No extra payload is emitted.

error

The challenge failed. Remove the challenge frame (and the buy frame, if the buy flow was driving it), then surface the message to the developer.
Common codes:

Inbound events

parent->frame These events are sent from the parent window to this frame.

ack

Acknowledge the handshake. This is the only message you send to the challenge frame — it is self-driving after the handshake.