Sample Flow

This article presents a sample flow your app can support. You aren't limited to this exact flow, but it can be a helpful jumping off point as you plan your Shipping Rates integration.

Configuration flow

  1. A site owner installs and authorizes your 3rd-party app to provide shipping rates based on various factors (region, product weight, taxes, and so on). The app collects the JSON Web Token (JWT), decodes it, and stores the resulting instance ID.

    For example, the token in this request:

    Copy

    Decodes into:

    Copy

Display custom shipping rates for eCommerce orders

  1. A customer logs on to the merchant’s Wix site and starts adds a product to the cart or checkout.

  2. Wix sends a Get Shipping Rates service plugin request to your app. The payload will include some or all of the fields described in the Body Params and example sections of the Get Shipping Rates reference.

  3. Your Shipping Rates integration triggers the required flow on its platform and processes the request.

    Wix expects an object containing the shipping rates, and either a 4xx HTTP status code (and some errors) or a 200 HTTP status code.

    Example of a successful response from your app:

    Copy

    Example of an error:

    Copy
  4. The Wix site displays the shipping rate/s on the cart or checkout page (depending on where the customer is selecting the shipping option). The customer can confirm the shipping rate before proceeding to payment.

Did this help?