Skip to content

Webhooks

Webhooks tell WordPress when Square completes a payment — even if the customer closes the browser before returning to your site.

Why webhooks matter

Without a saved Square payment ID, you cannot refund from WooCommerce. Payment IDs are usually saved when:

  1. The buyer returns to your site after payment, or
  2. Square sends a payment.completed webhook

Setup

  1. Go to Payments Square Connect → Connect.
  2. Copy the Webhook URL shown on the screen.
  3. Open the Square Developer Dashboard → your application.
  4. Add the webhook URL and subscribe to payment events (e.g. payment.completed).
  5. Save in Square and in WordPress.

Sandbox vs Live

Configure webhooks for both environments if you test in Sandbox and accept Live payments.

Troubleshooting

Symptom Fix
Order stuck Pending after payment Check webhook URL and Square event subscriptions
Missing payment ID on order Enable webhooks; wait a few minutes and check order notes
Refund fails Confirm payment ID exists on the order meta

Enable Debug Log on the Connect screen and check WooCommerce → Status → Logs (source shc4wc) for webhook errors.