Flow Webhooks

Subscribe to Webhook events for data submitted through flows

Description

Webhooks provide a simple method for obtaining automated data from Attestr servers without having to directly access the APIs to retrieve the data that end users provide utilising flows. For information related to webhook configuration, please refer to Webhooks. Flows support following three types of events.

  1. flowx.completed
  2. flowx.skipped
  3. flowx.errored

To enable webhooks, the API input parameter webhook must be set as true while initiating the Create Handshake API

Event Definition

All webhook events provided by Attestr, follow a standard structure as defined below.

KeyTypeDescriptionMin VersionMax Version
eventStringName of the eventv1
payloadObjectEvent specific payload objectv1

Sample event payload

JSON
Copy

Flowx.completed Event

This event is triggered on successful completion of the flow on the end user's device.

Flowx.completed Event Payload

KeyTypeDescriptionMin VersionMax Version
_idStringHandshake Id, same as generated in the Create Handshake APIv1
tagStringUnique tag number provided by the customer while initiating a new handshake in Create Handshake APIv1
numberStringUnique handshake human readable number as generated by the Attestr backend.v1
requestIdStringUnique tracking ID used for Attestr internal purposes and debugging issues.v1
resultObjectResult object as explained in Execution Result APIv1
resultSignatureStringResult signature which can be used to establish the authenticity of the result. Refer to Execution Result API for details.v1
flowIdStringFlow Id as mapped to this handshake, same as provided as input in the Create Handshake APIv1
snapshotStringFlow version if provided in the Create Handshake API else null.v1
updatedNumberUnix timestamp in milliseconds of the last updated timev1

Sample flowx.completed event payload

JSON
Copy

Flowx.skipped Event

This event is triggered if the end user terminates the flow execution by clicking the cancel button.

Flowx.skipped Event Payload

KeyTypeDescriptionMin VersionMax Version
_idStringHandshake Id, same as generated in the Create Handshake APIv1
tagStringUnique tag number provided by the customer while initiating a new handshake in Create Handshake APIv1
numberStringUnique handshake human readable number as generated by the Attestr backend.v1
requestIdStringUnique tracking ID used for Attestr internal purposes and debugging issues.v1
flowIdStringFlow Id as mapped to this handshake, same as provided as input in the Create Handshake APIv1
snapshotStringFlow version if provided in the Create Handshake API else null.v1
udpatedNumberUnix timestamp in milliseconds of the last updated timev1

Sample flowx.skipped event payload

JSON
Copy

Flowx.errored Event

This event is triggered when the flow is terminated due to any errors encountered during the flow execution. Errors can be either related to data, low balance, configuration problems or other general server errors.

Flowx.errored Event Payload

KeyTypeDescriptionMin VersionMax Version
_idStringHandshake Id, same as generated in the Create Handshake APIv1
tagStringUnique tag number provided by the customer while initiating a new handshake in Create Handshake APIv1
numberStringUnique handshake human readable number as generated by the Attestr backend.v1
requestIdStringUnique tracking ID used for Attestr internal purposes and debugging issues.v1
flowIdStringFlow Id as mapped to this handshake, same as provided as input in the Create Handshake APIv1
snapshotStringFlow version if provided in the Create Handshake API else null.v1
errorObjectError object. See below for definitionv1
udpatedNumberUnix timestamp in milliseconds of the last updated timev1

Error Object Definition

KeyTypeDescriptionMin VersionMax Version
codeStringUnique error code assigned by Attestrv1
httpStatusCodeStringStandard Http status code for this error typev1
messageStringError message.v1
stageStringStage Id in the flow which encountered this error.v1
originalObjectError object if the error is caused due to an underlying problem with the customer's account or due to data error failures after retry attempts limit is exceeded.v1

Sample flowx.errored event payload

JSON
Copy
JSON
Copy

Retry and Timeout

As explained on Webhooks page, webhook events from Attestr are only triggered once and have a 5-second timeout. Within 5 seconds, the registered webhook URL must return a 200 success response. It's possible that events are sent out of order. If your system does not respond to the event within 5 seconds, you can still use the Execution Result API to receive the handshake data.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard