Developers

Webhook Integration

Receive real-time notifications for events in your MetaSonic account. Build reactive applications with webhooks.

Webhook Events

Subscribe to events and get instant notifications when they occur.

Order Created

order.created

Triggered when a new order is placed. Includes order details and customer information.

Order Completed

order.completed

Triggered when an order is successfully completed. Includes payment and fulfillment details.

Payment Received

payment.received

Triggered when a payment is received. Includes transaction ID and amount.

User Created

user.created

Triggered when a new user registers. Includes user profile and account details.

Product Updated

product.updated

Triggered when a product is created or updated. Includes full product data.

Payment Failed

payment.failed

Triggered when a payment attempt fails. Includes error reason and retry options.

PayPal Webhook (refunds & disputes)

This store receives PayPal notifications to keep orders in sync with refunds, chargebacks and disputes.

Endpoint URL

POST https://metasonic.ca/api/paypal_webhook.php

Every request is verified with PayPal’s verify-webhook-signature API before anything is processed. Events are idempotent.

Events to subscribe

PAYMENT.CAPTURE.COMPLETED, PAYMENT.CAPTURE.PENDING, PAYMENT.CAPTURE.DENIED, PAYMENT.CAPTURE.DECLINED, PAYMENT.CAPTURE.REFUNDED, PAYMENT.CAPTURE.REVERSED, CUSTOMER.DISPUTE.CREATED, CUSTOMER.DISPUTE.UPDATED, CUSTOMER.DISPUTE.RESOLVED, RISK.DISPUTE.CREATED, CHECKOUT.PAYMENT-APPROVAL.REVERSED

Setup steps

1. PayPal Developer Dashboard → Apps & Credentials → select your app (Sandbox or Live).
2. Webhooks → Add Webhook → paste the URL above.
3. Select the events listed here.
4. Save, then copy the Webhook ID into PAYPAL_WEBHOOK_ID in the server environment.
5. In Admin → Disputes & Refunds use Test connection to confirm the URL and events.

Setup Guide

Set up webhooks in 3 simple steps.

1

Create Endpoint

Set up a public HTTPS endpoint in your application to receive webhook events.

https://yourapp.com/webhook
2

Register Webhook

Register your endpoint in the dashboard and select which events to receive.

Dashboard → Webhooks → Create
3

Verify Signature

Verify webhook signatures to ensure requests are from MetaSonic.

x-webhook-signature: sha256=...

Start Using Webhooks

Get real-time updates delivered to your application.

Loading…