Tax API reference

The checkout module provides REST and GraphQL APIs to configure out-of-process tax integrations.

REST

Route URL
Method
Description
/V1/oope_tax_management/tax_integration/:code
GET
Retrieve an OOPE tax integration info by its code.
/V1/oope_tax_management/tax_integration
GET
List all available tax integration info.
/V1/oope_tax_management/tax_integration
POST
Create or update an OOPE tax integration.

Create or modify a new OOPE tax integration

The POST /V1/oope_tax_management/tax_integration/:code endpoint creates an out-of-process tax integration in the Adobe Commerce instance.

data-variant=info
data-slots=text
Only one tax integration can be active at a time. If you want to change the active tax integration, you must first deactivate the current one.

Payload parameters:

Parameter
Type
Required
Description
code
String
Yes
Unique identifier for the tax integration.
title
String
Yes
Display name of the tax integration.
active
Boolean
No
Indicates whether the tax integration is active. Triggers tax calculation when an address is set on the Cart.
stores
Array
No
List of store codes where the tax integration is available.
credit_memo_tax_enabled
Boolean
No
Indicates whether credit memo tax collection is active. Recalculation occurs when the credit memo adjustment refund or fee is non-zero.
data-slots=heading, code
data-repeat=2
data-languages=bash, json

Example request

curl --request POST \
--url <ADOBE_COMMERCE_API_URL>/V1/oope_tax_management/tax_integration \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"tax_integration": {
    "code": "tax-1",
    "title": "Tax Integration 1",
    "active": true,
    "stores": ["store-1", "store-2"],
    "credit_memo_tax_enabled": false
}
}'

Example response

{
  "success": true,
  "message": {
    "id": 1,
    "code": "tax-1",
    "title": "Tax Integration 1",
    "active": true,
    "stores": ["store-1", "store-2"],
    "credit_memo_tax_enabled": false
  }
}

Get an OOPE tax integration by code

The GET /V1/oope_tax_management/tax_integration/:code retrieves one out-of-process tax integration by code from the Adobe Commerce instance.

Payload parameters:

Parameter
Type
Description
code
String
Unique identifier for the tax integration.
data-slots=heading, code
data-repeat=2
data-languages=bash, json

Example request

curl --request GET \
--url <ADOBE_COMMERCE_API_URL>/V1/oope_tax_management/tax_integration/:code' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json'

Example response

{
  "success": true,
  "message": {
    "id": 1,
    "code": "tax-1",
    "title": "Tax Integration 1",
    "active": true,
    "stores": ["store-1", "store-2"],
    "credit_memo_tax_enabled": false
  }
}

List all OOPE tax integrations

The GET /V1/oope_tax_management/tax_integration retrieves a list of all out-of-process tax integrations from the Adobe Commerce instance.

data-slots=heading, code
data-repeat=2
data-languages=bash, json

Example request

curl --request GET \
--url <ADOBE_COMMERCE_API_URL>/V1/oope_tax_management/tax_integration' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json'

Example response

{
  "success": true,
  "message": [
    {
      "id": 1,
      "code": "tax-1",
      "title": "Tax Integration 1",
      "active": true,
      "stores": ["store-1", "store-2"],
      "credit_memo_tax_enabled": false
    }
  ]
}

Create a tax class with custom attributes

The out-of-process tax module extends the POST /V1/taxClasses endpoint to allow creating tax classes with custom attributes.

data-slots=heading, code
data-repeat=2
data-languages=bash, json

Example request

curl --request POST \
--url <ADOBE_COMMERCE_API_URL>/V1/taxClasses \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
  "class_name": "Test Tax Class",
  "class_type": "PRODUCT",
  "custom_attributes": [
    {
      "attribute_code": "tax_code",
      "value": "005"
    }
  ]
}'

Example response

"3"

Update a tax class with custom attributes

The out-of-process tax module extends the PUT /V1/taxClasses/:classId endpoint to update an existing tax class with custom attributes.

data-slots=heading, code
data-repeat=2
data-languages=bash, json

Example request

curl --request POST \
--url <ADOBE_COMMERCE_API_URL>/V1/taxClasses/4 \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
  "class_id": 4,
  "class_name": "Updated Tax Class",
  "class_type": "PRODUCT",
  "custom_attributes": [
    {
      "attribute_code": "tax_code",
      "value": "005"
    }
  ]
}'

Example response

"4"

List all tax classes with custom attributes

The out-of-process tax module extends the GET /V1/taxClasses/search endpoint to include custom attributes in the response when available.

data-slots=heading, code
data-repeat=2
data-languages=bash, json

Example request

curl --request GET \
--url '<ADOBE_COMMERCE_API_URL>/V1/taxClasses/search?searchCriteria[pageSize]=100' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json'

Example response

{
  "items": [
    {
      "class_id": 1,
      "class_name": "Retail Tax Class",
      "class_type": "CUSTOMER",
      "extension_attributes": {},
      "custom_attributes": [
        {
          "attribute_code": "tax_code",
          "value": "005"
        },
        {
          "attribute_code": "tax_label",
          "value": "Retail"
        }
      ]
    }
  ],
  "search_criteria": {
    "filter_groups": [],
    "sort_orders": [],
    "page_size": 100,
    "current_page": 1
  },
  "total_count": 1
}

GraphQL

The following are GraphQL query examples to check the taxes applied by the tax integration.

Cart taxes

To check the taxes applied to the cart, you can use the getCart query to retrieve the cart/prices/applied_taxes field. This field contains information about the taxes applied to the cart.

data-variant=info
data-slots=text
To enable full tax breakdown, which displays each tax separately instead of combining them, set Stores > Settings > Configuration > Sales > Tax > Shopping Cart Display Settings > Display Full Tax Summary to Yes