> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# RemoveTipFromOrder

# Package: tips

# Namespace: TipsService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/other-services/tips/tips/remove-tip-from-order?apiView=SDK.md

## Permission Scopes:
Manage Bookings: SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS

## Introduction

Removes a tip from an
eCommerce order ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/introduction.md) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/order-object.md)).


If no tip exists on the order, the call succeeds and the response contains an
empty `OrderInfo` object.

The call fails if the customer has already been charged for at least one of
the associated tip distributions.

---

## REST API

### Schema

```
 Method: removeTipFromOrder
 Description: Removes a tip from an eCommerce order ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/introduction.md) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/order-object.md)).   If no tip exists on the order, the call succeeds and the response contains an empty `OrderInfo` object.  The call fails if the customer has already been charged for at least one of the associated tip distributions.
 URL: https://www.wixapis.com/tips/v1/tips/remove
 Method: POST
 Method parameters:
     - name: orderId | type: string | description: GUID of the order from which to remove the tip.  | validation: format GUID
 Return type: RemoveTipFromOrderResponse
  - name: orderInfo | type: OrderInfo | description: Information about the order from which the tip was removed.  
     - ONE-OF: 
        - name: orderId | type: string | description: Order GUID.  | validation: format GUID
     - name: additionalFeeId | type: string | description: GUID of the order's additional fee that's associated with the tip.  | validation: format GUID
     - name: additionalFeePrice | type: Price | description: Price of the order's additional fee that's associated with the tip.  
        - name: amount | type: string | description: Amount of the additional fee that's associated with the tip.  | validation: decimalValue {"gte":"0","lte":"1000000000000000","maxScale":2}
        - name: formattedAmount | type: string | description: Amount formatted with currency symbol.  Max: 100 characters  | read-only: true | validation: maxLength 100

 Possible Errors:
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: CANNOT_REMOVE_PAID_TIP_DISTRIBUTION | Description: Can't remove the tip because the customer was already charged for at least one of the tip distributions.


```

### Examples

### Remove tip from a draft order
```curl
curl -X POST \
'https://www.wixapis.com/tips-service/v1/tips/remove' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "draftOrderId": "756a4af1-6435-4583-b3a9-73d3003d4be7"
}'
```

### Remove tip from an order
```curl
curl -X POST \
'https://www.wixapis.com/tips-service/v1/tips/remove' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "orderId": "756a4af1-6435-4583-b3a9-73d3003d4be7"
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.ecom.tips.removeTipFromOrder(options)
 Description: Removes a tip from an eCommerce order ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/introduction.md) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/order-object.md)).   If no tip exists on the order, the call succeeds and the response contains an empty `OrderInfo` object.  The call fails if the customer has already been charged for at least one of the associated tip distributions.
 Method parameters:
   param name: options | type: RemoveTipFromOrderOptions  none | required: true 
     - name: orderId | type: string | description: GUID of the order from which to remove the tip.  | validation: format GUID
 Return type: PROMISE<RemoveTipFromOrderResponse>
  - name: orderInfo | type: OrderInfo | description: Information about the order from which the tip was removed.  
     - ONE-OF: 
        - name: orderId | type: string | description: Order GUID.  | validation: format GUID
     - name: additionalFeeId | type: string | description: GUID of the order's additional fee that's associated with the tip.  | validation: format GUID
     - name: additionalFeePrice | type: Price | description: Price of the order's additional fee that's associated with the tip.  
        - name: amount | type: string | description: Amount of the additional fee that's associated with the tip.  | validation: decimalValue {"gte":"0","lte":"1000000000000000","maxScale":2}
        - name: formattedAmount | type: string | description: Amount formatted with currency symbol.  Max: 100 characters  | read-only: true | validation: maxLength 100

 Possible Errors:
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: CANNOT_REMOVE_PAID_TIP_DISTRIBUTION | Description: Can't remove the tip because the customer was already charged for at least one of the tip distributions.


```

### Examples

### removeTipFromOrder
```javascript
import { tips } from '@wix/ecom';

async function removeTipFromOrder(options) {
  const response = await tips.removeTipFromOrder(options);
};
```

### removeTipFromOrder (with elevated permissions)
```javascript
import { tips } from '@wix/ecom';
import { auth } from '@wix/essentials';

async function myRemoveTipFromOrderMethod(options) {
  const elevatedRemoveTipFromOrder = auth.elevate(tips.removeTipFromOrder);
  const response = await elevatedRemoveTipFromOrder(options);
}
```

### removeTipFromOrder (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { tips } from '@wix/ecom';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { tips },
  // Include the auth strategy and host as relevant
});


async function removeTipFromOrder(options) {
  const response = await myWixClient.tips.removeTipFromOrder(options);
};
```

---