> 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

# QueryReceipts

# Package: receipts

# Namespace: Receipts

# Method link: https://dev.wix.com/docs/api-reference/business-management/get-paid/receipts/receipts/query-receipts?apiView=SDK.md

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

## Introduction

Retrieves a list of up to 100 receipts, given the specified filtering, paging, and sorting ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language.md) | [REST](https://dev.wix.com/api/rest/getting-started/api-query-language)).

---

## REST API

### Schema

```
 Method: queryReceipts
 Description: Retrieves a list of up to 100 receipts, given the specified filtering, paging, and sorting ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language.md) | [REST](https://dev.wix.com/api/rest/getting-started/api-query-language)).
 URL: https://www.wixapis.com/receipts/v1/receipts/query
 Method: POST
 Method parameters:
   param name: query | type: CursorQuery    
     - name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.  
        - name: limit | type: integer | description: Maximum number of items to return in the results.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
        - name: filter | type: object | description: Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`  
        - name: sort | type: array<Sorting> | description: Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`  | validation: maxItems 5
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 512
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
 Query fields:
   - field: id | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: createdDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: updatedDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: numbering.prefix | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: numbering.number | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: numbering.suffix | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: sourceReference.appId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: sourceReference.externalReferenceId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: sourceReference.wixPaymentOrder.transactionId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: sourceReference.wixEcomOrder.transactionId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: numbering.displayNumber | operators: none | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: QueryReceiptsResponse
  - name: receipts | type: array<Receipt> | description: Requested receipts.  
     - name: id | type: string | description: Receipt GUID.  | read-only: true | validation: format GUID, immutable
     - name: revision | type: string | description: Revision number, which increments by 1 each time the receipt is updated. To prevent conflicting changes, the current revision must be passed when updating the receipt.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the receipt was created.  | read-only: true | validation: format date-time, immutable
     - name: updatedDate | type: string | description: Date and time the receipt was last updated. Relevant updates include receipt regeneratation and number allocation changes. Updates to financial information are not stored.  | read-only: true | validation: format date-time
     - name: numbering | type: Numbering | description: Receipt numbering.  | read-only: true 
        - name: number | type: integer | description: Receipt number.  | validation: format int32
        - name: prefix | type: string | description: Receipt prefix that will be displayed before the receipt number.  | validation: minLength 1, maxLength 10
        - name: suffix | type: string | description: Receipt suffix that will be displayed after the receipt number.  | validation: minLength 1, maxLength 10
        - name: displayNumber | type: string | description: Full receipt display number, in [prefix][number][suffix] format.  | read-only: true | validation: maxLength 30
     - name: regionalProperties | type: RegionalProperties | description: Regional properties pertaining to the receipt. When regional properties are not provided, defaults are taken from the site's properties, available in the Site Properties API.  | validation: immutable
        - name: locale | type: Locale | description: Locale. Determines formating of numbers, dates and times.  
           - name: languageCode | type: string | description: Two-letter language code in [ISO-639-1 alpha-2](https://en.wikipedia.org/wiki/ISO_639-1) format. For example: `en`, `de`, `ja`.  | validation: format LANGUAGE
           - name: country | type: string | description: Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format. For example: `US`, `DE`, `JP`.  | validation: format COUNTRY
        - name: timeZone | type: string | description: Time zone. Determines offset of dates and times.  | validation: maxLength 32
        - name: language | type: string | description: Receipt language. Determines the language of receipt static content (i.e. field and column titles). If not provided, defaults to locale's language. Two-letter language code in [ISO-639-1 alpha-2](https://en.wikipedia.org/wiki/ISO_639-1) format.  | validation: format LANGUAGE
     - name: currency | type: string | description: Currency code in [ISO-4217 alphabetic](https://www.iso.org/iso-4217-currency-codes.html) format.  | validation: format CURRENCY
     - name: sourceReference | type: SourceReference | description: Details about the associated Wix eCommerce or Wix Payments order.  | validation: immutable
        - ONE-OF: 
           - name: wixPaymentOrder | type: WixPayment | description: Wix Payments order. Required when `receiptOrderType` is `WIX_PAYMENT`.  | validation: immutable
              - name: orderId | type: string | description: Wix Payments order GUID.  | validation: format GUID, immutable
              - name: transactionId | type: string | description: Wix Payments transaction GUID.  | validation: format GUID, immutable
           - name: wixEcomOrder | type: WixEcom | description: Wix eCommerce order. Required when `receiptOrderType` is `WIX_ECOM`.  | validation: immutable
              - name: orderId | type: string | description: Wix eCommerce order GUID.  | validation: format GUID, immutable
              - name: transactionId | type: string | description: Wix eCommerce transaction GUID.  | validation: format GUID, immutable
        - name: appId | type: string | description: GUID of the app that generated the receipt.  | validation: format GUID, immutable
        - name: externalReferenceId | type: string | description: External reference GUID. For example: Wix eCommerce `orderId`, Wix Events `eventId`.  | validation: format GUID, immutable
        - name: receiptOrderType | type: ReceiptOrderType | description: Order type.  | validation: immutable
             - enum:
             -     WIX_PAYMENT: Receipt for Wix Payments payment.
             -     WIX_ECOM: Receipt for Wix eCommerce payment.
     - name: businessDetails | type: BusinessDetails | description: Business details. When business properties are not provided, defaults are taken from the site's properties, available in the Site Properties API.  
        - name: name | type: string | description: Business name.  | validation: maxLength 60, immutable
        - name: email | type: string | description: Business email.  | validation: format EMAIL, immutable
        - name: phone | type: string | description: Business phone.  | validation: format PHONE, immutable
        - name: address | type: Address | description: Business address.  | validation: immutable
           - ONE-OF: 
              - name: streetAddress | type: StreetAddress | description: Street name and number.  
                 - name: number | type: string | description: Street number.  
                 - name: name | type: string | description: Street name.  
                 - name: apt | type: string | description: Apartment number.  
              - name: addressLine | type: string | description: Main address line, usually street and number as free text.  
           - name: country | type: string | description: Country code.  | validation: format COUNTRY
           - name: subdivision | type: string | description: Subdivision shorthand. Usually, a short code (2 or 3 letters) that represents a state, region, prefecture, or province. e.g. NY  
           - name: city | type: string | description: City name.  
           - name: postalCode | type: string | description: Zip/postal code.  
           - name: addressLine2 | type: string | description: Free text providing more detailed address info. Usually contains Apt, Suite, and Floor.  
        - name: logo | type: Image | description: Business logo.  | validation: immutable
           - name: id | type: string | description: WixMedia image GUID.  
           - name: url | type: string | description: Image URL.  
           - name: height | type: integer | description: Original image height.  | read-only: true 
           - name: width | type: integer | description: Original image width.  | read-only: true 
           - name: altText | type: string | description: Image alt text.  
           - name: filename | type: string | description: Image filename.  | read-only: true 
     - name: customer | type: Customer | description: Customer details.  
        - name: contactId | type: string | description: Customer's contact GUID.  | validation: format GUID
        - name: contactDetails | type: FullAddressContactDetails | description: Customer's contact details.  
           - name: firstName | type: string | description: Contact's first name.  
           - name: lastName | type: string | description: Contact's last name.  
           - name: phone | type: string | description: Contact's phone number.  
           - name: company | type: string | description: Contact's company name.  
           - name: email | type: string | description: Email associated with the address.  
           - name: vatId | type: VatId | description: Tax info. Currently usable only in Brazil.  
              - name: id | type: string | description: Customer's tax GUID.  
              - name: type | type: VatType | description: Tax type.  Supported values: + `CPF`: for individual tax payers + `CNPJ`: for corporations  
                     - enum:
                     -     UNSPECIFIED: 
                     -     CPF: CPF - for individual tax payers.
                     -     CNPJ: CNPJ - for corporations
        - name: billingAddress | type: Address | description: Customer's billing address.  
        - name: shippingAddress | type: Address | description: Customer's shipping address.  
        - name: shippingAddressContactDetails | type: ShippingAddressContactDetails | description: Shipping address contact details. Allows to have a separate contact details (name, email, etc.) for the shipping address.  
           - name: firstName | type: string | description: Contact's first name.  
           - name: lastName | type: string | description: Contact's last name.  
           - name: phone | type: string | description: Contact's phone number.  
           - name: company | type: string | description: Contact's company name.  
           - name: email | type: string | description: Email associated with the address.  
     - name: lineItems | type: array<LineItem> | description: Line item details.  | validation: minItems 1, maxItems 300
        - name: id | type: string | description: Line item GUID.  | validation: format GUID
        - name: name | type: string | description: Line item name.  | validation: maxLength 400
        - name: description | type: string | description: Line item description.  | validation: maxLength 600
        - name: quantity | type: string | description: Line item quantity.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"100000","maxScale":15}
        - name: price | type: string | description: Line item unit price per unit after discounts.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"-1000000000000000","lte":"1000000000000000","maxScale":4}
        - name: priceBeforeDiscounts | type: string | description: Line item price per unit before discounts.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"-1000000000000000","lte":"1000000000000000","maxScale":4}
        - name: taxBreakdown | type: array<LineItemTax> | description: Line item tax breakdown.  | validation: maxItems 7
           - name: taxName | type: string | description: Tax name.  | validation: maxLength 200
           - name: taxRate | type: string | description: Tax rate percentage. For example: 0.1000 means 10% tax, and 2.1000 means 210% tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","maxScale":6}
           - name: taxableAmount | type: string | description: Amount of the line item price that is taxable.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
           - name: taxAmount | type: string | description: Amount of tax calculated for this line item.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
           - name: exemptAmount | type: string | description: Exempt amount from tax calculated for this line item.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: totals | type: LineItemTotals | description: Line item totals.  
           - name: totalDiscount | type: string | description: Line item total discount.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
           - name: totalPriceBeforeTax | type: string | description: Line item total price after discounts and before taxes.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"-1000000000000000","lte":"1000000000000000","maxScale":4}
           - name: totalTax | type: string | description: Line item total applied tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
           - name: totalPriceAfterTax | type: string | description: Line item total price after taxes and discounts.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"-1000000000000000","lte":"1000000000000000","maxScale":4}
           - name: totalExemptAmount | type: string | description: Line item total price that was exempt from tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
           - name: totalPriceAfterLineItemDiscounts | type: string | description: Line item total price after line-item-level (local) discounts have been applied, but before any receipt-level (global) discounts are allocated and before tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"-1000000000000000","lte":"1000000000000000","maxScale":4}
        - name: discounts | type: array<LineItemDiscount> | description: Line item discount breakdown.  | validation: maxItems 20
           - ONE-OF: 
              - name: fixedDiscount | type: string | description: Fixed monetary amount discount.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
              - name: percentageDiscount | type: string | description: Percentage-based discount (0-100).  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"100","maxScale":2}
           - name: id | type: string | description: GUID of the discount.  | validation: format GUID
           - name: name | type: string | description: Name or description of the discount.  | validation: minLength 1, maxLength 200
           - name: discountType | type: DiscountType | description: Type of the discount.  
                 - enum:
                 -     FIXED: Fixed monetary amount discount.
                 -     PERCENTAGE: Percentage-based discount.
     - name: shippingInfo | type: ShippingInfo | description: Shipping info.  
        - name: title | type: string | description: Shipping title.  | validation: maxLength 250
        - name: priceBeforeTax | type: string | description: Shipping amount after discounts (when relevant), and before tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: priceAfterTax | type: string | description: Shipping price after all discounts (if any exist), and after tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: taxBreakdown | type: array<ShippingTax> | description: Shipping tax breakdown.  | validation: maxItems 10
           - name: name | type: string | description: Tax name.  | validation: maxLength 200
           - name: rate | type: string | description: Tax rate percentage. Example: 0.1000 signifies 10% tax and 2.1000 signifies 210% tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","maxScale":6}
           - name: amount | type: string | description: Tax amount.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
           - name: exemptAmount | type: string | description: Exempt amount from tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: exemptAmount | type: string | description: Shipping price that was exempt from tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
     - name: additionalFees | type: array<AdditionalFee> | description: Additional fees.  | validation: maxItems 100
        - name: name | type: string | description: Additional fee name.  | validation: minLength 1, maxLength 50
        - name: priceBeforeTax | type: string | description: Additional fee price before taxes.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: priceAfterTax | type: string | description: Additional fee amount after taxes. If no taxes apply to this fee, this will be the same as `priceBeforeTax`.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: taxBreakdown | type: array<AdditionalFeeTax> | description: Additional fee tax breakdown.  | validation: maxItems 10
           - name: name | type: string | description: Tax name.  | validation: maxLength 200
           - name: rate | type: string | description: Tax rate. Example: 0.1000 signifies 10% tax and 2.1000 signifies 210% tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","maxScale":6}
           - name: amount | type: string | description: Tax amount.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
           - name: exemptAmount | type: string | description: Exempt amount from tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: exemptAmount | type: string | description: Additional fee price that was exempt from tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
     - name: discounts | type: array<Discount> | description: Discounts.  | validation: maxItems 320
        - name: amount | type: string | description: Discount amount.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: displayName | type: string | description: Discount name.  | validation: minLength 1, maxLength 400
     - name: payment | type: Payment | description: Payment details.  
        - name: paymentMethod | type: string | description: Payment method.  | validation: maxLength 200
        - name: paymentMethodDetails | type: string | description: Payment details.  | validation: maxLength 200
        - name: amount | type: string | description: Payment amount.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: transactionDate | type: string | description: Payment transaction date.  | validation: format date-time
        - name: cashRounding | type: CashRounding | description: Details about cash rounding applied to this payment, when relevant.  
           - name: roundingAmount | type: string | description: The difference between 'amount' and 'unroundedAmount'. A positive value indicates the price was rounded up; a negative value indicates a round-down.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"-1000000000000000","lte":"1000000000000000","maxScale":4}
           - name: unroundedAmount | type: string | description: Payment amount before cash rounding was applied.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
     - name: totals | type: Totals | description: Summaries of totals including tax, shipping, additional fees and discounts.  
        - name: subtotal | type: string | description: Subtotal of all line items, before discounts and before taxes.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: shipping | type: string | description: Shipping price, before discounts and tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: discount | type: string | description: Discount amount.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: additionalFees | type: string | description: Additional fee amount, before discounts and tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: tax | type: string | description: Tax amount.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: total | type: string | description: Total amount after all calculations. Equates to: subtotal - discounts + taxes + shipping + additional_fees.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: exempt | type: string | description: Total amount that was exempt from tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
     - name: taxBreakdown | type: array<Tax> | description: Tax and taxable amounts breakdowns.  | validation: maxItems 100
        - name: name | type: string | description: Tax name.  | validation: maxLength 200
        - name: rate | type: string | description: Tax rate percentage, as a positive decimal numeral. For example, "0.13".  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","maxScale":6}
        - name: taxAmount | type: string | description: Tax amount.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: taxableAmount | type: string | description: Taxable amount this tax applies to.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: exemptAmount | type: string | description: Exempt amount from tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
     - name: taxExempt | type: boolean | description: Indicates if there were exempt from tax.  
     - name: presetId | type: string | description: Receipt preset GUID. Defaults to the default receipt preset GUID, available with Get Default Receipt Preset GUID.  | validation: format GUID
     - name: customFields | type: CustomFields | description: Custom fields for this receipt. Values appear on the receipt in the specified order.  
        - name: headerCustomFields | type: array<CustomField> | description: Header custom fields.  | validation: maxItems 4
           - name: title | type: string | description: Title.  | validation: minLength 1, maxLength 100
           - name: value | type: string | description: Value.  | validation: maxLength 100
        - name: businessCustomFields | type: array<CustomField> | description: Business custom fields.  | validation: maxItems 4
        - name: customerCustomFields | type: array<CustomField> | description: Customer custom fields.  | validation: maxItems 4
        - name: footerCustomFields | type: array<FooterCustomField> | description: Footer custom fields.  | validation: maxItems 4
           - name: title | type: string | description: Title.  | validation: minLength 1, maxLength 200
           - name: value | type: string | description: Value.  | validation: maxLength 5000
     - name: document | type: Document | description: Document details.  | read-only: true 
        - name: status | type: DocumentStatus | description: Document status.  
             - enum:
             -     PROCESSING: Generation is in progress. Call Get Receipt after 6-10 seconds to check the updated status.
             -     AVAILABLE: Generation was successful. You can downloaded the document using the `downloadUrl`.
             -     FAILED: Generation has failed. You can retrigger document generation by calling Regenerate Receipt Document.
        - name: downloadUrl | type: string | description: Document download URL.  | validation: format WEB_URL
        - name: startGenerationTime | type: string | description: Document start generation time.  | validation: format date-time
     - name: extendedFields | type: ExtendedFields | description: Custom field data for the receipt. 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
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page.  + `true`: Another page of results can be retrieved. + `false`: This is the last page.  


```

### Examples

### Query Receipts
Retrieves a list of receipts, given the provided paging, filtering, and sorting.

```curl
curl -X POST \
  'https://www.wixapis.com/receipts/v1/receipts/query' \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": {
      "filter": {
        "identifier.prefix": "NY-",
        "identifier.suffix": "-X1"
      },
      "sort": [
        {
          "fieldName": "createdDate",
          "order": "DESC"
        }
      ],
      "cursorPaging": {
        "limit": 1
      }
    }
  }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.getPaid.receipts.queryReceipts(query)
 Description: Retrieves a list of up to 100 receipts, given the specified filtering, paging, and sorting ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language.md) | [REST](https://dev.wix.com/api/rest/getting-started/api-query-language)).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  query
 Method parameters: 
   param name: query | type: ReceiptQuery   | required: true 
     - name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.  
        - name: limit | type: integer | description: Maximum number of items to return in the results.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
        - name: filter | type: object | description: Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`  
        - name: sort | type: array<Sorting> | description: Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`  | validation: maxItems 5
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 512
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
 Query fields:
   - field: _id | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: _createdDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: _updatedDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: numbering.prefix | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: numbering.number | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: numbering.suffix | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: sourceReference.appId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: sourceReference.externalReferenceId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: sourceReference.wixPaymentOrder.transactionId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: sourceReference.wixEcomOrder.transactionId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: numbering.displayNumber | operators: none | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: PROMISE<QueryReceiptsResponse>
  - name: receipts | type: array<Receipt> | description: Requested receipts.  
     - name: _id | type: string | description: Receipt GUID.  | read-only: true | validation: format GUID, immutable
     - name: revision | type: string | description: Revision number, which increments by 1 each time the receipt is updated. To prevent conflicting changes, the current revision must be passed when updating the receipt.  | read-only: true | validation: format int64
     - name: _createdDate | type: Date | description: Date and time the receipt was created.  | read-only: true | validation: immutable
     - name: _updatedDate | type: Date | description: Date and time the receipt was last updated. Relevant updates include receipt regeneratation and number allocation changes. Updates to financial information are not stored.  | read-only: true 
     - name: numbering | type: Numbering | description: Receipt numbering.  | read-only: true 
        - name: number | type: integer | description: Receipt number.  | validation: format int32
        - name: prefix | type: string | description: Receipt prefix that will be displayed before the receipt number.  | validation: minLength 1, maxLength 10
        - name: suffix | type: string | description: Receipt suffix that will be displayed after the receipt number.  | validation: minLength 1, maxLength 10
        - name: displayNumber | type: string | description: Full receipt display number, in [prefix][number][suffix] format.  | read-only: true | validation: maxLength 30
     - name: regionalProperties | type: RegionalProperties | description: Regional properties pertaining to the receipt. When regional properties are not provided, defaults are taken from the site's properties, available in the Site Properties API.  | validation: immutable
        - name: locale | type: Locale | description: Locale. Determines formating of numbers, dates and times.  
           - name: languageCode | type: string | description: Two-letter language code in [ISO-639-1 alpha-2](https://en.wikipedia.org/wiki/ISO_639-1) format. For example: `en`, `de`, `ja`.  | validation: format LANGUAGE
           - name: country | type: string | description: Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format. For example: `US`, `DE`, `JP`.  | validation: format COUNTRY
        - name: timeZone | type: string | description: Time zone. Determines offset of dates and times.  | validation: maxLength 32
        - name: language | type: string | description: Receipt language. Determines the language of receipt static content (i.e. field and column titles). If not provided, defaults to locale's language. Two-letter language code in [ISO-639-1 alpha-2](https://en.wikipedia.org/wiki/ISO_639-1) format.  | validation: format LANGUAGE
     - name: currency | type: string | description: Currency code in [ISO-4217 alphabetic](https://www.iso.org/iso-4217-currency-codes.html) format.  | validation: format CURRENCY
     - name: sourceReference | type: SourceReference | description: Details about the associated Wix eCommerce or Wix Payments order.  | validation: immutable
        - ONE-OF: 
           - name: wixPaymentOrder | type: WixPayment | description: Wix Payments order. Required when `receiptOrderType` is `WIX_PAYMENT`.  | validation: immutable
              - name: orderId | type: string | description: Wix Payments order GUID.  | validation: format GUID, immutable
              - name: transactionId | type: string | description: Wix Payments transaction GUID.  | validation: format GUID, immutable
           - name: wixEcomOrder | type: WixEcom | description: Wix eCommerce order. Required when `receiptOrderType` is `WIX_ECOM`.  | validation: immutable
              - name: orderId | type: string | description: Wix eCommerce order GUID.  | validation: format GUID, immutable
              - name: transactionId | type: string | description: Wix eCommerce transaction GUID.  | validation: format GUID, immutable
        - name: appId | type: string | description: GUID of the app that generated the receipt.  | validation: format GUID, immutable
        - name: externalReferenceId | type: string | description: External reference GUID. For example: Wix eCommerce `orderId`, Wix Events `eventId`.  | validation: format GUID, immutable
        - name: receiptOrderType | type: ReceiptOrderType | description: Order type.  | validation: immutable
             - enum:
             -     WIX_PAYMENT: Receipt for Wix Payments payment.
             -     WIX_ECOM: Receipt for Wix eCommerce payment.
     - name: businessDetails | type: BusinessDetails | description: Business details. When business properties are not provided, defaults are taken from the site's properties, available in the Site Properties API.  
        - name: name | type: string | description: Business name.  | validation: maxLength 60, immutable
        - name: email | type: string | description: Business email.  | validation: format EMAIL, immutable
        - name: phone | type: string | description: Business phone.  | validation: format PHONE, immutable
        - name: address | type: Address | description: Business address.  | validation: immutable
           - name: city | type: string | description: none  
           - name: subdivision | type: string | description: none  
           - name: country | type: string | description: none  
           - name: postalCode | type: string | description: none  
           - name: addressLine1 | type: string | description: none  
           - name: addressLine2 | type: string | description: none  
        - name: logo | type: string | description: Business logo.  | validation: immutable
     - name: customer | type: Customer | description: Customer details.  
        - name: contactId | type: string | description: Customer's contact GUID.  | validation: format GUID
        - name: contactDetails | type: FullAddressContactDetails | description: Customer's contact details.  
           - name: firstName | type: string | description: Contact's first name.  
           - name: lastName | type: string | description: Contact's last name.  
           - name: phone | type: string | description: Contact's phone number.  
           - name: company | type: string | description: Contact's company name.  
           - name: email | type: string | description: Email associated with the address.  
           - name: vatId | type: VatId | description: Tax info. Currently usable only in Brazil.  
              - name: _id | type: string | description: Customer's tax GUID.  
              - name: type | type: VatType | description: Tax type.  Supported values: + `CPF`: for individual tax payers + `CNPJ`: for corporations  
                     - enum:
                     -     UNSPECIFIED: 
                     -     CPF: CPF - for individual tax payers.
                     -     CNPJ: CNPJ - for corporations
        - name: billingAddress | type: Address | description: Customer's billing address.  
        - name: shippingAddress | type: Address | description: Customer's shipping address.  
        - name: shippingAddressContactDetails | type: ShippingAddressContactDetails | description: Shipping address contact details. Allows to have a separate contact details (name, email, etc.) for the shipping address.  
           - name: firstName | type: string | description: Contact's first name.  
           - name: lastName | type: string | description: Contact's last name.  
           - name: phone | type: string | description: Contact's phone number.  
           - name: company | type: string | description: Contact's company name.  
           - name: email | type: string | description: Email associated with the address.  
     - name: lineItems | type: array<LineItem> | description: Line item details.  | validation: minItems 1, maxItems 300
        - name: _id | type: string | description: Line item GUID.  | validation: format GUID
        - name: name | type: string | description: Line item name.  | validation: maxLength 400
        - name: description | type: string | description: Line item description.  | validation: maxLength 600
        - name: quantity | type: string | description: Line item quantity.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"100000","maxScale":15}
        - name: price | type: string | description: Line item unit price per unit after discounts.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"-1000000000000000","lte":"1000000000000000","maxScale":4}
        - name: priceBeforeDiscounts | type: string | description: Line item price per unit before discounts.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"-1000000000000000","lte":"1000000000000000","maxScale":4}
        - name: taxBreakdown | type: array<LineItemTax> | description: Line item tax breakdown.  | validation: maxItems 7
           - name: taxName | type: string | description: Tax name.  | validation: maxLength 200
           - name: taxRate | type: string | description: Tax rate percentage. For example: 0.1000 means 10% tax, and 2.1000 means 210% tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","maxScale":6}
           - name: taxableAmount | type: string | description: Amount of the line item price that is taxable.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
           - name: taxAmount | type: string | description: Amount of tax calculated for this line item.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
           - name: exemptAmount | type: string | description: Exempt amount from tax calculated for this line item.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: totals | type: LineItemTotals | description: Line item totals.  
           - name: totalDiscount | type: string | description: Line item total discount.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
           - name: totalPriceBeforeTax | type: string | description: Line item total price after discounts and before taxes.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"-1000000000000000","lte":"1000000000000000","maxScale":4}
           - name: totalTax | type: string | description: Line item total applied tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
           - name: totalPriceAfterTax | type: string | description: Line item total price after taxes and discounts.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"-1000000000000000","lte":"1000000000000000","maxScale":4}
           - name: totalExemptAmount | type: string | description: Line item total price that was exempt from tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
           - name: totalPriceAfterLineItemDiscounts | type: string | description: Line item total price after line-item-level (local) discounts have been applied, but before any receipt-level (global) discounts are allocated and before tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"-1000000000000000","lte":"1000000000000000","maxScale":4}
        - name: discounts | type: array<LineItemDiscount> | description: Line item discount breakdown.  | validation: maxItems 20
           - ONE-OF: 
              - name: fixedDiscount | type: string | description: Fixed monetary amount discount.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
              - name: percentageDiscount | type: string | description: Percentage-based discount (0-100).  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"100","maxScale":2}
           - name: _id | type: string | description: GUID of the discount.  | validation: format GUID
           - name: name | type: string | description: Name or description of the discount.  | validation: minLength 1, maxLength 200
           - name: discountType | type: DiscountType | description: Type of the discount.  
                 - enum:
                 -     FIXED: Fixed monetary amount discount.
                 -     PERCENTAGE: Percentage-based discount.
     - name: shippingInfo | type: ShippingInfo | description: Shipping info.  
        - name: title | type: string | description: Shipping title.  | validation: maxLength 250
        - name: priceBeforeTax | type: string | description: Shipping amount after discounts (when relevant), and before tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: priceAfterTax | type: string | description: Shipping price after all discounts (if any exist), and after tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: taxBreakdown | type: array<ShippingTax> | description: Shipping tax breakdown.  | validation: maxItems 10
           - name: name | type: string | description: Tax name.  | validation: maxLength 200
           - name: rate | type: string | description: Tax rate percentage. Example: 0.1000 signifies 10% tax and 2.1000 signifies 210% tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","maxScale":6}
           - name: amount | type: string | description: Tax amount.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
           - name: exemptAmount | type: string | description: Exempt amount from tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: exemptAmount | type: string | description: Shipping price that was exempt from tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
     - name: additionalFees | type: array<AdditionalFee> | description: Additional fees.  | validation: maxItems 100
        - name: name | type: string | description: Additional fee name.  | validation: minLength 1, maxLength 50
        - name: priceBeforeTax | type: string | description: Additional fee price before taxes.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: priceAfterTax | type: string | description: Additional fee amount after taxes. If no taxes apply to this fee, this will be the same as `priceBeforeTax`.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: taxBreakdown | type: array<AdditionalFeeTax> | description: Additional fee tax breakdown.  | validation: maxItems 10
           - name: name | type: string | description: Tax name.  | validation: maxLength 200
           - name: rate | type: string | description: Tax rate. Example: 0.1000 signifies 10% tax and 2.1000 signifies 210% tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","maxScale":6}
           - name: amount | type: string | description: Tax amount.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
           - name: exemptAmount | type: string | description: Exempt amount from tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: exemptAmount | type: string | description: Additional fee price that was exempt from tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
     - name: discounts | type: array<Discount> | description: Discounts.  | validation: maxItems 320
        - name: amount | type: string | description: Discount amount.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: displayName | type: string | description: Discount name.  | validation: minLength 1, maxLength 400
     - name: payment | type: Payment | description: Payment details.  
        - name: paymentMethod | type: string | description: Payment method.  | validation: maxLength 200
        - name: paymentMethodDetails | type: string | description: Payment details.  | validation: maxLength 200
        - name: amount | type: string | description: Payment amount.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: transactionDate | type: Date | description: Payment transaction date.  
        - name: cashRounding | type: CashRounding | description: Details about cash rounding applied to this payment, when relevant.  
           - name: roundingAmount | type: string | description: The difference between 'amount' and 'unroundedAmount'. A positive value indicates the price was rounded up; a negative value indicates a round-down.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"-1000000000000000","lte":"1000000000000000","maxScale":4}
           - name: unroundedAmount | type: string | description: Payment amount before cash rounding was applied.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
     - name: totals | type: Totals | description: Summaries of totals including tax, shipping, additional fees and discounts.  
        - name: subtotal | type: string | description: Subtotal of all line items, before discounts and before taxes.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: shipping | type: string | description: Shipping price, before discounts and tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: discount | type: string | description: Discount amount.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: additionalFees | type: string | description: Additional fee amount, before discounts and tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: tax | type: string | description: Tax amount.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: total | type: string | description: Total amount after all calculations. Equates to: subtotal - discounts + taxes + shipping + additional_fees.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: exempt | type: string | description: Total amount that was exempt from tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
     - name: taxBreakdown | type: array<Tax> | description: Tax and taxable amounts breakdowns.  | validation: maxItems 100
        - name: name | type: string | description: Tax name.  | validation: maxLength 200
        - name: rate | type: string | description: Tax rate percentage, as a positive decimal numeral. For example, "0.13".  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","maxScale":6}
        - name: taxAmount | type: string | description: Tax amount.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: taxableAmount | type: string | description: Taxable amount this tax applies to.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
        - name: exemptAmount | type: string | description: Exempt amount from tax.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","lte":"1000000000000000","maxScale":4}
     - name: taxExempt | type: boolean | description: Indicates if there were exempt from tax.  
     - name: presetId | type: string | description: Receipt preset GUID. Defaults to the default receipt preset GUID, available with Get Default Receipt Preset GUID.  | validation: format GUID
     - name: customFields | type: CustomFields | description: Custom fields for this receipt. Values appear on the receipt in the specified order.  
        - name: headerCustomFields | type: array<CustomField> | description: Header custom fields.  | validation: maxItems 4
           - name: title | type: string | description: Title.  | validation: minLength 1, maxLength 100
           - name: value | type: string | description: Value.  | validation: maxLength 100
        - name: businessCustomFields | type: array<CustomField> | description: Business custom fields.  | validation: maxItems 4
        - name: customerCustomFields | type: array<CustomField> | description: Customer custom fields.  | validation: maxItems 4
        - name: footerCustomFields | type: array<FooterCustomField> | description: Footer custom fields.  | validation: maxItems 4
           - name: title | type: string | description: Title.  | validation: minLength 1, maxLength 200
           - name: value | type: string | description: Value.  | validation: maxLength 5000
     - name: document | type: Document | description: Document details.  | read-only: true 
        - name: status | type: DocumentStatus | description: Document status.  
             - enum:
             -     PROCESSING: Generation is in progress. Call Get Receipt after 6-10 seconds to check the updated status.
             -     AVAILABLE: Generation was successful. You can downloaded the document using the `downloadUrl`.
             -     FAILED: Generation has failed. You can retrigger document generation by calling Regenerate Receipt Document.
        - name: downloadUrl | type: string | description: Document download URL.  | validation: format WEB_URL
        - name: startGenerationTime | type: Date | description: Document start generation time.  
     - name: extendedFields | type: ExtendedFields | description: Custom field data for the receipt. 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
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page.  + `true`: Another page of results can be retrieved. + `false`: This is the last page.  


```

### Examples

### queryReceipts
```javascript
import { receipts } from '@wix/get-paid';

async function queryReceipts(query) {
  const response = await receipts.queryReceipts(query);
};
```

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

async function myQueryReceiptsMethod(query) {
  const elevatedQueryReceipts = auth.elevate(receipts.queryReceipts);
  const response = await elevatedQueryReceipts(query);
}
```

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

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


async function queryReceipts(query) {
  const response = await myWixClient.receipts.queryReceipts(query);
};
```

---