Creating a satisfaction refund Learn how to create a satisfaction refund.
There are two ways to create a refund. A Customer Service Representative (CRS) can initiate a satisfaction refund through Global Commerce, or you can create a satisfaction refund programmatically .
Create a satisfaction refund programmatically
The following POST /orders/{orderid}/refunds
request requires the customer token and sets the type
to productRefund
, the category
to PRODUCT_LEVEL_PRODUCT
, the reason to CUSTOMER_SATISFACTION_ISSUE
, the comments to Test Product Refund
, and refundAmount
.
cURL 200 OK response
Copy curl -- location -- request POST 'https://api.digitalriver.com/orders/{orderid}/refunds' \
-- header 'authorization: bearer {auth_token}' \
...
-- data - raw '{
"type" : "productRefund" ,
"category" : "PRODUCT_LEVEL_PRODUCT" ,
"reason" : "CUSTOMER_SATISFACTION_ISSUE" ,
"comments" : "Test Product Refund" ,
"lineItems" : [
{
"lineItemId" : "51274910082" ,
"refundAmount" : {
"value" : 139.23 ,
"currency" : "EUR"
}
}
]
}
} '
A successful request returns a 200 OK
response.
Copy {
"refunds" : [
{
"id" : "7613660289" ,
"status" : "ReturnAcknowledged" ,
"reason" : "CUSTOMER_SATISFACTION_ISSUE" ,
"comments" : "Satisfaction Refund Api-Test Product Refund" ,
"type" : "LineItemLevelSatisfactionRefund" ,
"category" : null ,
"generationDate" : "Wed Sep 29 20:10:51 CDT 2021" ,
"generatedBy" : "automation-HostAdmin" ,
"origin" : "CUSTOMER_SERVICE" ,
"overrides" : "OVERRIDE_EXCEEDS_MAX_ITEM_LEVEL_REFUND_PCT" ,
"policy" : "NothingRequired" ,
"currency" : "EUR" ,
"totalRefunded" : {
"value" : 0.0 ,
"formattedValue" : "0.00EUR"
} ,
"outstanding" : {
"value" : 139.23 ,
"formattedValue" : "139.23EUR"
} ,
"totalRequested" : {
"value" : 139.23 ,
"formattedValue" : "139.23EUR"
} ,
"lineItems" : [
{
"status" : "ReturnAcknowledged" ,
"expectedQuantity" : 0 ,
"returnedQuantity" : 0 ,
"type" : "Physical" ,
"notes" : "Nothing Required" ,
"date" : "Wed Sep 29 20:10:51 CDT 2021" ,
"product" : {
"companyId" : "fitbit" ,
"id" : "5423986700" ,
"externalId" : "507BKBK"
} ,
"lineItemId" : "51274910082"
}
]
}
]
}
Create a product level refund request
The following POST /orders/{orderid}/refunds
request requires the customer token and sets the type
to productRefund
, the category
to PRODUCT_LEVEL_PRODUCT
, the reason to VENDOR_APPROVED_REFUND
, the comments to Test Product Refund
, and refundAmount
.
cURL 200 OK response
Copy curl -- location -- globoff 'api.digitalriver.com/order-api/orders/{orderID}}/refunds' \
-- header 'Content-Type: application/json' \
-- header 'Accept: application/json' \
-- header 'Authorization: Bearer <<full access token>>' \
-- data '{
"type" : "productRefund" ,
"category" : "PRODUCT_LEVEL_PRODUCT" ,
"reason" : "VENDOR_APPROVED_REFUND" ,
"comments" : "Test Product Refund" ,
"lineItems" : [
{
"lineItemId" : "123" ,
"refundAmount" : {
"value" : 2 ,
"currency" : "USD"
}
}
]
} '
A successful request returns a 200 OK
response.
Copy {
"refunds" : [
{
"id" : "string" ,
"status" : "string" ,
"reason" : "string" ,
"comments" : "string" ,
"type" : "string" ,
"category" : "string" ,
"generationDate" : "string" ,
"generatedBy" : "string" ,
"origin" : "string" ,
"policy" : "string" ,
"currency" : "string" ,
"totalRefunded" : {} ,
"outstanding" : {} ,
"totalRequested" : {} ,
"lineItems" : [
{
"status" : "string" ,
"expectedQuantity" : 0 ,
"returnedQuantity" : 0 ,
"type" : "string" ,
"notes" : "string" ,
"date" : "string" ,
"product" : {
"companyId" : "string" ,
"id" : "string" ,
"externalId" : "string"
} ,
"lineItemId" : "string"
}
]
}
]
}
Create an order level refund
The following POST /orders/{orderid}/refunds
request requires the customer token and sets the type
to orderRefund
, the category
to ORDER_LEVEL_FULL
, the reason to VENDOR_APPROVED_REFUND
, the comments to Test Product Refund
, and refundAmount
.
cURL 200 OK response
Copy curl -- location -- globoff 'api.digitalriver.com/order-api/orders/{orderID}}/refunds' \
-- header 'Content-Type: application/json' \
-- header 'Accept: application/json' \
-- header 'Authorization: Bearer <<full access token>>' \
-- data '{
"type" : "productRefund" ,
"category" : "PRODUCT_LEVEL_PRODUCT" ,
"reason" : "VENDOR_APPROVED_REFUND" ,
"comments" : "Test Product Refund" ,
"lineItems" : [
{
"lineItemId" : "123" ,
"refundAmount" : {
"value" : 2 ,
"currency" : "USD"
}
}
]
} '
A successful request returns a 200 OK
response.
Copy {
"refunds" : [
{
"id" : "string" ,
"status" : "string" ,
"reason" : "string" ,
"comments" : "string" ,
"type" : "string" ,
"category" : "string" ,
"generationDate" : "string" ,
"generatedBy" : "string" ,
"origin" : "string" ,
"policy" : "string" ,
"currency" : "string" ,
"totalRefunded" : {} ,
"outstanding" : {} ,
"totalRequested" : {}
}
]
}
Last updated 7 months ago