Location selection widget

Implement the Clickbox location selection widget in your checkout to let customers select where to collect their packages.

Demo

See https://w.clickbox.com/demo.html for a demo of the location selection widget.

Prerequisities

  • You will need your Clickbox public merchant token. Ask your Clickbox or Aeropost contact to get your token. You can test your token on the demo page.

Implementation

Refer to the npm package documentation for how to implement the widget. It can be implemented either as a bundled package or as an external script from our servers.

Handle selection

When a customer has selected a location, the widget returns an object with information about the location(see npm docs for details), including an id, which you include when sending your package information to Clickbox or Aeropost Shipper API.

Clickbox

Include the selected id as the dropoff_location_id when creating a new shipment to instruct Clickbox to deliver the package to the selected location.

Aeropost Shipper API

When creating a parcel in the Shipper API, set ship_to to location_id and set location_id to the selected id from the widget to instruct Clickbox to deliver the package to the selected location.