Configuring Shipping and Other Charges
Read about how to configure shipping and other charges like insurance in your requests.
You may want to create a method that allows buyers to include shipping or other charges in their transactions. These charges are maintained for each transaction line.
Tax Inclusive and Exclusive Charges
The service is designed for you to send it shipping amounts that do not include the tax. If you do not specify a line featuring product_class=s
in your requests, no shipping is calculated.
If your shipping charges do include tax, you can either exclude the line from your requests or deduct the tax from the total charge and send the shipping charges without tax to the service.
Tax Calculation
Tax is calculated on these charges at the standard rate for the country that is specified in the ship_to_address.country_code
field.
Reduced Rates
The VAT for some goods is reduced for certain countries.
To configure this reduced rate, you need to add a Product Code in the 'product_code_cn' field in your requests. For more information, see Configuring Product Codes.
If a basket contains only goods with a reduced rate, the VAT for the shipping is charged at the reduced rate. Where there are 2 reduced rates and one is lower than the other, the higher rate is applied.
If a basket contains a mix of goods with standard and reduced rates and shipping is a single charge for both, the standard rate is applied.
Adding Charges to a Request
To include a shipping charge for a transaction line, you add the product_class=S
field and the rest of the details.
If you do use product_class=S
, you must ensure that there is also an equivalent line for physical goods (product_class=P
) that shares at least one of the following. Both lines must be included in the same Transaction object in the same request.
- The same consignment ID is used by both transaction lines. You can use the
consignment_id
field to specify an ID that groups transaction lines that belong to the same consignment together. - The same ship from information is used in each line.
The following example shows you can model a shipping charge by using the same ship_from_address
:
{
"transaction":{
"currency_code":"EUR",
"buyer_name":"Eric Papin",
"ship_to_address":{
"address_detail":"Chateuax 12",
"building_number":"55",
"street_name":"Rue du Saint-Germain",
"city":"Paris",
"postal_code":"75008 ",
"country_code":"FR"
},
"transaction_lines":[
{
"product_class":"S",
"quantity":1,
"description":"Shipping Charges",
"amount":"5.95",
"custom_id":"test_ID_4",
"import_address":{
"country_code":"FR"
},
"ship_from_address":{
"building_number":"12",
"street_name":"Wessex End Street",
"city":"London",
"postal_code":"SW1A 2AA",
"country_code":"GB"
}},
{
"product_class":"P",
"quantity":7,
"description":"UnSmoked herrings",
"amount":"39.95",
"custom_id":"test_ID_4",
"import_address":{
"country_code":"FR"
},
"ship_from_address":{
"building_number":"12",
"street_name":"Wessex End Street",
"city":"London",
"postal_code":"SW1A 2AA",
"country_code":"GB"
}
The following example shows you can model a shipping charge by using the same consignment_id
:
{
"transaction": {
"currency_code": "EUR",
"buyer_name": "Eric Papin",
"ship_to_address": {
"address_detail": "Chateuax 12",
"building_number": "55",
"street_name": "Rue du Saint-Germain",
"city": "Paris",
"postal_code": "75008 ",
"country_code": "FR"
},
"transaction_lines": [
{
"product_class": "S",
"quantity": 1,
"description": "Shipping Charges",
"amount": "5.95",
"custom_id": "test_ID_4",
"consignment_id": "001",
"import_address":{
"country_code": "FR"
},
"ship_from_address": {
"building_number": "12",
"street_name": "Wessex End Street",
"city": "London",
"postal_code": "SW1A 2AA",
"country_code": "GB"
},
[{
"product_class":"P",
"quantity":7,
"description":"UnSmoked herrings",
"amount":"39.95",
"custom_id":"test_ID_4",
"consignment_id": "001",
"import_address":{
"country_code":"FR"
},
"ship_from_address":{
"building_number":"12",
"street_name":"Wessex End Street",
"city":"London",
"postal_code":"SW1A 2AA",
"country_code":"GB"
}]
Updated over 1 year ago