Contents
On this page
Look Up Voucher by Code - Plugixa PDF Vouchers for WooCommerce
GET /plugixa-pdf-vouchers/v1/vouchers/lookup
Find a voucher from what is printed on it: the code, typed or scanned, or the EAN-13 number of a Pro barcode. This is what Scan to redeem calls.
Needs a user with the plugixa_pdfv_redeem 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. The Pro Voucher staff role has it.
Request
GET https://your-store.example/wp-json/plugixa-pdf-vouchers/v1/vouchers/lookup?code=PX-GHMR-PKT5
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
code |
string |
Yes | The code (dashes and spaces do not matter) or the 13-digit EAN number. |
Responses
200 OK. The voucher, plus whether it can pay now.
{
"success": true,
"data": {
"id": 26,
"code": "PX-GHMR-PKT5",
"code_norm": "PXGHMRPKT5",
"kind": "mpv",
"status": "active",
"currency": "EUR",
"initial_amount": 150,
"balance": 56,
"uses_allowed": 0,
"uses_count": 3,
"product_id": 534,
"variation_id": 0,
"order_id": 563,
"order_item_id": 459,
"allowed_product_ids": [],
"allowed_category_ids": [],
"buyer_user_id": 65,
"buyer_email": "lea.fontaine@example.com",
"recipient_name": "Nadia Benali",
"recipient_email": "nadia.benali@example.net",
"from_name": "Léa",
"message": "For the best mum in the world. Bonne fête des mères !",
"template_id": 3,
"locale": "en_US",
"vendor_id": 0,
"source": "order",
"deliver_at": null,
"delivered_at": "2026-10-21 12:39:57",
"expires_at": "2027-10-21 12:39:17",
"created_by": 0,
"created_at": "2026-10-21 12:39:17",
"updated_at": "2026-11-19 16:12:33",
"version": 6,
"batch": "",
"recipient_phone": "",
"meta": [],
"is_expired": false,
"order_url": "https://your-store.example/wp-admin/post.php?post=563&action=edit",
"service": null,
"usable": true,
"reason": ""
}
}
| Field | Type | Meaning |
|---|---|---|
data.usable |
boolean |
Whether it can be spent now |
data.reason |
string |
When it cannot, why, in words a cashier can read out, for example This voucher has expired. |
The other fields are those of List Vouchers. A voucher that cannot pay is still found: usable is false.
Errors
| Status | Code | When |
|---|---|---|
401 / 403 |
plugixa_pdfv_forbidden |
The caller lacks the capability. |
404 |
plugixa_pdfv_not_found |
No voucher has that code or number: This voucher code is not valid. |
Plus the errors every endpoint can return.
Staff who can redeem are never locked by the code-guessing guard of the checkout.
Examples
curl -s "https://your-store.example/wp-json/plugixa-pdf-vouchers/v1/vouchers/lookup?code=PX-GHMR-PKT5" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-store.example/wp-json/plugixa-pdf-vouchers/v1/vouchers/lookup?code=PX-GHMR-PKT5');
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/vouchers/lookup?code=PX-GHMR-PKT5', {
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share