Contents
On this page

Get Stripe Terminal Setup - Plugixa POS for WooCommerce

GET /plugixa-pos/v1/stripe-terminal

The Stripe Terminal settings and the readers registered in your Stripe account (read from Stripe on each call).

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

GET https://your-site.example/wp-json/plugixa-pos/v1/stripe-terminal

Responses

200 OK.

{
  "success": true,
  "data": {
    "configured": true,
    "mode": "test",
    "key_hint": "sk_test_…UowE",
    "webhook_set": true,
    "webhook_url": "https://your-site.example/wp-json/plugixa-pos/v1/stripe-terminal/webhook",
    "location_id": "tml_GvfNXg4R1SYoJb",
    "register_reader": {
      "1": "tmr_GvfNXw1Yfn6yE9"
    },
    "currency_error": "",
    "readers": [
      {
        "id": "tmr_GvfNXw1Yfn6yE9",
        "label": "Counter reader",
        "device_type": "simulated_wisepos_e",
        "status": "online",
        "serial": "95d2fffe-7a40-4a80-b330-58f78bd670af"
      }
    ]
  }
}
Field Type Meaning
data.mode string test or live, from the key
data.key_hint string The start and end of the saved key
data.webhook_url string The address to give Stripe for webhooks
data.register_reader object Reader id per register id
data.currency_error string Why the shop currency cannot be used, else empty
data.readers object[] Readers in Stripe. readers_error is added when Stripe could not be read

Errors

This endpoint has no errors of its own.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-pos/v1/stripe-terminal" \
  -u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/stripe-terminal');
curl_setopt_array($ch, [
    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/stripe-terminal', {
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
  },
});
const { data } = await response.json();

Quick Links

Share