APIs and Hooks
AJAX Endpoints
All endpoints use admin-ajax.php and require nonce:
- nonce action:
suma_security_checkout_otp - parameter:
security
suma_security_send_checkout_verification_code
Actions:
wp_ajax_suma_security_send_checkout_verification_codewp_ajax_nopriv_suma_security_send_checkout_verification_code
Purpose:
- send OTP code to billing email
suma_security_verify_checkout_verification_code
Actions:
wp_ajax_suma_security_verify_checkout_verification_codewp_ajax_nopriv_suma_security_verify_checkout_verification_code
Purpose:
- verify 6-digit OTP and unlock checkout state
suma_security_get_checkout_verification_state
Actions:
wp_ajax_suma_security_get_checkout_verification_statewp_ajax_nopriv_suma_security_get_checkout_verification_state
Purpose:
- return
requires_verificationboolean for frontend polling
WooCommerce and WP Hooks Used
Checkout Gate Hooks
woocommerce_checkout_processcfw_before_process_checkoutwoocommerce_after_checkout_validationwoocommerce_before_checkout_forminit(request hard-block for locked checkout POSTs)
Failed Payment Hooks
woocommerce_order_status_changedwoocommerce_order_status_failedwoocommerce_payment_failedwoocommerce_suma_test_gateway_payment_declined
Order and Checkout Hooks
woocommerce_checkout_order_created(persist fingerprint/email meta)woocommerce_checkout_order_processed(IP correction)
Frontend Script Hooks
wp_enqueue_scripts(fingerprint script)wp_footer(OTP script enqueue/localization)
Admin Hooks
admin_init(register settings)admin_menu(settings + tools pages)
Logger Sources
WooCommerce logger channels:
checkout-session-rate-limitcheckout-verification