AJAX, admin-post and query endpoints
| Endpoint | Auth | Purpose |
|---|---|---|
wp_ajax(_nopriv)_wpinterface_paddle_woo_order_status | Order key (order_id, order_key) | Poll payment; Billing API check |
wp_ajax_wpinterface_paddle_woo_test_connection | Nonce wpinterface_paddle_woo_admin, manage_woocommerce | Test the saved credentials of the current mode |
wp_ajax_wpinterface_paddle_woo_setup_webhook | Same; Billing only; webhook URL must be https:// | Create or update the notification destination, save its secret, record the events as synced |
wp_ajax_wpinterface_paddle_woo_sync_order | Nonce wpinterface_paddle_woo_admin, edit_shop_orders | Check payment with Paddle |
admin-post wpinterface_paddle_woo_license | Nonce wpinterface_paddle_woo_license, manage_woocommerce | Activate or deactivate the license |
admin-post wpinterface_paddle_woo_dismiss_welcome | Nonce of the same name, manage_woocommerce | Dismiss the Lite-to-Pro notice |
?wpinterface-paddle-invoice={id}&key={order_key} | Order key or owner | Redirect to a fresh Billing invoice |
?wpinterface-paddle-update-payment={subscription}&_wpnonce=… | Nonce + owner | Redirect to Paddle’s update-payment page |
Billing_Driver::setup_webhook() looks for a destination whose URL equals Settings::webhook_url(). It updates it (keeping events another plugin subscribed) or creates one (description “WooCommerce ({host})”), and writes the secret into billing_{env}_webhook_secret. The response asks the page to reload so a stale form can’t overwrite the new secret.
Scripts
Checkout::register_scripts() registers Paddle.js from Paddle’s CDN (wpinterface-paddle-woo-js-v2 or -v1) and wpinterface-paddle-woo-core (paddle-core.js). wpinterface-paddle-woo-checkout (paddle-checkout.js and checkout.css) is enqueued on checkout pages except order-received, including the receipt page, when the gateway is enabled and configured; wpinterface-paddle-woo-blocks comes through the blocks integration.
wpinterfacePaddleWooConfig keys: api, mode, sandbox ('1' / '0'), theme, locale, gateway, ajaxUrl, statusAction, i18n, and token (Billing client-side token) or vendor (Classic vendor ID). No secrets are ever included.
paddle-core.js exposes window.wpinterfacePaddleWoo = { config, ready, pay, cancel, inline }. pay( details, onPaid, frameTarget ) returns a promise resolving to { paid: true } after the status poll, or { paid: false } when the buyer closes the checkout. cancel() closes the open checkout unless a payment is in flight.