---
sidebar_position: 6
description: Create customer refund and other functions to work with CDEK in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, CDEK]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Create customer refund
 Processes customer returns for online store orders



`Function CreateCustomerRefund(Val Token, Val UUID, Val Tariff, Val TestAPI = False) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Auth token |
  | UUID | --uuid | String | &#x2714; | Order UUID |
  | Tariff | --tariff | Number | &#x2714; | Tariff code (from those available under the contract) |
  | TestAPI | --testapi | Boolean | &#x2716; | Flag to use test API for requests |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from CDEK

:::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](https://api-docs.cdek.ru/55327686.html)
:::
<br/>


```bsl title="1C:Enterprise/OneScript code example"
    Token  = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9. ...";
    UUID   = "50fbb719-69d4-4ded-93ca-ff7d005c9fae";
    Tariff = 139;

    Result = OPI_CDEK.CreateCustomerRefund(Token, UUID, Tariff, True);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint cdek CreateCustomerRefund \
             --token "***" \
             --uuid "30b65bfe-a4ac-46b8-96db-c692076c609b" \
             --tariff 139 \
             --testapi "***"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint cdek CreateCustomerRefund ^
             --token "***" ^
             --uuid "30b65bfe-a4ac-46b8-96db-c692076c609b" ^
             --tariff 139 ^
             --testapi "***"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "entity": {
  "uuid": "3c80df8f-efd1-48ce-bd28-56bcd628eb82"
 },
 "requests": [
  {
   "request_uuid": "e0a542e5-b4e5-4d51-b54a-bebf384411de",
   "type": "CREATE_CLIENT_RETURN",
   "date_time": "2025-10-31T12:03:24+00:00",
   "state": "ACCEPTED"
  }
 ],
 "related_entities": []
}
```
