Hey! These docs are for version 1.1, which is no longer officially supported. Click here for the latest version, 1.2!

You may configure EasyShip to execute callback functions on the success or failure of a shipment label's generation. As each shipment label is submitted for purchase on your page, a poller will monitor the statuses for all pending labels until generation has completed.

A successful label generation will trigger the .success() callback function and, likewise, a failure to generate a label will trigger the .failure() function.

Example configuration

To enable this feature, you must set a polling interval in milliseconds, with a minimum of 500ms.


By default the success and failure functions do nothing, so you will need to customize them. A JSON object representing the shipment will be passed into the callback functions and is identical to the payload sent via the EasyShip webhooks.

  EasyShip.success = function (shipment) {
	  console.log("Success: " + shipment.tracking_number);

  EasyShip.failure = function (shipment) {
	  console.log("Failure: " + shipment.order_number);

Example JSON payload

   "carrier_service":"Priority Mail (2-3 days)",
      "name":"EasyShip Test Customer",
      "email":"[email protected]"