curl --request POST \
--url https://api.wizzgift.com/retailer/v1/refunds \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"checkoutId": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({checkoutId: '<string>'})
};
fetch('https://api.wizzgift.com/retailer/v1/refunds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wizzgift.com/retailer/v1/refunds"
payload = { "checkoutId": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wizzgift.com/retailer/v1/refunds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'checkoutId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<string>",
"checkoutId": "<string>",
"totalAmount": 123,
"currency": "<string>",
"status": "requested",
"createdAt": 1753142400000,
"email": "<string>",
"remainingAmount": 123,
"items": [
{
"checkoutItemId": "<string>",
"productName": "<string>",
"failedQuantity": 123,
"totalQuantity": 123,
"unitPrice": 123,
"refundAmount": 123
}
],
"autoRefunds": [
{
"paymentId": "<string>",
"provider": "<string>",
"amount": 123,
"status": "pending",
"providerRefundId": "<string>",
"errorMessage": "<string>",
"attemptedAt": 1753142400000
}
],
"method": "<string>",
"initiatedBy": "user",
"reason": "<string>",
"retryCount": 123,
"completedAt": 1753142400000,
"updatedAt": 1753142400000
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid input"
},
"requestId": "req_8f3k2"
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired API key"
},
"requestId": "req_8f3k2"
}{
"error": {
"code": "NOT_FOUND",
"message": "Checkout not found"
},
"requestId": "req_8f3k2"
}{
"error": {
"code": "CONFLICT",
"message": "externalRef already used on another API surface"
},
"requestId": "req_8f3k2"
}{
"error": "Too many requests",
"message": "<string>"
}Request a refund for a checkout
curl --request POST \
--url https://api.wizzgift.com/retailer/v1/refunds \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"checkoutId": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({checkoutId: '<string>'})
};
fetch('https://api.wizzgift.com/retailer/v1/refunds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wizzgift.com/retailer/v1/refunds"
payload = { "checkoutId": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wizzgift.com/retailer/v1/refunds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'checkoutId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<string>",
"checkoutId": "<string>",
"totalAmount": 123,
"currency": "<string>",
"status": "requested",
"createdAt": 1753142400000,
"email": "<string>",
"remainingAmount": 123,
"items": [
{
"checkoutItemId": "<string>",
"productName": "<string>",
"failedQuantity": 123,
"totalQuantity": 123,
"unitPrice": 123,
"refundAmount": 123
}
],
"autoRefunds": [
{
"paymentId": "<string>",
"provider": "<string>",
"amount": 123,
"status": "pending",
"providerRefundId": "<string>",
"errorMessage": "<string>",
"attemptedAt": 1753142400000
}
],
"method": "<string>",
"initiatedBy": "user",
"reason": "<string>",
"retryCount": 123,
"completedAt": 1753142400000,
"updatedAt": 1753142400000
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid input"
},
"requestId": "req_8f3k2"
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired API key"
},
"requestId": "req_8f3k2"
}{
"error": {
"code": "NOT_FOUND",
"message": "Checkout not found"
},
"requestId": "req_8f3k2"
}{
"error": {
"code": "CONFLICT",
"message": "externalRef already used on another API surface"
},
"requestId": "req_8f3k2"
}{
"error": "Too many requests",
"message": "<string>"
}Authorizations
API key (wg_live_…) created in the dashboard (Account → API Keys).
Shown once at creation; only a hash is stored server-side.
Body
Response
Refund created (tied to the end-customer's email on the checkout).
Refund lifecycle record. Auto-refund to original payment methods is attempted first; any remainder proceeds through the refund-method flow (see status). Additional internal fields may be present.
Total eligible refund, in currency.
requested, auto_processing, awaiting_method, processing, completed, failed, admin_review, cancelled_by_owner Unix timestamp in milliseconds (UTC).
1753142400000
Refund identity (end-customer on retailer; your account email on B2B).
Still to refund after auto-refunds.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Chosen refund method (balance or a payment method).
user, admin, system Unix timestamp in milliseconds (UTC).
1753142400000
Unix timestamp in milliseconds (UTC).
1753142400000