Contents
Get Wallet Settings - Plugixa PDF Vouchers for WooCommerce
GET /plugixa-pdf-vouchers/v1/wallet/settings
The Apple and Google Wallet box of the settings. Private keys and certificates never leave the server: only whether they are stored.
Needs a user with the plugixa_pdfv_manage_settings capability (signed in with an Application Password, or the login cookie with an X-WP-Nonce header). Administrators and shop managers get it when the plugin is activated; see Staff access.
Note. Pro only: on the free plugin this route answers
404rest_no_route.
Request
GET https://your-store.example/wp-json/plugixa-pdf-vouchers/v1/wallet/settings
Responses
200 OK.
{
"success": true,
"data": {
"color": "#7a1f2b",
"encryption": true,
"apple": {
"pass_type_id": "pass.com.example.giftcard",
"team_id": "A1B2C3D4E5",
"org_name": "Maison Willow",
"has_certificate": true,
"certificate_cn": "Pass Type ID: pass.com.example.giftcard",
"valid_until": "2027-11-12",
"has_wwdr": true,
"ready": true
},
"google": {
"issuer_id": "3388000000022123456",
"client_email": "vouchers@maison-willow.iam.gserviceaccount.com",
"has_key": true,
"ready": true
}
}
}
| Field | Type | Meaning |
|---|---|---|
data.color |
string |
The pass colour |
data.encryption |
boolean |
Whether the server can encrypt keys (needs PHP’s OpenSSL) |
data.apple |
object |
pass_type_id, team_id, org_name, whether the certificate and the WWDR certificate are stored, the certificate’s name and valid_until, and ready |
data.google |
object |
issuer_id, the service account client_email, has_key and ready |
The values shown are an example of a store with both wallets set up.
Errors
| Status | Code | When |
|---|---|---|
401 / 403 |
plugixa_pdfv_forbidden |
The caller lacks the capability. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-store.example/wp-json/plugixa-pdf-vouchers/v1/wallet/settings" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-store.example/wp-json/plugixa-pdf-vouchers/v1/wallet/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-store.example/wp-json/plugixa-pdf-vouchers/v1/wallet/settings', {
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share