> 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

# UpdateReceiptsSettings

# Package: receipts

# Namespace: ReceiptsSettingsService

# Method link: https://dev.wix.com/docs/api-reference/business-management/get-paid/receipts/receipts-settings/update-receipts-settings.md

## Permission Scopes:
Manage Receipts: SCOPE.RECEIPTS.MANAGE

## Introduction

Updates a site's receipt settings, or creates them if none exist.

---

## REST API

### Schema

```
 Method: updateReceiptsSettings
 Description: Updates a site's receipt settings, or creates them if none exist.
 URL: https://www.wixapis.com/receipts/v1/receipts-settings
 Method: PATCH
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  receiptsSettings, receiptsSettings.revision, receiptsSettings.numbering
 Method parameters: 
   param name: receiptsSettings | type: ReceiptsSettings   | required: true 
        - name: revision | type: string | description: Revision number, which increments by 1 each time the receipt settings are updated. To prevent conflicting changes, the current revision must be passed when updating the receipt settings. | required: true | read-only: true | validation: format int64
        - name: numbering | type: Numbering | description: Receipt numbering settings. | required: true 
           - name: prefix | type: string | description: Receipt prefix that will be displayed before the receipt number.  | validation: minLength 1, maxLength 10
           - name: nextNumber | type: integer | description: Next receipt number. Used during receipt creation to ensure unique and consecutive numbering.  | validation: minimum 1, maximum 1000000000, format int32
           - name: suffix | type: string | description: Receipt suffix that will be displayed after the receipt number.  | validation: minLength 1, maxLength 10
        - name: extendedFields | type: ExtendedFields | description: Custom field data for the receipt settings.  Extended fields must be configured in the app dashboard before they can be accessed with API calls.  
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
 Return type: UpdateReceiptsSettingsResponse
  - name: receiptsSettings | type: ReceiptsSettings | description: Updated receipt settings.  
     - name: revision | type: string | description: Revision number, which increments by 1 each time the receipt settings are updated. To prevent conflicting changes, the current revision must be passed when updating the receipt settings.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the receipt settings were created.  | read-only: true | validation: format date-time, immutable
     - name: updatedDate | type: string | description: Date and time the receipt settings were last updated.  | read-only: true | validation: format date-time
     - name: numbering | type: Numbering | description: Receipt numbering settings.  
        - name: prefix | type: string | description: Receipt prefix that will be displayed before the receipt number.  | validation: minLength 1, maxLength 10
        - name: nextNumber | type: integer | description: Next receipt number. Used during receipt creation to ensure unique and consecutive numbering.  | validation: minimum 1, maximum 1000000000, format int32
        - name: suffix | type: string | description: Receipt suffix that will be displayed after the receipt number.  | validation: minLength 1, maxLength 10
     - name: extendedFields | type: ExtendedFields | description: Custom field data for the receipt settings.  Extended fields must be configured in the app dashboard before they can be accessed with API calls.  
        - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NEXT_NUMBER_DESCENDING | Description: Specified number is lower than the already used number for the prefix.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: SUFFIX_CONTAINS_ILLEGAL_CHARACTERS | Description: Specified suffix contains illegal characters.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: PREFIX_CONTAINS_ILLEGAL_CHARACTERS | Description: Specified prefix contains illegal characters.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NEXT_NUMBER_MISSING | Description: The `nextNumber` field must be specified.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NO_META_SITE | Description: Site not found.


```

### Examples

### Update Receipts Settings
Updates a Receipts Settings

```curl
curl -X POST \
  'https://www.wixapis.com/receipts/v1/receipts-settings' \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json' \
  -d '{
    "receiptsSettings": {
      "revision": "1",
      "numbering": {
        "prefix": "2025x-",
        "nextNumber": 5,
        "suffix": "-MY"
      }
    }
  }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.getPaid.receiptsSettings.updateReceiptsSettings(receiptsSettings)
 Description: Updates a site's receipt settings, or creates them if none exist.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  receiptsSettings, receiptsSettings.revision, receiptsSettings.numbering
 Method parameters: 
   param name: receiptsSettings | type: ReceiptsSettings   | required: true 
        - name: revision | type: string | description: Revision number, which increments by 1 each time the receipt settings are updated. To prevent conflicting changes, the current revision must be passed when updating the receipt settings. | required: true | read-only: true | validation: format int64
        - name: numbering | type: Numbering | description: Receipt numbering settings. | required: true 
           - name: prefix | type: string | description: Receipt prefix that will be displayed before the receipt number.  | validation: minLength 1, maxLength 10
           - name: nextNumber | type: integer | description: Next receipt number. Used during receipt creation to ensure unique and consecutive numbering.  | validation: minimum 1, maximum 1000000000, format int32
           - name: suffix | type: string | description: Receipt suffix that will be displayed after the receipt number.  | validation: minLength 1, maxLength 10
        - name: extendedFields | type: ExtendedFields | description: Custom field data for the receipt settings.  Extended fields must be configured in the app dashboard before they can be accessed with API calls.  
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
 Return type: PROMISE<ReceiptsSettings>
  - name: revision | type: string | description: Revision number, which increments by 1 each time the receipt settings are updated. To prevent conflicting changes, the current revision must be passed when updating the receipt settings.  | read-only: true | validation: format int64
  - name: _createdDate | type: Date | description: Date and time the receipt settings were created.  | read-only: true | validation: immutable
  - name: _updatedDate | type: Date | description: Date and time the receipt settings were last updated.  | read-only: true 
  - name: numbering | type: Numbering | description: Receipt numbering settings.  
     - name: prefix | type: string | description: Receipt prefix that will be displayed before the receipt number.  | validation: minLength 1, maxLength 10
     - name: nextNumber | type: integer | description: Next receipt number. Used during receipt creation to ensure unique and consecutive numbering.  | validation: minimum 1, maximum 1000000000, format int32
     - name: suffix | type: string | description: Receipt suffix that will be displayed after the receipt number.  | validation: minLength 1, maxLength 10
  - name: extendedFields | type: ExtendedFields | description: Custom field data for the receipt settings.  Extended fields must be configured in the app dashboard before they can be accessed with API calls.  
     - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NEXT_NUMBER_DESCENDING | Description: Specified number is lower than the already used number for the prefix.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: SUFFIX_CONTAINS_ILLEGAL_CHARACTERS | Description: Specified suffix contains illegal characters.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: PREFIX_CONTAINS_ILLEGAL_CHARACTERS | Description: Specified prefix contains illegal characters.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NEXT_NUMBER_MISSING | Description: The `nextNumber` field must be specified.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NO_META_SITE | Description: Site not found.


```

### Examples

### updateReceiptsSettings
```javascript
import { receiptsSettings } from '@wix/get-paid';

async function updateReceiptsSettings(receiptsSettings) {
  const response = await receiptsSettings.updateReceiptsSettings(receiptsSettings);
};
```

### updateReceiptsSettings (with elevated permissions)
```javascript
import { receiptsSettings } from '@wix/get-paid';
import { auth } from '@wix/essentials';

async function myUpdateReceiptsSettingsMethod(receiptsSettings) {
  const elevatedUpdateReceiptsSettings = auth.elevate(receiptsSettings.updateReceiptsSettings);
  const response = await elevatedUpdateReceiptsSettings(receiptsSettings);
}
```

### updateReceiptsSettings (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 { receiptsSettings } from '@wix/get-paid';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function updateReceiptsSettings(receiptsSettings) {
  const response = await myWixClient.receiptsSettings.updateReceiptsSettings(receiptsSettings);
};
```

---