Contents
On this page

Rotate Webhook Secret - Plugixa POS for WooCommerce

POST /plugixa-pos/v1/webhooks/{id}/secret

Make a new signing secret. The old one stops working at once.

Needs a user with the plugixa_pos_manage_settings capability (signed in with an Application Password, or the login cookie with an X-WP-Nonce header). Administrators hold it; other roles only when you grant it.

Request

POST https://your-site.example/wp-json/plugixa-pos/v1/webhooks/1/secret

Path parameters

Name Type Description
id integer The webhook’s id

Responses

200 OK. data is the webhook plus the new secret.

{
  "success": true,
  "data": {
    "id": 1,
    "name": "Accounting sync",
    "url": "https://hooks.example.com/pos",
    "events": ["sale.completed", "sale.refunded"],
    "active": true,
    "failure_count": 0,
    "last_status": 200,
    "last_sent_at": "2026-11-19 16:45:00",
    "signing": true,
    "deliveries": {
      "pending": 0,
      "delivered": 12,
      "failed": 0
    },
    "secret": "whsec_3e9a7c1b5d2f8e04a6c9b3d1f7e2a5c8d0e2f4a6b8c1d3e5"
  }
}

Errors

Status Code When
404 plugixa_pos_not_found No webhook with that id.

Plus the errors every endpoint can return.

Examples

curl -s -X POST "https://your-site.example/wp-json/plugixa-pos/v1/webhooks/1/secret" \
  -u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/webhooks/1/secret');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-pos/v1/webhooks/1/secret', {
  method: 'POST',
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
  },
});
const { data } = await response.json();

Quick Links

Share