Webhooks
Configure event delivery and understand webhook logs.
Webhooks send payment and checkout events from Yera Connect to merchant systems.
They are important because checkout does not always finish while the customer is still on the screen. A payment provider may confirm a payment later, or a customer may close the browser before returning to the store. Webhooks allow Yera Connect to update the merchant system when the final payment status is known.
Common events
payment.createdpayment.redirectedpayment.pendingpayment.processingpayment.completedpayment.failedpayment.cancelledpayment.refunded
Why merchants need webhooks
Webhooks help merchants:
- Update WooCommerce orders after payment.
- Mark internal orders as paid or failed.
- Reconcile transactions.
- Trigger fulfillment.
- Notify customer support when payment fails.
- Debug payment problems from event history.
WooCommerce webhook URL
The WooCommerce plugin creates this endpoint inside WordPress:
https://merchant-store.com/wp-json/yera-connect/v1/webhook
Yera Connect sends normalized payment events to that URL so WooCommerce can update orders.
Custom webhook URL
For custom integrations, merchants can add their own backend webhook URL.
The URL should:
- Use HTTPS.
- Accept POST requests.
- Read the event payload.
- Verify the webhook signature if configured.
- Return a successful HTTP status when processed.
- Be reachable from the public internet.
Delivery headers
Every merchant webhook request includes:
| Header | Purpose |
|---|---|
yera-delivery-id | Unique delivery attempt ID. |
yera-event-id | Stable event ID for idempotency. |
yera-event-type | Event name, such as payment.completed. |
yera-timestamp | Unix timestamp used for signature verification. |
yera-signature | HMAC SHA-256 signature in t=<timestamp>,v1=<digest> format. |
user-agent | Starts with Yera-Connect-Webhooks. |
Verify the signature against the raw request body before updating an order:
hex(hmac_sha256(webhook_secret, `${yera-timestamp}.${rawRequestBody}`))
Store yera-event-id after processing. If the same event arrives again, return success without applying the order update twice.
Payment completed confirmation
Treat payment.completed as the fulfillment signal only after the webhook signature is valid.
For WooCommerce stores, Yera Connect also sends the WooCommerce callback so the plugin can update the order note and status. Admins can confirm the same event in:
Admin -> PayGate Callbacks Admin -> Sessions -> Session detail Admin -> Webhook Logs
How to test webhooks
Run a sandbox checkout, then open the Webhooks page and confirm:
- An event was created.
- Delivery was attempted.
- The destination URL is correct.
- The response status is successful.
- The linked payment session or transaction is visible.
What to check when delivery fails
- URL uses HTTPS.
- WordPress REST API is reachable.
- Security plugin is not blocking requests.
- Secret/signature configuration matches.
- The event appears in dashboard webhook logs.
Merchant support tip
When contacting support about a webhook issue, include the webhook event ID, destination URL, payment session ID, transaction ID, and the response error shown in the dashboard.
