Custom surcharges

You can apply custom surcharges or tips to the order total through our custom discount API.

The setup process and request format are the same (see: set up custom discount, request for discount and response

The only difference is in response to this request.

{
    "surcharges": [
        {
          "id": "paypal",
          "value": 1.5,
          "type": "PERCENT",
          "description": "+1.5% for PayPal payments",
          "taxable": true
        },
      
        {
          "id": "gift_wrap",
          "value": 5,
          "type": "ABSOLUTE",
          "description": "+$5 for gift wrap",
          "taxable": false
        }
    ]

}

An array of JSON data of type 'CustomSurcharges' with the following fields:

CustomSurcharges

NameTypeDescription
idstringSurcharge id
valuenumberSurcharge amount
typenumberSurcharge type: ABSOLUTE or PERCENT. Default is ABSOLUTE
descriptionstringSurcharge description. Is displayed to customers on the cart page and in order details
taxablebooleanDetermines if store taxes should be applied to the surcharge.