Skip to main content
<MoonPayChallenge> renders a 3DS or identity challenge frame inline in your layout. It is the declarative alternative to client.setupChallenge(). Mount this component when a payment frame (Apple Pay, Google Pay, buy button, or buy frame) emits a "challenge" event. Pass the url from the event payload directly. Unmounting the component disposes the frame and stops event delivery.
PaymentScreen.tsx

Props

ChallengeEvent

Use event.kind to handle each event. CompleteResult is a discriminated union on flow: Cancellation is a discriminated union on flow: On "cancelled", carry transactionId and challengeToken to resume the transaction if needed.