> 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 # GetReceiptPreset # Package: receipts # Namespace: ReceiptPresets # Method link: https://dev.wix.com/docs/api-reference/business-management/get-paid/receipts/receipt-presets/get-receipt-preset.md ## Permission Scopes: Manage Receipts: SCOPE.RECEIPTS.MANAGE ## Introduction Retrieves a receipt preset. --- ## REST API ### Schema ``` Method: getReceiptPreset Description: Retrieves a receipt preset. URL: https://www.wixapis.com/receipts/v1/receipt-presets/{receiptPresetId} Method: GET # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: receiptPresetId Method parameters: param name: receiptPresetId | type: none | required: true Return type: GetReceiptPresetResponse - name: receiptPreset | type: ReceiptPreset | description: Requested 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). ``` ### Examples ### Get Receipt Preset Retrieves a Receipt Preset ```curl curl -X GET \ 'https://www.wixapis.com/receipts/v1/receipt-presets/4fd78c54-b722-4300-ac62-ea71ceaec00f' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.receipts.ReceiptPresets.getReceiptPreset(receiptPresetId) Description: Retrieves a receipt preset. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: receiptPresetId Method parameters: param name: receiptPresetId | type: string | description: Receipt preset GUID to retrieve. | required: true Return type: PROMISE - 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). ``` ### Examples ### getReceiptPreset ```javascript import { receiptPresets } from '@wix/get-paid'; async function getReceiptPreset(receiptPresetId) { const response = await receiptPresets.getReceiptPreset(receiptPresetId); }; ``` ### getReceiptPreset (with elevated permissions) ```javascript import { receiptPresets } from '@wix/get-paid'; import { auth } from '@wix/essentials'; async function myGetReceiptPresetMethod(receiptPresetId) { const elevatedGetReceiptPreset = auth.elevate(receiptPresets.getReceiptPreset); const response = await elevatedGetReceiptPreset(receiptPresetId); } ``` ### getReceiptPreset (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 getReceiptPreset(receiptPresetId) { const response = await myWixClient.receiptPresets.getReceiptPreset(receiptPresetId); }; ``` ---