Skip to content

nShift Checkout

Connects nShift Checkout to Hantera as a source of shipping options. Once installed and configured, portal users see real nShift carrier products when they click Select shipping product on a delivery.

The app is a shipping-options provider only — it does not render a checkout UI and does not process payments. Combine it with a Payment Provider like Kustom for a complete cart → shipping → payment flow.

Before you start

You need a nShift Checkout account with:

  • A client id and client secret for OAuth (under nShift's API credentials).
  • One or more checkout connection ids — one per Hantera channel that should use nShift.

If you don't have these yet, contact your nShift representative.

Configure your credentials

  1. Install the nShift Checkout app on your Hantera instance.

  2. Open the app's settings in the portal.

  3. Paste in your credentials:

    SettingDescription
    clientIdnShift OAuth client id.
    clientSecretnShift OAuth client secret (kept secret).

The app handles OAuth tokens automatically — there is no separate refresh step to schedule.

Configure each channel

Each Hantera channel that should use nShift needs its own nShift checkout connection id.

  1. Open the channel editor in the portal for the channel you want to set up.
  2. Set nShift Checkout connection id to the connection id from the nShift portal.
  3. Save the channel.

Repeat for every channel that uses nShift. Channels without a connection id won't return any nShift options.

Try it out

  1. Open any order in a channel that has nShift configured.
  2. On any delivery, click Select shipping product.
  3. nShift's options for that delivery's address appear in the picker.

Customize the request with rules

nShift Checkout configurations are driven by an open set of variables — provider-specific key/value pairs like fromInventory or vipCustomer. Which variables you need depends entirely on how your nShift checkout configuration is built.

The app fires the OnNShiftCheckoutVariables custom hook every time it builds a request to nShift. Add merchant rules to that hook to feed in whatever variables your configuration expects — including dynamic values from the delivery, order, or channel.

See OnNShiftCheckoutVariables Hook for the hook contract and worked examples.

Set shipping tax with rules

Each shipping option needs a tax rate so the delivery's shippingTax is correct once an option is selected. The app uses nShift's own tax rate when available and otherwise falls back to the highest order-line tax factor.

When that isn't enough — for example a flat rate for a tax jurisdiction nShift doesn't price, or a carrier-specific override — add merchant rules to the OnNShiftCheckoutShippingOptionTax custom hook to compute per-option shipping tax yourself.

See OnNShiftCheckoutShippingOptionTax Hook for the hook contract and worked examples.

Integrate from another app

If you're building another Hantera app that needs shipping quotes from nShift — for example a storefront-checkout bridge that renders nShift options inside an iframe — you can import the public getOptions function from this app's Filtrera module.

See the Shipping Module reference for the import path, types, and the requires.modules declaration you need to add to your app.

See Also

© 2024 Hantera AB. All rights reserved.