Collect on Delivery

With the Collect on Delivery option you can now allow your customers to defer payment until they receive their shipment instead of paying at the time of their order.

Check Carrier support

First check that the carrier that you're using supports the Collect on Delivery option. Please see the following reference guide for further details

Collect on Delivery Fields

When creating a shipment, label, or rate in ShipEngine, you can use the advanced_options.collect_on_delivery field to specify the Collect On Delivery options.

Example Snippet

{
  "advanced_options": {
    "collect_on_delivery": {
      "payment_type": "cash",
      "payment_amount": {
        "amount": 10.7,
        "currency": "usd"
      }
    }
  }
}
Properties Description
payment_type enumerated string, required
any, cash, cash_equivalent, none
amount decimal, required
currency enumerated string, required
usd, cad, aud, gbp, eur, nzd

Info To cancel a collect on delivery you must update the shipment, set the payment type to none and the amount to 0.

Info The cash_equivalent payment_type specified in the request can cover a wide range of payment methods depending on the carrier. For example, users can pay with a cashier's check or a money order.

Please check with your selected carrier if this will be relevant to you or your customer.

Select Collect On Delivery

You can designate collect on delivery with the following API calls:

  • POST /v1/shipments
  • PUT /v1/shipments/{shipment_id}
  • POST /v1/labels
  • POST /v1/rates

Shipment Example

  curl -iX POST https://api.shipengine.com/v1/shipments \
-H 'Content-Type: application/json' \
-H 'API-Key: __YOUR_API_KEY_HERE__' \
-d '
{
  "shipments": [
    {
      "service_code": "ups_ground",
      "validate_address": "no_validation",
      "ship_to": {
        "name": "Amanda Miller",
        "phone": "555-555-5555",
        "address_line1": "525 S Winchester Blvd",
        "city_locality": "San Jose",
        "state_province": "CA",
        "postal_code": "95128",
        "country_code": "US",
        "address_residential_indicator": "yes"
      },
      "ship_from": {
        "company_name": "Example Corp.",
        "name": "John Doe",
        "phone": "111-111-1111",
        "address_line1": "4009 Marathon Blvd",
        "address_line2": "Suite 300",
        "city_locality": "Austin",
        "state_province": "TX",
        "postal_code": "78756",
        "country_code": "US",
        "address_residential_indicator": "no"
      },
      "confirmation": "none",
      "advanced_options": {
        "collect_on_delivery": {
          "payment_type": "cash",
          "payment_amount": {
            "amount": 10.7,
            "currency": "usd"
          }
        }
      },
      "insurance_provider": "none",
      "tags": [],
      "packages": [
        {
          "weight": {
            "value": 1,
            "unit": "ounce"
          }
        }
      ]
    }
  ]
}'
  {
  "shipments": [
    {
      "errors": [],
      "address_validation": null,
      "shipment_id": "se-1020109",
      "carrier_id": "se-95",
      "service_code": "ups_ground",
      "external_shipment_id": null,
      "ship_date": "2019-09-25T00:00:00Z",
      "created_at": "2019-09-25T19:03:49.0116799Z",
      "modified_at": "2019-09-25T19:03:49.0126795Z",
      "shipment_status": "pending",
      "ship_to": {
        "name": "Amanda Miller",
        "phone": "555-555-5555",
        "address_line1": "525 S Winchester Blvd",
        "city_locality": "San Jose",
        "state_province": "CA",
        "postal_code": "95128",
        "country_code": "US",
        "address_residential_indicator": "yes"
      },
      "ship_from": {
        "company_name": "Example Corp.",
        "name": "John Doe",
        "phone": "111-111-1111",
        "address_line1": "4009 Marathon Blvd",
        "address_line2": "Suite 300",
        "city_locality": "Austin",
        "state_province": "TX",
        "postal_code": "78756",
        "country_code": "US",
        "address_residential_indicator": "no"
      },
      "warehouse_id": null,
      "return_to": {
        "company_name": "Example Corp.",
        "name": "John Doe",
        "phone": "111-111-1111",
        "address_line1": "4009 Marathon Blvd",
        "address_line2": "Suite 300",
        "city_locality": "Austin",
        "state_province": "TX",
        "postal_code": "78756",
        "country_code": "US",
        "address_residential_indicator": "no"
      },
      "confirmation": "none",
      "customs": null,
      "external_order_id": null,
      "order_source_code": null,
      "advanced_options": {
        "bill_to_account": null,
        "bill_to_country_code": null,
        "bill_to_party": null,
        "bill_to_postal_code": null,
        "contains_alcohol": false,
        "delivered_duty_paid": false,
        "non_machinable": false,
        "saturday_delivery": false,
        "dry_ice": false,
        "dry_ice_weight": null,
        "freight_class": null,
        "custom_field1": null,
        "custom_field2": null,
        "custom_field3": null,
        "collect_on_delivery": {
          "payment_type": "cash",
          "payment_amount": {
            "currency": "usd",
            "amount": 10.7
          }
        }
      },
      "insurance_provider": "none",
      "tags": [],
      "packages": [
        {
          "package_code": "package",
          "weight": {
            "value": 1.0,
            "unit": "ounce"
          },
          "dimensions": {
            "unit": "inch",
            "length": 0.0,
            "width": 0.0,
            "height": 0.0
          },
          "insured_value": {
            "currency": "usd",
            "amount": 0.0
          },
          "label_messages": {
            "reference1": null,
            "reference2": null,
            "reference3": null
          },
          "external_package_id": null
        }
      ],
      "total_weight": {
        "value": 1.0,
        "unit": "ounce"
      },
      "items": []
    }
  ]
}

