Using Plugins
Register plugins at initialization or at runtime:Built-in Plugins
AnalyticsPlugin
Tracks payment events and reports them to an analytics endpoint.| Option | Type | Description |
|---|---|---|
endpoint | string | URL to send analytics events to |
properties | Record<string, string> | Extra properties attached to every event |
ShopifyPlugin
Integrates the checkout flow with Shopify stores.| Option | Type | Description |
|---|---|---|
shopDomain | string | Your Shopify store domain |
orderStatusUrlTemplate | string | Template for order status URL |
enableAppBridge | boolean | Enable Shopify App Bridge integration |
Creating Custom Plugins
A plugin implements theMyazaPlugin interface:
Request & Response Interceptors
Plugins can modify API requests and responses:UI Component Overrides
Replace parts of the checkout modal with custom components:| Slot | Description |
|---|---|
header | Top of the checkout modal |
footer | Bottom of the checkout modal |
status_banner | Status message area |
qr_code | QR code display area |
amount_display | Payment amount section |

