Create customer refund
Processes customer returns for online store orders
- Parameters
- Advanced call ?
Function CreateCustomerRefund(Val Token, Val UUID, Val Tariff, Val TestAPI = False) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Token | --token | String | ✔ | Auth token |
| UUID | --uuid | String | ✔ | Order UUID |
| Tariff | --tariff | Number | ✔ | Tariff code (from those available under the contract) |
| TestAPI | --testapi | Boolean | ✖ | Flag to use test API for requests |
Returns
Map Of KeyAndValue - serialized JSON response from CDEK
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete HTTP structure with fields code, body, and headers |
| retries | Number of HTTP request send attempts on 5** status codes or internal client errors |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
tip
This method is used if the direct order was delivered by CDEK and the recipient wants to return it in full
If the order was delivered by another service, or you need to return not all items, you must use the CreateOrder method with is_client_return = true
Method at API documentation: Registration of refusal
1C:Enterprise/OneScript code example
Token = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJsb2NhdGlvbjphbGwiLCJvcmRlcjphbGwiLCJwYXltZW50OmFsbCJdLCJleHAiOjE3NjE5MTU3NDQsImF1dGhvcml0aWVzIjpbInNoYXJkLWlkOnJ1LTAxIiwiY2xpZW50LWNpdHk60J3QvtCy0L7RgdC40LHQuNGA0YHQuiwg0J3QvtCy0L7RgdC40LHQuNGA0YHQutCw0Y8g0L7QsdC70LDRgdGC0YwiLCJhY2NvdW50LWxhbmc6cnVzIiwiY29udHJhY3Q60JjQnC3QoNCkLdCT0JvQky0yMiIsImFwaS12ZXJzaW9uOjEuMSIsImFjY291bnQtdXVpZDplOTI1YmQwZi0wNWE2LTRjNTYtYjczNy00Yjk5YzE0ZjY2OWEiLCJjbGllbnQtaWQtZWM1OmVkNzVlY2Y0LTMwZWQtNDE1My1hZmU5LWViODBiYjUxMmYyMiIsImNvbnRyYWN0LWlkOmRlNDJjYjcxLTZjOGMtNGNmNS04MjIyLWNmYjY2MDQ0ZThkZiIsImNsaWVudC1pZC1lYzQ6MTQzNDgyMzEiLCJjb250cmFnZW50L...";
UUID = "4c7113d6-e20b-4218-9fd9-2cf33b75a384";
Tariff = 139;
Result = OPI_CDEK.CreateCustomerRefund(Token, UUID, Tariff, True);
- Bash
- CMD/Bat
oint cdek CreateCustomerRefund \
--token "***" \
--uuid "ecb7f2d5-89ec-4eb7-acff-e7c350818aaa" \
--tariff 139 \
--testapi "***"
oint cdek CreateCustomerRefund ^
--token "***" ^
--uuid "ecb7f2d5-89ec-4eb7-acff-e7c350818aaa" ^
--tariff 139 ^
--testapi "***"
Result
{
"entity": {
"uuid": "ecb7f2d5-89ec-4eb7-acff-e7c350818aaa"
},
"requests": [
{
"request_uuid": "870f78b4-d437-4349-820b-83cc261adf10",
"type": "CREATE_CLIENT_RETURN",
"date_time": "2026-05-26T14:20:08+00:00",
"state": "ACCEPTED"
}
],
"related_entities": []
}