updateCheckoutSettings( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Updates the sites' checkout settings.

The updateCheckoutSettings() function returns a Promise that resolves to the newly updated checkout settings.

Authentication

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permissions
Manage Stores - all permissions
Manage Restaurants - all permissions
Manage eCommerce - all permissions
Manage Orders
Learn more about app permissions.
Method Declaration
Copy
function updateCheckoutSettings(
  checkoutSettings: CheckoutSettings,
  options: UpdateCheckoutSettingsOptions,
): Promise<UpdateCheckoutSettingsResponse>;
Method Parameters
checkoutSettingsCheckoutSettingsRequired

Checkout settings to update.


optionsUpdateCheckoutSettingsOptions
Returns
Return Type:Promise<UpdateCheckoutSettingsResponse>
JavaScript
import { checkoutSettings } from "wix-ecom-backend"; /* Sample update value: { "checkoutSettingsInfo": { "checkoutFields": { "mitEnabled": false } } } */ export async function myUpdateCheckoutSettingsFunction(checkoutSettingsInfo) { try { const settings = await checkoutSettings.updateCheckoutSettings(checkoutSettingsInfo); console.log("Success! Updated checkout settings:", 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 } } } */
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?