Checkout Fees

Add order level fees to a checkout

POST /checkouts/{checkoutId}/fees

Request

Adds order level fees to a checkout.

Limits:

  • Maximum of 5 fees per checkout.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • checkoutId in path - string
    required
    ID of the checkout; the same as the cart ID.
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.
  • Content-Type in header with default of application/json - string
    required
    The MIME type of the request body.

Body

object | application/json
  • fees
    array[object]
    required

    The fees to be added to a checkout.

example

{
"fees": [
{
"type": "custom_fee",
"name": "AAINS",
"display_name": "Package Protection Insurance",
"cost": 7.12,
"source": "AA",
"tax_class_id": 1
}
]
}

Response

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

example

{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"cart": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"customer_id": 1,
"email": "user@example.com",
"currency": {
"code": "USD"
},
"base_amount": 5,
"channel_id": 0,
"discount_amount": 0.5,
"cart_amount_inc_tax": 4.14,
"cart_amount_ex_tax": 3.6,
"coupons": [
{
"code": "SHOPNOW",
"id": 1,
"coupon_type": "percentage_discount",
"discounted_amount": 0.9,
"display_name": "20% Off"
}
],
"discounts": [
{
"id": "5eba1f1e-0ec5-40f7-8058-f7b452c7237d",

Update order level fees in a checkout

PUT /checkouts/{checkoutId}/fees

Request

Updates order level fees in a checkout. > We do not support partial updates, so please send the total entity values for each fee to be updated.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • checkoutId in path - string
    required
    ID of the checkout; the same as the cart ID.
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.

Body

object | application/json
  • fees
    array[object]
    required

    The fees to be updated in a checkout.

example

{
"fees": [
{
"type": "custom_fee",
"name": "AAINS",
"display_name": "Package Protection Insurance",
"cost": 7.12,
"source": "AA",
"tax_class_id": 1,
"id": "3c26f3e6-146d-4dce-8159-2a77c0bba409"
}
]
}

Response

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

example

{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"cart": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"customer_id": 1,
"email": "user@example.com",
"currency": {
"code": "USD"
},
"base_amount": 5,
"channel_id": 0,
"discount_amount": 0.5,
"cart_amount_inc_tax": 4.14,
"cart_amount_ex_tax": 3.6,
"coupons": [
{
"code": "SHOPNOW",
"id": 1,
"coupon_type": "percentage_discount",
"discounted_amount": 0.9,
"display_name": "20% Off"
}
],
"discounts": [
{
"id": "5eba1f1e-0ec5-40f7-8058-f7b452c7237d",

Delete order level fees from a checkout.

DELETE /checkouts/{checkoutId}/fees

Request

Delete fees from a checkout.

Note

  • The Try It feature is not currently supported for this endpoint.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • checkoutId in path - string
    required
    ID of the checkout; the same as the cart ID.
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.

Body

object | application/json
  • ids
    array[string]
    required

    The IDs of the fees to be deleted from a checkout.

example

curl --request DELETE \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/checkouts/[checkoutId]/fees' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'

Response

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

example

{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"cart": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"customer_id": 1,
"email": "user@example.com",
"currency": {
"code": "USD"
},
"base_amount": 5,
"channel_id": 0,
"discount_amount": 0.5,
"cart_amount_inc_tax": 4.14,
"cart_amount_ex_tax": 3.6,
"coupons": [
{
"code": "SHOPNOW",
"id": 1,
"coupon_type": "percentage_discount",
"discounted_amount": 0.9,
"display_name": "20% Off"
}
],
"discounts": [
{
"id": "5eba1f1e-0ec5-40f7-8058-f7b452c7237d",
Did you find what you were looking for?