Label Example

  curl -iX POST https://api.shipengine.com/v1/labels \
  -H 'Content-Type: application/json' \
  -H 'API-Key: __YOUR_API_KEY_HERE__' \
  -d '
{
  "shipment": {
    "service_code": "ups_ground",
    "external_shipment_id": "__YOUR_EXTERNAL_ID_HERE__",
    "ship_to": {
      "name": "John Stuckey",
      "phone": "6625905259",
      "company_name": "John Stuckey",
      "address_line1": "3412 Pemberton Square Blvd",
      "address_line2": "Ste 2-241",
      "city_locality": "VICKSBURG",
      "postal_code": "39180-5541",
      "country_code": "US",
      "state_province": "MS",
      "address_residential_indicator": "unknown"
    },
    "ship_from": {
      "name": "Fulfillment Center",
      "phone": "877-743-2269",
      "company_name": "BBQGuys",
      "address_line1": "8151 Airline Hwy",
      "city_locality": "Baton Rouge",
      "postal_code": "70815",
      "country_code": "US",
      "state_province": "LA"
    },
    "confirmation": "none",
    "packages": [
      {
        "weight": {
          "value": 2,
          "unit": "pound"
        },
        "dimensions": {
          "unit": "inch",
          "length": 2,
          "width": 14,
          "height": 17
        }
      }
    ],
    "advanced_options": {
      "collect_on_delivery": {
        "payment_type": "any",
        "payment_amount": {
          "amount": 10.7,
          "currency": "usd"
        }
      }
    }
  }
}'
  • curl

The collect on delivery payment option is not shown in the response from creating a label.

{
  "label_id": "se-6615",
  "status": "completed",
  "shipment_id": "se-1020115",
  "ship_date": "2019-09-26T00:00:00Z",
  "created_at": "2019-09-26T17:48:59.2732285Z",
  "shipment_cost": {
    "currency": "usd",
    "amount": 27.27
  },
  "insurance_cost": {
    "currency": "usd",
    "amount": 0.0
  },
  "tracking_number": "1Z14Y0487211178222",
  "is_return_label": false,
  "rma_number": null,
  "is_international": false,
  "batch_id": "",
  "carrier_id": "se-95",
  "service_code": "ups_ground",
  "package_code": "package",
  "voided": false,
  "voided_at": null,
  "label_format": "pdf",
  "label_layout": "4x6",
  "trackable": true,
  "carrier_code": "ups",
  "tracking_status": "in_transit",
  "label_download": {
    "pdf": "http://localhost:55163/v1/downloads/1/7OC4emEGkEmtutHwzbhvwg/label-6615.pdf",
    "png": "http://localhost:55163/v1/downloads/1/7OC4emEGkEmtutHwzbhvwg/label-6615.png",
    "zpl": "http://localhost:55163/v1/downloads/1/7OC4emEGkEmtutHwzbhvwg/label-6615.zpl",
    "href": "http://localhost:55163/v1/downloads/1/7OC4emEGkEmtutHwzbhvwg/label-6615.pdf"
  },
  "form_download": null,
  "insurance_claim": null,
  "packages": [
    {
      "package_code": "package",
      "weight": {
        "value": 2.00,
        "unit": "pound"
      },
      "dimensions": {
        "unit": "inch",
        "length": 2.00,
        "width": 14.00,
        "height": 17.00
      },
      "insured_value": {
        "currency": "usd",
        "amount": 0.00
      },
      "tracking_number": "1Z14Y0487211178222",
      "label_messages": {
        "reference1": null,
        "reference2": null,
        "reference3": null
      },
      "external_package_id": null
    }
  ]
}