Contents
Get Payment Settings - Plugixa Stream
GET /plugixa-stream/v1/admin/payments/settings
The Stripe and PayPal settings of the Payments screen. Secret keys are never returned, only whether they are set.
Needs a user with the plugixa_stream_manage_settings capability (signed in with an Application Password or the login cookie). Administrators hold it; other roles only when you grant it.
Request
GET https://your-site.example/wp-json/plugixa-stream/v1/admin/payments/settings
Responses
200 OK.
{
"success": true,
"data": {
"has_stripe_key": true,
"stripe_mode": "test",
"has_stripe_webhook_secret": true,
"paypal_client_id": "AbC123sandboxClientId",
"has_paypal_secret": true,
"paypal_webhook_id": "4JH86294D6297924G",
"paypal_sandbox": true,
"stripe_webhook_url": "https://your-site.example/wp-json/plugixa-stream/v1/webhooks/stripe",
"paypal_webhook_url": "https://your-site.example/wp-json/plugixa-stream/v1/webhooks/paypal",
"webhooks_seen": {
"stripe": {
"ok": 1763368200
}
}
}
}
| Field | Type | Meaning |
|---|---|---|
data.has_stripe_key |
boolean |
A Stripe secret key is saved. The key itself is never returned |
data.stripe_mode |
string |
test for a test key, live, or empty |
data.has_stripe_webhook_secret |
boolean |
A signing secret is saved |
data.paypal_client_id |
string |
The PayPal client ID |
data.has_paypal_secret |
boolean |
A PayPal secret is saved |
data.paypal_webhook_id |
string |
The PayPal webhook ID |
data.paypal_sandbox |
boolean |
PayPal sandbox mode |
data.stripe_webhook_url |
string |
The URL to give Stripe. Also paypal_webhook_url |
data.webhooks_seen |
object |
By gateway, Unix times of the last accepted (ok) and rejected (rejected) delivery |
Errors
| Status | Code | When |
|---|---|---|
401 / 403 |
plugixa_stream_forbidden |
The caller lacks the capability. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-stream/v1/admin/payments/settings" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-stream/v1/admin/payments/settings');
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-stream/v1/admin/payments/settings', {
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share