Frontend setup
Choose a module below. The callback name and submission logic are yours to change.
https://nexacaptcha.zone.id/captcha/gravity.js
https://nexacaptcha.zone.id/captcha/horizon.js
<script
src="https://nexacaptcha.zone.id/captcha/gravity.js"
defer
></script>
<div
class="nexa-captcha"
data-callback="onCaptchaComplete"
></div>
Choose your own callback name if you prefer. Use exactly the same name in the HTML and JavaScript.
function onCaptchaComplete(result) {
if (!result.success) return;
yourSubmitFunction({
verificationId: result.verificationId,
responseToken: result.responseToken
});
}
The callback is a frontend handoff, not final proof. Accept the form only after /api/siteverify returns success: true.