> 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`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # GetDefaultReceiptPreset # Package: receipts # Namespace: ReceiptPresets # Method link: https://dev.wix.com/docs/api-reference/business-management/get-paid/receipts/receipt-presets/get-default-receipt-preset.md ## Permission Scopes: Manage Receipts: SCOPE.RECEIPTS.MANAGE ## Introduction Retrieves the default receipt preset. The default preset is used during receipt creation when a preset isn't specified or doesn't exist. --- ## REST API ### Schema ``` Method: getDefaultReceiptPreset Description: Retrieves the default receipt preset. The default preset is used during receipt creation when a preset isn't specified or doesn't exist. URL: https://www.wixapis.com/receipts/v1/receipt-presets/default Method: GET Return type: GetDefaultReceiptPresetResponse - name: receiptPreset | type: ReceiptPreset | description: Default receipt preset. - name: id | type: string | description: Receipt preset GUID. - name: revision | type: string | description: Revision number, which increments by 1 each time the receipt preset is updated. To prevent conflicting changes, the current revision must be passed when updating the receipt preset. - name: createdDate | type: string | description: Date and time the receipt preset was created. - name: updatedDate | type: string | description: Date and time the receipt preset was last updated. - name: name | type: string | description: Receipt preset name. - name: displaySettings | type: DisplaySettings | description: Display settings. - name: businessDisplayOptions | type: BusinessDisplayOptions | description: Business display options. - name: showBusinessEmail | type: boolean | description: Whether to display the business email in the receipt. - name: showBusinessPhoneNumber | type: boolean | description: Whether to display the business phone number in the receipt. - name: showBusinessAddress | type: boolean | description: Whether to display the business address in the receipt. - name: customerDisplayOptions | type: CustomerDisplayOptions | description: Customer display options. - name: showCustomerEmail | type: boolean | description: Whether to display the customer's email in the receipt. - name: showCustomerPhoneNumber | type: boolean | description: Whether to display the customer's phone number in the receipt. - name: showCustomerShippingAddress | type: boolean | description: Whether to display the customer's shipping address in the receipt. - name: showCustomerBillingAddress | type: boolean | description: Whether to display the customer's billing address in the receipt. - name: showCustomerVatId | type: boolean | description: Whether to display the customer's VAT GUID in the receipt. - name: showCustomerCompanyName | type: boolean | description: Whether to display the customer's company's name. - name: itemsDisplayOptions | type: ItemsDisplayOption | description: Item display options. - name: showItemsDescription | type: boolean | description: Whether to display item descriptions in the receipt. - name: showTax | type: boolean | description: Whether to display item taxes in the receipt. - name: totalsDisplayOptions | type: TotalsDisplayOption | description: Totals display options. - name: showTaxBreakdown | type: boolean | description: Whether to display the tax breakdown in the receipt. - name: showItemSubtotalPerTaxBreakdown | type: boolean | description: Whether to display the item subtotal per tax breakdown in the receipt. - name: customFields | type: CustomFields | description: Custom fields. Values appear on the receipt in the specified order. - name: headerCustomFields | type: array | description: Header custom fields. - name: title | type: string | description: Title. - name: value | type: string | description: Value. - name: businessCustomFields | type: array | description: Business custom fields. - name: customerCustomFields | type: array | description: Customer custom fields. - name: footerCustomFields | type: array | description: Footer custom fields. - name: title | type: string | description: Title. - name: value | type: string | description: Value. - name: default | type: boolean | description: Whether this is the default receipt preset. The default preset is used during receipt creation when a preset isn't specified or doesn't exist. - name: displayValues | type: DisplayValues | description: Display values. - name: titleOverride | type: string | description: Text override for receipt title. - name: extendedFields | type: ExtendedFields | description: Custom field data for the receipt preset. 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). Possible Errors: HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NO_META_SITE | Description: Site not found. ``` ### Examples ### Get Default Receipt Preset Retrieves a default Receipt Preset ```curl curl -X GET \ 'https://www.wixapis.com/receipts/v1/receipt-presets/default' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.receipts.ReceiptPresets.getDefaultReceiptPreset() Description: Retrieves the default receipt preset. The default preset is used during receipt creation when a preset isn't specified or doesn't exist. Return type: PROMISE - name: receiptPreset | type: ReceiptPreset | description: Default receipt preset. - name: _id | type: string | description: Receipt preset GUID. - name: revision | type: string | description: Revision number, which increments by 1 each time the receipt preset is updated. To prevent conflicting changes, the current revision must be passed when updating the receipt preset. - name: _createdDate | type: Date | description: Date and time the receipt preset was created. - name: _updatedDate | type: Date | description: Date and time the receipt preset was last updated. - name: name | type: string | description: Receipt preset name. - name: displaySettings | type: DisplaySettings | description: Display settings. - name: businessDisplayOptions | type: BusinessDisplayOptions | description: Business display options. - name: showBusinessEmail | type: boolean | description: Whether to display the business email in the receipt. - name: showBusinessPhoneNumber | type: boolean | description: Whether to display the business phone number in the receipt. - name: showBusinessAddress | type: boolean | description: Whether to display the business address in the receipt. - name: customerDisplayOptions | type: CustomerDisplayOptions | description: Customer display options. - name: showCustomerEmail | type: boolean | description: Whether to display the customer's email in the receipt. - name: showCustomerPhoneNumber | type: boolean | description: Whether to display the customer's phone number in the receipt. - name: showCustomerShippingAddress | type: boolean | description: Whether to display the customer's shipping address in the receipt. - name: showCustomerBillingAddress | type: boolean | description: Whether to display the customer's billing address in the receipt. - name: showCustomerVatId | type: boolean | description: Whether to display the customer's VAT GUID in the receipt. - name: showCustomerCompanyName | type: boolean | description: Whether to display the customer's company's name. - name: itemsDisplayOptions | type: ItemsDisplayOption | description: Item display options. - name: showItemsDescription | type: boolean | description: Whether to display item descriptions in the receipt. - name: showTax | type: boolean | description: Whether to display item taxes in the receipt. - name: totalsDisplayOptions | type: TotalsDisplayOption | description: Totals display options. - name: showTaxBreakdown | type: boolean | description: Whether to display the tax breakdown in the receipt. - name: showItemSubtotalPerTaxBreakdown | type: boolean | description: Whether to display the item subtotal per tax breakdown in the receipt. - name: customFields | type: CustomFields | description: Custom fields. Values appear on the receipt in the specified order. - name: headerCustomFields | type: array | description: Header custom fields. - name: title | type: string | description: Title. - name: value | type: string | description: Value. - name: businessCustomFields | type: array | description: Business custom fields. - name: customerCustomFields | type: array | description: Customer custom fields. - name: footerCustomFields | type: array | description: Footer custom fields. - name: title | type: string | description: Title. - name: value | type: string | description: Value. - name: default | type: boolean | description: Whether this is the default receipt preset. The default preset is used during receipt creation when a preset isn't specified or doesn't exist. - name: displayValues | type: DisplayValues | description: Display values. - name: titleOverride | type: string | description: Text override for receipt title. - name: extendedFields | type: ExtendedFields | description: Custom field data for the receipt preset. 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). Possible Errors: HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NO_META_SITE | Description: Site not found. ``` ### Examples ### getDefaultReceiptPreset ```javascript import { receiptPresets } from '@wix/get-paid'; async function getDefaultReceiptPreset() { const response = await receiptPresets.getDefaultReceiptPreset(); }; ``` ### getDefaultReceiptPreset (with elevated permissions) ```javascript import { receiptPresets } from '@wix/get-paid'; import { auth } from '@wix/essentials'; async function myGetDefaultReceiptPresetMethod() { const elevatedGetDefaultReceiptPreset = auth.elevate(receiptPresets.getDefaultReceiptPreset); const response = await elevatedGetDefaultReceiptPreset(); } ``` ### getDefaultReceiptPreset (self-hosted) Self-hosted 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 { receiptPresets } from '@wix/get-paid'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { receiptPresets }, // Include the auth strategy and host as relevant }); async function getDefaultReceiptPreset() { const response = await myWixClient.receiptPresets.getDefaultReceiptPreset(); }; ``` ---