How to Display Rates at Checkout
The Rates at Checkout (RaC) feature allows you to provide end customers with multiple shipping options before the order is placed. This feature can be easily integrated into your shopping website.
This guide covers the Rates at Checkout feature API integration into your custom website.
To learn more about the Rates at Checkout integration workflow for e-commerce platforms with list of supported stores, refer to our Shipping Rates at Checkout Feature Help Centre article.
Endpoint description
The RaC feature is available via the Rates API and requires the Rate
authorisation scope.
POST https://api.easyship.com/2023-01/rates
In request body, this API method requires the shipment details below.
- Origin address is an origin
address
object. Use Addresses API to get the originaddress
object. - Destination address is an
address
object from the data provided by the end customer. To make sure the customerβs address is valid and correct, use our Address Validation feature. - Parcel details is a
parcel
object with the following required fields:items
β array ofitem
objects describing items to be shipped. Item objects can be filled from scratch or assigned by product IDs in case you have pre-filled Products APIbox
β object with shipment packaging details. Box can be specified explicitly as acustom
one or assigned by aslug
from predefined options available via the Box APItotal_actual_weight
β total weight of a shipment in kilograms
In response, you will obtain the rates
object containing an array of available couriers with their applicable shipment rates and additional data.
Courier rates are scored by Easyship and returned in ascending order by a total shipment charge and in descending order by best value for money. This array allows you to display the cheapest, fastest and best value for money options to your end customer.
International shipping
Depending on the shipment type and conditions, you can display different breakdown of costs at checkout for your end user. For international shipments, you may have the following duties payment options:
- Delivered Duty Unpaid (DDU) where the buyer is responsible for paying any taxes, duties, or import fees on the shipment.
- Delivered Duty Paid (DDP) where the seller is responsible for paying any taxes, duties, or import fees on the shipment.
To learn more about DDP and DDU Incoterms, see our DDU vs. DDP: Understanding the Differences Help Centre article.
DDP terms are different depending on whether your business uses the IOSS system or not. - Import One Stop Shop (IOSS) is an electronic portal in the European Union that businesses can use to pay any Import VAT on commercial goods shipped into the EU, under the value of β¬150,00 (euros).
To learn more about IOSS system and how it will affect you as an international shipper, see our What is IOSS Help Centre article.
Refer to our How to Calculate Taxes and Duties API guide to obtain an easy-to-understand taxes and duties price breakdown.
Below, you will find the request and response body schemas, as well as complete request and response examples.
Request body parameters
Field name | Data type | Description |
---|---|---|
origin_address | Object (Address) | Address object for shipment origin (Address API). |
destination_address | Object (Address) | Address object for shipment destination (Address API). |
parcels | Array of objects:items (Object)box (Object)total_actual_weight (Integer) | Shipment items: The items object for shipment itemsThe box object for shipment packaging (Box API)total_actual_weight of a shipment |
Response body parameters
Field name | Data type | Description |
---|---|---|
courier_id | String | Courier service identifier on the Easyship platform. |
courier_name | String | Name of the courier service. |
courier_remarks | String | Additional details of the courier service. |
description | String | Short courier service description. |
full_description | String | Full courier service description. |
easyship_rating | Integer | Average ratings of the courier service provided by Easyship users and end customers. |
cost_rank | Integer | Result of the Easyship cost scoring for a specified shipment: 1 is the best option. |
delivery_time_rank | Integer | Result of the Easyship delivery time scoring based on minimal delivery time estimation: 1 is the best option. |
tracking_rating | Integer | Courierβs rating based on number and accuracy of tracking details provided (from 1 to 5 in descending order). |
value_for_money_rank | Integer | Combined rank calculated by comparison of cost and delivery time ranks: 1 is the best option. |
available_handover_options | Array (Enum (String)) | Options provided by a courier for delivery handover:dropoff free_pickup paid_pickup |
incoterms | Enum (String) | Applicable Incoterms: DDU or DDP |
max_delivery_time | Integer | Upper bound of the delivery window (working days). |
min_delivery_time | Integer | Lower bound of the delivery window (working days). |
is_above_threshold | Boolean | True if the purchase price of the shipment exceeds the customs threshold specified by an import country. In this case, the following charges will be applicable:import_tax_charge import_duty_charge estimated_import_tax If false , these charges will be 0 . |
currency | Enum (String) | ISO-4217 three-letter alphabetic currency code. |
payment_recipient | Enum (String) | Payment recipient for a shipment:Easyship EasyshipPayOnScan Courier |
discount | Object | Applicable courier discount (amount or percentage):amount β fixed discount amountorigin_amount β discount percentage |
shipment_charge | Number | Base courier service charge. |
shipment_charge_total | Number | Subtotal of the following charges:shipment_charge fuel_surcharge residential_full_fee residential_discounted_fee remote_area_surcharge additional_services_surcharge oversized_surcharge |
total_charge | Number | Total charge including shipment_charge_total and all applicable fees, taxes and duties. |
additional_services_surcharge | Number | Charges applicable for additional delivery services (e.g. delivery confirmation). |
ddp_handling_fee | Number | Additional fees for the DDP option: courier pays import taxes and duties on buyerβs behalf. DDP handling fee is not charged if the IOSS scheme is in place and an order value is less than 150 euro. |
estimated_import_duty | Number | Estimated shipment import duty in case of DDU Incoterms. |
estimated_import_tax | Number | Estimated shipment import tax, in case of DDU Incoterms. |
import_duty_charge | Number | Shipment import duty for DDP Incoterms. |
import_tax_charge | Number | Shipment import duty for DDP Incoterms. |
fuel_surcharge | Number | Fuel surcharge applicable for a shipment. |
import_tax_non_chargeable | Number | IOSS amount of import tax. This tax is not charged while shipping and is displayed for information purposes only. |
insurance_fee | Number | Applicable delivery insurance fee. |
minimum_pickup_fee | Number | Minimal estimated delivery pickup fee (for the paid_pickup handover option if available). |
oversized_surcharge | Number | Surcharge for an oversized package, if applicable. |
provincial_sales_tax | Number | State, province or local government taxes, if applicable. |
remote_area_surcharge | Number | Total remote area surcharge for origin and destination areas (see remote_area_surcharges below). |
remote_area_surcharges | Object | Additional surcharge payable if delivery is specified for distant areas (e.g. islands or highlands):origin for a shipment origindestination for a shipment destinationBoth origin and destination objects include the following fields:name β name of the distant areabase β amount payable |
residential_discounted_fee | Number | Discounted fee provided by the courier if a recipientβs delivery address corresponds with their residential address. |
residential_full_fee | Number | Full fee payable if a recipientβs delivery address corresponds with their residential address. |
sales_tax | Number | National government sales tax. |
warehouse_handling_fee | Number | Fee added by a fulfilment service for warehouse operations. |
other_surcharges | Object | Other applicable surcharges:total_fee β total amount of other surchargesdetails :name β surcharge namefee β surcharge amount in the currency of the shipmentorigin_fee β surcharge amount in the currency of the origin country |
rates_in_origin_currency | Object | Fees and charges in the currency of the shipment origin country:currency shipment_charge shipment_charge_total total_charge additional_services_surcharge ddp_handling_fee estimated_import_duty estimated_import_tax import_duty_charge import_tax_charge fuel_surcharge import_tax_non_chargeable insurance_fee minimum_pickup_fee oversized_surcharge provincial_sales_tax remote_area_surcharge residential_discounted_fee residential_full_fee sales_tax warehouse_handling_fee |
Examples
Request body
{
"origin_address": {
"line_1": "55 Prospect St",
"line_2": "Unit 401",
"state": "NY",
"city": "Sydney",
"postal_code": "11201",
"country_alpha2": "US"
},
"destination_address": {
"line_1": "1 quai de Jemmapes",
"line_2": "Porte A",
"state": "CA",
"city": "Paris",
"postal_code": "75010",
"country_alpha2": "FR"
},
"output_currency": "HKD"
},
"parcels": [
"items": [
{
"description": "Silk dress",
"category": "fashion",
"sku": "test01",
"quantity": 2,
"dimensions": {
"length": null,
"width": null,
"height": null
},
"actual_weight": 10,
"declared_currency": "USD",
"declared_customs_value": 20
}
]
}
]
}
Response body
{
"status": "success",
"rates": [
{
"courier_id": "a6d078fd-e662-40ce-9efe-84caaa639bf7",
"courier_name": "USPS - First Class International",
"min_delivery_time": 5,
"max_delivery_time": 9,
"value_for_money_rank": 1.0,
"delivery_time_rank": 5.0,
"currency": "HKD",
"shipment_charge": 200.86,
"fuel_surcharge": 0.0,
"remote_area_surcharge": 0.0,
"remote_area_surcharges": {},
"other_surcharges": {},
"oversized_surcharge": 0.0,
"additional_services_surcharge": 0.0,
"residential_full_fee": 0.0,
"residential_discounted_fee": 0.0,
"shipment_charge_total": 200.86,
"warehouse_handling_fee": 0.0,
"insurance_fee": 0.0,
"sales_tax": 0.0,
"provincial_sales_tax": 0.0,
"ddp_handling_fee": 0.0,
"import_tax_charge": 0.0,
"import_tax_non_chargeable": 0.0,
"import_duty_charge": 0.0,
"total_charge": 200.86,
"is_above_threshold": true,
"incoterms": "DDU",
"estimated_import_tax": 102.94,
"estimated_import_duty": 0.0,
"minimum_pickup_fee": 0.0,
"available_handover_options": "dropoff,free_pickup",
"tracking_rating": 1,
"easyship_rating": 3.5,
"courier_remarks": null,
"payment_recipient": "Easyship",
"discount": {
"amount": 0,
"code": null,
"percentage": null,
"expires_at": null,
"origin_amount": 0
},
"description": "Estimated 102.94 tax & duty due on delivery (Tax handling fees may apply)",
"full_description": "USPS - First Class International (5-9 working days) Estimated 102.94 tax & duty due on delivery (Tax handling fees may apply)"
}
To learn more about the calculation process, refer to our How Shipping Rates Are Calculated at Checkout Help Center article.
Updated 10 months ago