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.
Creating 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 --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.
{
    "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"
                }
            ]
        }
    ]
}Last updated
Was this helpful?