Catching a payment form submit before it is submitted

Hi everyone,

Is it possible to catch the moment where a user clicks on “Pay” to fire a webhook before his payment actually gets processed?

I need to make sure there are enough available spots before selling a ticket.

Thanks,
Tomas

Likely this would be a jquery before you submit to check availability.
Kelson at Ksense would be a great partner to reach out to:
https://www.knack.com/experts#expert-directory/expert-details2/606f962e30281f001d42acaa/

Yes, but for this I would need to know what Knack’s event handler is…

From Knack’s own doc, I only found this:

// Change scene_1 to the scene with your checkout view
$(document).on('knack-checkout-submit.scene_1', function(event, view, record) {
  // Do something after the payment has gone through
  alert('Payment successful');
});

Which is neat, but this actually triggers once the payment has been completed. I want to check just before it is passed to the payment gateway, and, if needed, stop the process right there.

Of course, I can attach an event handler to “knack-view-render” but this would only check the availability during the rendering process. I need it to be checked just before/during the payment intent.

Thanks,
Tomas

Hi @Tomas - I’m not a coder so can’t assist you, hopefully someone else will offer some assistance :blush: