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 |
---|---|---|
| Object (Address) |
|
| Object (Address) |
|
| Array of objects:
| Shipment items: The The
|
Response body parameters
Field name | Data type | Description |
---|---|---|
| String | Courier service identifier on the Easyship platform. |
| String | Name of the courier service. |
| String | Additional details of the courier service. |
| String | Short courier service description. |
| String | Full courier service description. |
| Integer | Average ratings of the courier service provided by Easyship users and end customers. |
| Integer | Result of the Easyship cost scoring for a specified shipment: |
| Integer | Result of the Easyship delivery time scoring based on minimal delivery time estimation: |
| Integer | Courier’s rating based on number and accuracy of tracking details provided (from |
| Integer | Combined rank calculated by comparison of cost and delivery time ranks: |
| Array (Enum (String)) | Options provided by a courier for delivery handover:
|
| Enum (String) | Applicable Incoterms: |
| Integer | Upper bound of the delivery window (working days). |
| Integer | Lower bound of the delivery window (working days). |
| Boolean |
|
| Enum (String) | ISO-4217 three-letter alphabetic currency code. |
| Enum (String) | Payment recipient for a shipment:
|
| Object | Applicable courier discount (amount or percentage):
|
| Number | Base courier service charge. |
| Number | Subtotal of the following charges:
|
| Number | Total charge including |
| Number | Charges applicable for additional delivery services (e.g. delivery confirmation). |
| 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. |
| Number | Estimated shipment import duty in case of DDU Incoterms. |
| Number | Estimated shipment import tax, in case of DDU Incoterms. |
| Number | Shipment import duty for DDP Incoterms. |
| Number | Shipment import duty for DDP Incoterms. |
| Number | Fuel surcharge applicable for a shipment. |
| Number | IOSS amount of import tax. This tax is not charged while shipping and is displayed for information purposes only. |
| Number | Applicable delivery insurance fee. |
| Number | Minimal estimated delivery pickup fee (for the |
| Number | Surcharge for an oversized package, if applicable. |
| Number | State, province or local government taxes, if applicable. |
| Number | Total remote area surcharge for origin and destination areas (see |
| Object | Additional surcharge payable if delivery is specified for distant areas (e.g. islands or highlands):
Both
|
| Number | Discounted fee provided by the courier if a recipient’s delivery address corresponds with their residential address. |
| Number | Full fee payable if a recipient’s delivery address corresponds with their residential address. |
| Number | National government sales tax. |
| Number | Fee added by a fulfilment service for warehouse operations. |
| Object | Other applicable surcharges:
|
| Object | Fees and charges in the currency of the shipment origin country:
|
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 12 days ago