This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves the sites' checkout settings.
The getCheckoutSettings()
function returns a Promise that resolves to checkout settings.
function getCheckoutSettings(): Promise<GetCheckoutSettingsResponse>;
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
}
}
}
*/
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.