On Flow Ended
Triggered once, when the session finishes — with the results of what it connected, or with the reason it has none.
This is the event that means finished. Its payload carries is_closed: true at the top — however the session ended, with an aes_key or without one —, and that field, not the widget closing nor your customer leaving, is what tells you a session is over and its results are final.
What data carries, and what actually travels
The schema below describes data decrypted — on purpose, so this reference has a model you can read and code against. What arrives at your endpoint depends on how the session was created:
- With an
aes_key:datais a single string,aes::Base64(IV + Ciphertext + Tag). Decrypt it and you get exactly the object documented below. The walkthrough and the code are in Payload Encryption. - Without an
aes_key:datais not in the body at all — absent, notnull. Your customer’s financial records never travel in the clear: read them from Get Session Results.
Cancelled by your customer, cancelled by you before anything was connected, timed out, failed: status_code says which, and data then carries the reason rather than the records — user_feedback with what your customer answered in the cancellation dialog, system_feedback when the platform is what stopped it. No results are coming afterwards.
messages: what the session found, beside what it read. The messages list carries the situations the session detected — most sessions carry none. Route the flag ones: they mean the session found something about your customer or their data that deserves a decision on yours, such as two banks that disagree about who your customer is. Automate on message_id, never on the wording.
Events are delivered at least once: deduplicate by session_id and event.
Answer 2xx as soon as the payload reaches you, whatever your processing does with it afterwards: any other status is recorded as a failed delivery even though the event arrived. Answering a delivery has the handler to copy.
Payload
Payload class discriminator — always this value for Financial Rider events.
The event type: ended.
Always true: the session is over and its results are final — however it ended, and whether
data travels or not. This field, not the widget closing, is what says a session is finished.
The session’s final results.
- Documented decrypted, delivered encrypted. With an
aes_keyon the session this field is theaes::Base64(IV + Ciphertext + Tag)string of the object described here, which decrypts into the session results; without one it is not in the body at all, and the results are read from the session results endpoint instead. - A session that ended without results — cancelled, timed out, failed — carries the reason
instead, as
WebhookEndedErrorPayload.