/plugin/connectImplementedConnect a website
Validates Merchant ID + Yera API Key + Security Code, creates or updates the site connection for the website, and returns the webhook signing secret the plugin should store. Reconnecting the same website updates the existing connection and returns the same secret.
Auth
Bearer API key
Scope
plugin:connect
Handler
apps/web/app/api/v1/plugin/connect/route.ts
- Supported platforms: woocommerce, shopify, magento, prestashop, opencart, custom.
- The API key travels in the request body for this endpoint. Only a Yera Live key is accepted.
- The returned webhook_secret is what the plugin uses to verify Yera webhook signatures. Plugins store it automatically — merchants never configure webhook secrets manually, and the webhook URL is auto-detected by the plugin.
- Connecting the same website again updates the existing site connection instead of creating a duplicate.
- In live mode the callback URL must use HTTPS on a public host related to the site host.
- Failed credential attempts are rate limited.
Request
bashcurl -X POST https://app.yeraconnect.io/api/v1/plugin/connect \
-H "Content-Type: application/json" \
-d '{
"merchant_id": "MER_XXXXXXXXXXXX",
"api_key": "yera_live_your_api_key",
"security_code": "XXXXXX-XXXXXX-XXXXXX-XXXXXX",
"platform": "woocommerce",
"site_url": "https://store.com",
"callback_url": "https://store.com/wp-json/yera-connect/v1/webhook",
"plugin_version": "1.1.0"
}'Request body
json{
"merchant_id": "MER_XXXXXXXXXXXX",
"api_key": "yera_live_your_api_key",
"security_code": "XXXXXX-XXXXXX-XXXXXX-XXXXXX",
"platform": "woocommerce",
"site_url": "https://store.com",
"callback_url": "https://store.com/wp-json/yera-connect/v1/webhook",
"plugin_version": "1.1.0"
}Response
json{
"ok": true,
"status": "connected",
"merchant_id": "MER_XXXXXXXXXXXX",
"site_id": "site_123",
"environment": "live",
"platform": "woocommerce",
"site_url": "https://store.com",
"callback_url": "https://store.com/wp-json/yera-connect/v1/webhook",
"webhook_secret": "whsec_yera_...",
"message": "Yera Connect is connected."
}