curl --location --request POST 'https://api.stateset.com/v1/warranties/:id/refund' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"refund_amount": 299.99,
"refund_reason": "Product defect covered under warranty",
"refund_method": "credit_card"
}'
mutation warrantyRefundMutation {
warrantyRefund(
id: "${warrantyId}",
refundAmount: ${refundAmount},
refundReason: "${refundReason}",
refundMethod: "${refundMethod}"
) {
warranty {
id,
status,
refund_id,
refund_amount,
refund_status
}
userErrors {
field
message
}
}
}
`;
const warranties = await stateset.warranties.refund({
id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
refund_amount: 299.99,
refund_reason: 'Product defect covered under warranty',
refund_method: 'credit_card'
});
warranties = stateset.warranties.refund({
'id': '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
'refund_amount': 299.99,
'refund_reason': 'Product defect covered under warranty',
'refund_method': 'credit_card'
})
warranties = Stateset::Warranty.refund({
id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
refund_amount: 299.99,
refund_reason: 'Product defect covered under warranty',
refund_method: 'credit_card'
})
warranties, err := stateset.Warranties.refund({
ID: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
RefundAmount: 299.99,
RefundReason: 'Product defect covered under warranty',
RefundMethod: 'credit_card'
})
Warranty warranties = stateset.Warranties.refund({
id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
refundAmount: 299.99,
refundReason: 'Product defect covered under warranty',
refundMethod: 'credit_card'
});
$warranties = $stateset->warranties->refund([
'id' => '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
'refund_amount' => 299.99,
'refund_reason' => 'Product defect covered under warranty',
'refund_method' => 'credit_card'
]);
var warranties = await stateset.Warranties.Refund(new {
Id = '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
RefundAmount = 299.99,
RefundReason = 'Product defect covered under warranty',
RefundMethod = 'credit_card'
});
{
"id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "warranty",
"refunded": true,
"refund_id": "ref_abc123xyz",
"refund_amount": 299.99,
"refund_status": "completed",
"refund_date": "2024-01-15T10:30:00Z",
"refund_reason": "Product defect covered under warranty",
"refund_method": "credit_card"
}
Refund Warranty
This endpoint processes a refund for a warranty claim.
POST
/
v1
/
warranties
/
:id
/
refund
curl --location --request POST 'https://api.stateset.com/v1/warranties/:id/refund' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"refund_amount": 299.99,
"refund_reason": "Product defect covered under warranty",
"refund_method": "credit_card"
}'
mutation warrantyRefundMutation {
warrantyRefund(
id: "${warrantyId}",
refundAmount: ${refundAmount},
refundReason: "${refundReason}",
refundMethod: "${refundMethod}"
) {
warranty {
id,
status,
refund_id,
refund_amount,
refund_status
}
userErrors {
field
message
}
}
}
`;
const warranties = await stateset.warranties.refund({
id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
refund_amount: 299.99,
refund_reason: 'Product defect covered under warranty',
refund_method: 'credit_card'
});
warranties = stateset.warranties.refund({
'id': '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
'refund_amount': 299.99,
'refund_reason': 'Product defect covered under warranty',
'refund_method': 'credit_card'
})
warranties = Stateset::Warranty.refund({
id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
refund_amount: 299.99,
refund_reason: 'Product defect covered under warranty',
refund_method: 'credit_card'
})
warranties, err := stateset.Warranties.refund({
ID: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
RefundAmount: 299.99,
RefundReason: 'Product defect covered under warranty',
RefundMethod: 'credit_card'
})
Warranty warranties = stateset.Warranties.refund({
id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
refundAmount: 299.99,
refundReason: 'Product defect covered under warranty',
refundMethod: 'credit_card'
});
$warranties = $stateset->warranties->refund([
'id' => '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
'refund_amount' => 299.99,
'refund_reason' => 'Product defect covered under warranty',
'refund_method' => 'credit_card'
]);
var warranties = await stateset.Warranties.Refund(new {
Id = '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
RefundAmount = 299.99,
RefundReason = 'Product defect covered under warranty',
RefundMethod = 'credit_card'
});
{
"id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "warranty",
"refunded": true,
"refund_id": "ref_abc123xyz",
"refund_amount": 299.99,
"refund_status": "completed",
"refund_date": "2024-01-15T10:30:00Z",
"refund_reason": "Product defect covered under warranty",
"refund_method": "credit_card"
}
Body
The ID provided in the data tab may be used to identify the warranty
The amount to refund for the warranty claim
The reason for the warranty refund
The method of refund (e.g., “credit_card”, “store_credit”, “check”)
Response
The ID provided in the data tab may be used to identify the warranty
The object type
The unique identifier for the refund transaction
The amount refunded
The status of the refund (e.g., “pending”, “completed”, “failed”)
The date when the refund was processed
Indicates whether the call was successful. true if successful, false if not.
curl --location --request POST 'https://api.stateset.com/v1/warranties/:id/refund' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"refund_amount": 299.99,
"refund_reason": "Product defect covered under warranty",
"refund_method": "credit_card"
}'
mutation warrantyRefundMutation {
warrantyRefund(
id: "${warrantyId}",
refundAmount: ${refundAmount},
refundReason: "${refundReason}",
refundMethod: "${refundMethod}"
) {
warranty {
id,
status,
refund_id,
refund_amount,
refund_status
}
userErrors {
field
message
}
}
}
`;
const warranties = await stateset.warranties.refund({
id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
refund_amount: 299.99,
refund_reason: 'Product defect covered under warranty',
refund_method: 'credit_card'
});
warranties = stateset.warranties.refund({
'id': '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
'refund_amount': 299.99,
'refund_reason': 'Product defect covered under warranty',
'refund_method': 'credit_card'
})
warranties = Stateset::Warranty.refund({
id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
refund_amount: 299.99,
refund_reason: 'Product defect covered under warranty',
refund_method: 'credit_card'
})
warranties, err := stateset.Warranties.refund({
ID: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
RefundAmount: 299.99,
RefundReason: 'Product defect covered under warranty',
RefundMethod: 'credit_card'
})
Warranty warranties = stateset.Warranties.refund({
id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
refundAmount: 299.99,
refundReason: 'Product defect covered under warranty',
refundMethod: 'credit_card'
});
$warranties = $stateset->warranties->refund([
'id' => '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
'refund_amount' => 299.99,
'refund_reason' => 'Product defect covered under warranty',
'refund_method' => 'credit_card'
]);
var warranties = await stateset.Warranties.Refund(new {
Id = '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
RefundAmount = 299.99,
RefundReason = 'Product defect covered under warranty',
RefundMethod = 'credit_card'
});
{
"id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "warranty",
"refunded": true,
"refund_id": "ref_abc123xyz",
"refund_amount": 299.99,
"refund_status": "completed",
"refund_date": "2024-01-15T10:30:00Z",
"refund_reason": "Product defect covered under warranty",
"refund_method": "credit_card"
}
⌘I