complete when the pipeline
finishes.
Unlike other setup methods, setupChallenge() takes a url provided by the
upstream flow’s challenge event or, for Customer API integrations, returned
in kyc.challenge by PATCH /platform/v1/customers/{id}/kyc. Pass it through
as-is and do not modify the URL yourself. If the URL doesn’t carry a
channelId query parameter, the SDK generates one automatically.
For more context, see the Handle
challenges guide.
Setup challenge
Parameters
This method does not require a separate auth token. The client uses stored
credentials from an active connection.
ChallengeEvent
onEvent receives events as the challenge flow progresses. Use event.kind to
decide how to handle each event. The complete and cancelled payloads are
discriminated by payload.flow so you can branch on the originating flow.
The challenge frame is self-driving. After acknowledging the initial
handshake, the SDK does not send further messages to the frame. The frame
internally handles all verification types automatically — including CVC
confirmation, 3D Secure, identity verification (KYC), Strong Customer
Authentication (SCA), micro-deposit authorization, and wallet ownership proof.
You never need to distinguish between them.
ChallengeCompleteResult
The complete payload is discriminated by flow:
ChallengeCancellation
The cancelled payload is discriminated by flow:
Transaction
This is the transaction object returned when the buy challenge completes. It uses the same FrameTransaction shape as setupBuy().
ChallengeEventError
Result
client.setupChallenge() returns a Result<ChallengeFrame, SetupChallengeError>.
Result envelope
Result<ChallengeFrame, SetupChallengeError>
ChallengeFrame
Unlike
setupBuy(), setupApplePay(), and setupGooglePay(), the
ChallengeFrame does not expose a setQuote() method. The challenge frame
runs to completion on its own.
SetupChallengeError
TS Definitions
TS Definitions
types.ts