Send a POST request to https://api.queye.co/pay/refund/ with the transaction ID. This reverses the charge at the processor, updates the transaction's status, and queues a payment.refunded webhook to your store — so if you'd rather refund from your own admin than the Queye Pay dashboard, your store's order status stays in sync either way.
curl -X POST https://api.queye.co/pay/refund/ \
-H "x-key: your_vendor_key" \
-H "x-secret: your_secret_key" \
-H "x-trid: ABCD12345678"
$ch = curl_init("https://api.queye.co/pay/refund/");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"x-key: your_vendor_key",
"x-secret: your_secret_key",
"x-trid: " . $tr_id,
],
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch("https://api.queye.co/pay/refund/", {
method: "POST",
headers: {
"x-key": "your_vendor_key",
"x-secret": "your_secret_key",
"x-trid": tr_id,
},
}).then(r => r.json());
import requests
response = requests.post(
"https://api.queye.co/pay/refund/",
headers={
"x-key": "your_vendor_key",
"x-secret": "your_secret_key",
"x-trid": tr_id,
},
).json()
// Server-side only — this uses your secret key.
const response = await fetch("https://api.queye.co/pay/refund/", {
method: "POST",
headers: {
"x-key": "your_vendor_key",
"x-secret": "your_secret_key",
"x-trid": tr_id,
},
}).then(r => r.json());
Two optional headers:
x-amount— a whole number of minor units, for a partial refund. Omit it to refund the full amount.x-reason— one ofduplicate,fraudulent, orrequested_by_customer.
A transaction can only be refunded once in full. A partial refund leaves it in successful status — call the status API to see the remaining refundable amount, or track partial refunds in your own ledger from the webhook payload.
Next: Webhooks.