Extension Config


To configure and customize your service plugin, you need to provide important details in the plugin.json configuration file.

Note

If you created your service plugin extension with the CLI, required fields are automatically populated for you.

Configuration Params
dashboardUrlstring

URL to reach the shipping provider app's dashboard.


deploymentUristring

Base URI where the endpoints are called. Wix eCommerce appends the endpoint path to the base URI. For example, to call the Get Shipping Rates endpoint at https://my-shipping-provider.com/v1/getRates, the base URI you provide here is https://my-shipping-provider.com/.


descriptionstring

Description of the shipping provider.


fallbackDefinitionMandatoryboolean

Whether to require the site owner to define a fallback/default rate. Set to true if you do not provide rates as part of the integration.


learnMoreUrlstring

URL to more info about the shipping provider.


namestring

Human-readable name of the shipping provider.


thumbnailUrlstring

Thumbnail image of the shipping rates provider. Displayed in the shipping settings section in the Dashboard. The URL must be of an image uploaded to the Wix Media Manager.

Did this help?

getShippingRates( )


Important: This is a handler function. Implement it only as part of the service plugin.


This method retrieves applicable shipping rates for a delivery from your app.

Wix calls this method when certain actions are performed on the cart and/or checkout. For example, when an item is added to the cart, or the shipping destination is changed.

Note: Do not call the Estimate Cart Totals, Estimate Current Cart Totals or Get Checkout methods from your implementation code for Get Shipping Rates. Doing so will result in an error.

Method Declaration
Copy
Method Parameters
payloadGetShippingRatesEnvelope
Returns
Return Type:GetShippingRatesResponse | Promise<GetShippingRatesResponse>
Errors
GenericShippingRatesWixErrorclass
InvalidAddressWixErrorclass
InvalidPostalCodeWixErrorclass
MissingPostalCodeWixErrorclass
Did this help?