{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"SDK Reference","type":"markdown"},"seo":{"title":"JourneyEvent","description":"Everything about Mosaic Journeys, SDKs, and APIs","siteUrl":"https://developer.transmitsecurity.com"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"journeyevent","__idx":0},"children":["JourneyEvent"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Payload delivered to the listener registered with ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-ref/cordova-ts-identity-orchestration/functions#addjourneyresponselistener"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["addJourneyResponseListener()"]}]},". ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["response"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["instruction"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"response","__idx":1},"children":["Response"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A journey step, including terminal success and rejection."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"{\n  type: 'response',\n  journeyStepId: 'emailOTPAuthentication',\n  response: {\n    journeyStepId: 'emailOTPAuthentication',\n    journeyStepIdRaw: 'transmit_platform_email_otp_authentication',\n    data: {},\n    clientResponseOptions: {},\n    token: '',\n    code: '',\n    errorData: { code: '', message: '' },\n  },\n}\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"journeystepid","__idx":2},"children":["journeyStepId"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["journeyStepId"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Copy of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["response.journeyStepId"]},", normalized across iOS and Android. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-ref/cordova-ts-identity-orchestration/enums/steps"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["STEPS"]}]},". A custom or unrecognized action is passed through as its raw identifier."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"responsedata","__idx":3},"children":["response.data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Optional"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["data"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Object"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Free-form step payload."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"responseclientresponseoptions","__idx":4},"children":["response.clientResponseOptions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Optional"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["clientResponseOptions"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Object"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Options the step accepts. Each option can include ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["label"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["schema"]},". ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clientInput"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cancel"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fail"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["resend"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["custom"]},". Submit the chosen option with ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-ref/cordova-ts-identity-orchestration/functions#submitclientresponse"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["submitClientResponse()"]}]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"{\n  clientInput: {\n    id: 'clientInput',\n    label: 'Verify',\n    type: 'clientInput',\n    schema: [{ name: 'passcode', type: 'string', optional: false }],\n  },\n  resend: { id: 'resend', label: 'Resend code', type: 'resend' },\n  cancel: { id: 'cancel', label: 'Cancel', type: 'cancel' },\n}\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The plugin accepts the camelCase tokens above and the snake_case ids the server may put on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["option.id"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_input"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["action_failure"]},"). Pass either form to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["submitClientResponse"]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"responsetoken","__idx":5},"children":["response.token"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Optional"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["token"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Present on success."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"responsecode","__idx":6},"children":["response.code"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Optional"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["code"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Token-exchange code. Present on success."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"responseerrordata","__idx":7},"children":["response.errorData"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Optional"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["errorData"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ code: string, message: string }"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Present on a retryable step error, such as a wrong one-time passcode. The journey is still on that step."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"responsejourneystepidraw","__idx":8},"children":["response.journeyStepIdRaw"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["journeyStepIdRaw"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Step id as the native SDK reported it, before normalization."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"instruction","__idx":9},"children":["Instruction"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A side-channel instruction. Current types are PIN registration commit and PIN deletion commit. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-ref/cordova-ts-identity-orchestration/enums/instructions"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INSTRUCTIONS"]}]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"{\n  type: 'instruction',\n  instruction: { type: 'pinCodeRegistrationCommit', typeRaw: '', stepId: '', data: {} },\n}\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"instructiontype","__idx":10},"children":["instruction.type"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["type"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Normalized instruction type."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"instructiontyperaw","__idx":11},"children":["instruction.typeRaw"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["typeRaw"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Instruction type as the native SDK reported it."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"instructionstepid","__idx":12},"children":["instruction.stepId"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["stepId"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Step that emitted the instruction."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"instructiondata","__idx":13},"children":["instruction.data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["data"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Object"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Instruction payload."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"error","__idx":14},"children":["Error"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A journey failure. Argument and other synchronous failures reject the method Promise instead. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-ref/cordova-ts-identity-orchestration/functions#promise-rejection-codes"},"children":["Promise rejection codes"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"{\n  type: 'error',\n  error: { code: 'networkError', message: '' },\n}\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error.code"]}," is the same string on iOS and Android:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["notInitialized"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["noActiveJourney"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["networkError"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clientResponseNotValid"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["serverError"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invalidInitializationOptions"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invalidStateString"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["internalError"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deviceRegistrationError"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deviceValidationError"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invalidCredentials"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expiredOTPPasscode"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expiredValidationPasscode"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["maxResendReached"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["missingRequestIdInApprovalPayload"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Android also reports Identity Verification failures on this channel: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["idvCameraPermissionRequired"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["idvSdkDisabled"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["idvSessionNotValid"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["idvInitializationError"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["idvNotInitialized"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["idvCanceled"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["idvInternalError"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["idvNotAvailable"]},". The iOS SDK 1.2.5 has no equivalent cases, so the same failure arrives there as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["internalError"]},". Treat an unrecognized code as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["internalError"]},"."]}]},"headings":[{"value":"JourneyEvent","id":"journeyevent","depth":1},{"value":"Response","id":"response","depth":2},{"value":"journeyStepId","id":"journeystepid","depth":3},{"value":"response.data","id":"responsedata","depth":3},{"value":"response.clientResponseOptions","id":"responseclientresponseoptions","depth":3},{"value":"response.token","id":"responsetoken","depth":3},{"value":"response.code","id":"responsecode","depth":3},{"value":"response.errorData","id":"responseerrordata","depth":3},{"value":"response.journeyStepIdRaw","id":"responsejourneystepidraw","depth":3},{"value":"Instruction","id":"instruction","depth":2},{"value":"instruction.type","id":"instructiontype","depth":3},{"value":"instruction.typeRaw","id":"instructiontyperaw","depth":3},{"value":"instruction.stepId","id":"instructionstepid","depth":3},{"value":"instruction.data","id":"instructiondata","depth":3},{"value":"Error","id":"error","depth":2}],"frontmatter":{"title":"JourneyEvent","seo":{"title":"JourneyEvent"}},"lastModified":"2026-11-01T13:07:28.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/sdk-ref/cordova-ts-identity-orchestration/interfaces/journeyevent","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}