> 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 # Method name: getCheckoutSettings() # Method package: wixEcomBackend # Method menu location: wixEcomBackend --> checkoutSettings --> getCheckoutSettings # Method Link: https://dev.wix.com/docs/velo/apis/wix-ecom-backend/checkout-settings/get-checkout-settings.md # Method Description: Retrieves the sites' checkout settings. The `getCheckoutSettings()` function returns a Promise that resolves to checkout settings. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Get checkout settings without elevated permissions ```javascript import { checkoutSettings } from 'wix-ecom-backend'; export async function myGetCheckoutSettingsFunction() { try { const settings = await checkoutSettings.getCheckoutSettings(); console.log('Success! CheckoutSettings:', settings); return settings; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to: { "checkoutSettings": { "checkoutPolicies": { "termsAndConditions": { "visible": true, "content": "All product listings, prices, and specifications are subject to change without notice. ACCS reserves the right to modify or discontinue products at any time." }, "privacyPolicy": { "visible": true, "content": "Your privacy is important to us. Please review our Privacy Policy to understand how we collect, use, and disclose information." }, "returnPolicy": { "visible": true, "content": "Please refer to our Return Policy page for information on returns and refunds. ACCS reserves the right to refuse returns that do not meet our policy criteria." }, "digitalItemPolicy": { "visible": false, "content": "" }, "contactUs": { "visible": true, "content": "Email: accs@mail.com" }, "customPolicy": { "visible": true, "content": "Placing an order on our website constitutes an offer to purchase the products. We reserve the right to refuse or cancel any order for any reason. Payment must be received before order processing.", "title": "Orders and Payments" } }, "checkoutFields": { "subscriptionCheckbox": { "visible": true, "checkedByDefault": false }, "policyAgreementCheckbox": { "visible": true, "checkedByDefault": false }, "giftCardRedeemEnabled": true, "mitEnabled": false } } } */ ``` ## Get checkout settings without elevated permissions (export from backend code) ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { checkoutSettings } from 'wix-ecom-backend'; export const myGetCheckoutSettingsFunction = webMethod(Permissions.Anyone, async () => { try { const settings = await checkoutSettings.getCheckoutSettings(); console.log('Success! CheckoutSettings:', settings); return settings; } catch (error) { console.error(error); // Handle the error } }); /* Promise resolves to: { "checkoutSettings": { "checkoutPolicies": { "termsAndConditions": { "visible": true, "content": "All product listings, prices, and specifications are subject to change without notice. ACCS reserves the right to modify or discontinue products at any time." }, "privacyPolicy": { "visible": true, "content": "Your privacy is important to us. Please review our Privacy Policy to understand how we collect, use, and disclose information." }, "returnPolicy": { "visible": true, "content": "Please refer to our Return Policy page for information on returns and refunds. ACCS reserves the right to refuse returns that do not meet our policy criteria." }, "digitalItemPolicy": { "visible": false, "content": "" }, "contactUs": { "visible": true, "content": "Email: accs@mail.com" }, "customPolicy": { "visible": true, "content": "Placing an order on our website constitutes an offer to purchase the products. We reserve the right to refuse or cancel any order for any reason. Payment must be received before order processing.", "title": "Orders and Payments" } }, "checkoutFields": { "subscriptionCheckbox": { "visible": true, "checkedByDefault": false }, "policyAgreementCheckbox": { "visible": true, "checkedByDefault": false }, "giftCardRedeemEnabled": true, "mitEnabled": false } } } */ ``` ## Get checkout settings with elevated permissions ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { checkoutSettings } from 'wix-ecom-backend'; import { elevate } from 'wix-auth'; export const myGetCheckoutSettingsFunction = webMethod(Permissions.Anyone, async () => { try { const elevatedGetCheckoutSettings = elevate(checkoutSettings.getCheckoutSettings); const getCheckoutSettings = await elevatedGetCheckoutSettings(); console.log('Success! Checkout settings:', getCheckoutSettings); return getCheckoutSettings; } catch (error) { console.error(error); // Handle the error } }); /* Promise resolves to: { "checkoutSettings": { "checkoutPolicies": { "termsAndConditions": { "visible": true, "content": "All product listings, prices, and specifications are subject to change without notice. ACCS reserves the right to modify or discontinue products at any time." }, "privacyPolicy": { "visible": true, "content": "Your privacy is important to us. Please review our Privacy Policy to understand how we collect, use, and disclose information." }, "returnPolicy": { "visible": true, "content": "Please refer to our Return Policy page for information on returns and refunds. ACCS reserves the right to refuse returns that do not meet our policy criteria." }, "digitalItemPolicy": { "visible": false, "content": "" }, "contactUs": { "visible": true, "content": "Email: accs@mail.com" }, "customPolicy": { "visible": true, "content": "Placing an order on our website constitutes an offer to purchase the products. We reserve the right to refuse or cancel any order for any reason. Payment must be received before order processing.", "title": "Orders and Payments" } }, "checkoutFields": { "subscriptionCheckbox": { "visible": true, "checkedByDefault": false }, "policyAgreementCheckbox": { "visible": true, "checkedByDefault": false }, "giftCardRedeemEnabled": true, "mitEnabled": false } } } */ ``` ---