Endpoints and front end

Updated

AJAX and admin endpoints

ActionAuthPurpose
wp_ajax(_nopriv)_wpinterface_paddle_checkoutEDD nonce edd-process-checkoutProcess the purchase, return the Paddle checkout
wp_ajax(_nopriv)_wpinterface_paddle_order_statusPurchase session or owning userPoll order status; empty the cart; Billing API check
wp_ajax_wpinterface_paddle_test_connectionnonce wpinterface_paddle_admin, manage_shop_settings or edit_shop_paymentsTest saved credentials
wp_ajax_wpinterface_paddle_setup_webhooknonce wpinterface_paddle_admin, manage_shop_settingsCreate or update the Billing notification destination and save its secret
wp_ajax_wpinterface_paddle_sync_ordernonce wpinterface_paddle_admin, edit_shop_payments“Check payment with Paddle”
admin-post wpinterface_paddle_pausenonce wpinterface_paddle_pause_{id}, edit_shop_paymentsPause or resume
?wpinterface-paddle-invoice={order}&key={payment key}edd_can_view_receipt() + keyRedirect to a fresh Paddle invoice URL (Billing)

Checkout script

assets/js/paddle-checkout.js is enqueued (with the Paddle.js handle wpinterface-paddle-js-v2 or wpinterface-paddle-js-v1) on the checkout page, and on any page with ?_ptxn= (Billing). It receives window.wpinterfacePaddleCheckout:

KeyMeaning
apibilling / classic
modeinline / overlay
sandbox'1' / '0'
token / vendorBilling client token / Classic vendor ID
theme, localeCheckout appearance
gateway, ajaxUrl, checkoutAction, statusAction, purchaseLabelPlumbing
iconsPayment mark images (when enabled)
hostedSuccessUrlBilling ?_ptxn= pages only
i18nTranslated messages

Behaviour worth knowing

  • The form’s onsubmit is hooked because EDD submits with jQuery’s .submit().
  • Cart changes (edd:cart-updated and EDD’s jQuery cart events) close an open inline form.
  • Switching gateways (edd_gateway_loaded) resets a checkout this script opened.
  • While Paddle processes a payment (checkout.payment.initiated) the Edit details link is hidden.
  • If Paddle.js failed to load, Purchase shows an error instead of creating an order.

Was this page helpful?