Sending the verification link
Given the requirement of only sending the link to payments with the type “first payment” (see: vaulting), the “Payment status updated” trigger can be used to react to the previous authorization attempt.
Capture or send link
- Trigger: Payment status updated from the Payments app
- Trigger Condition: Payment status = AUTHORIZED
- Utility: Conditions
- Branches: Transaction type =
FIRST_PAYMENT
FIRST_PAYMENT
will be handled differently.
Next, create the verification link using Onfido’s “Create Smart Capture Link” action.
Do note that for some apps to properly work, they also have to be configured within the third-party. In the case of Onfido, the verification process is set up to take a payment ID in and return that payment ID via the result webhook, so that the verification can be tied back to the correct payment.
Capture/Cancel based on the verification result
The “Result received” trigger from Onfido can now be used to handle the various states they support. For this demo use case only “approved” and “declined” will be used.
Handle verification result
- Trigger: Result received from the Onfido app
- Utility: Conditions
- Branches: Status =
approved
- Branches: Status =
declined
- Utility: Conditions added after “Cancel payment”
- Branch: Reason one of (
well known fraudster
,fraud suspected
)
Additional ideas
Automation can be used to build even more logic and take the use case further:- Add conditional logic to send an SMS instead of an email for users who provided their phone number.
- Automatically update a CRM and tag a user if the result indicates fraudulent activity.
- Add a counter to be passed through and allow users more than one attempt to get verified.
- Handle the “abandoned” outcome from Onfido to create a new link and send a reminder to the user.
See it in action
Here is a video walking through this exact setup and how the workflows were created:Start automating
You now know how to get the most out of Workflows, but there’s more that you can do:- Learn about the Payments App
- Check our guide to monitor workflows
- Learn more about Workflows best practices