React to Onfido KYC result and capture/cancel accordingly
When a verification result from Onfido is received, capture the payment for the customer when they are approved, and cancel the payment when they are declined. You could also handle other outputs, like reacting to users abandoning the link, or a review state if it is setup in Onfido's Studio.