Prerequisites
The following prerequisites must be completed sequentially to configure a fee.- Create a cart.
- Create a fulfillment to apply the fulfillment fee.
- Create an item to add the item fee.
Fee Initialization
You can apply fees at multiple levels, including the cart, individual items, or fulfillment. The fee resource maintains a consistent structure across all levels. Taxes on fees is controlled by thetaxable
attribute in the request payload, which defaults to true
. This means fees are taxed unless specifically set to false
.
The following code sample provides the structure of a fee object:
Click to expand the JSON example.
Click to expand the JSON example.
Click to expand the JSON example.
Click to expand the JSON example.
Examples
Adding shipping fees, including shipping fee tax
The following steps outline how a fulfillment fee is configured:-
Create fulfillment fee.
Click to expand the curl example.
-
Add tax for the fulfillment fee using the replace tax data endpoint.
Click to expand the curl and JSON response examples
Tax here includes fulfillment tax and fulfillment the fee tax as provided in the payload.Response:
Applying a gifting fee to items that are gift-wrapped
Use the create item fees endpoint to apply the gifting fees to the items that are gift wrapped. The following curl example provides how the request is structured when creating an item fee:Click to expand the curl example.
Click to expand the curl example.
Adding a platform fee at the cart level
Use the create cart fees endpoint to add a platform fee at the cart level. The following curl example provides how the request is structured when creating fee at the cart level:Click to expand the curl example.
Click to expand the curl example.