Tax Protocol GraphQL API
GraphQL API reference for the Tax Protocol.
This API allows setting and retrieving the Tax Configuration, which is part of the OrderForm configuration for the Tax Service.
Schema overview
Query
Field | Argument | Type | Description |
---|---|---|---|
getTaxConfiguration | TaxConfiguration | Retrieves the tax configuration of an account from the orderForm using the Checkout API (Get orderForm configuration). |
Mutation
Field | Argument | Type | Description |
---|---|---|---|
setTaxConfiguration | OrderFormConfiguration | Activates or deactivates the tax service in the orderForm configuration using the (Update orderForm configuration) endpoint. | |
operation | String | Argument to define whether the tax service will be activated or deactivated. Possible values: "activate" , "deactivate" . |
Schema description
Arguments must be provided by the user. Required fields are marked with an exclamation mark (
!
).
OrderFormConfiguration
Field | Argument | Type | Description |
---|---|---|---|
paymentConfiguration | PaymentConfiguration | Payment configuration information. | |
taxConfiguration | TaxConfiguration | External tax service configuration information. | |
minimumQuantityAccumulatedForItems | Int | Minimum SKU quantity per cart. This field is mandatory and must be sent in all requests. | |
decimalDigitsPrecision | Int | Number of decimal price digits. | |
minimumValueAccumulated | Int | Minimum cart total. | |
apps | [App] | List of App objects, where each object has a piece of app configuration information. You can see an example with the apps list in the Get orderForm configuration response body. | |
allowMultipleDeliveries | Boolean | Enables multiple delivery options in a single purchase. | |
allowManualPrice | Boolean | Allows editing SKU prices directly in the cart. | |
maxIntOfWhiteLabelSellers | Int | Maximum number of white label sellers allowed in the cart. | |
maskFirstPurchaseData | Boolean | Masks customer data for first-time purchases. This can be useful when using a shared cart and the customer doesn't want to share their data. | |
recaptchaValidation | Boolean | Configures reCAPTCHA validation status for the account. |
Mutation 🔼
App
Field | Argument | Type | Description |
---|---|---|---|
fields | [String] | List of fields available to the app. | |
id | String | App ID. | |
major | Int | App major version. |
PaymentConfiguration
Field | Argument | Type | Description |
---|---|---|---|
requiresAuthenticationForPreAuthorizedPaymentOption | Boolean | Determines whether pre-authorized payments require authentication. This field is mandatory and must be sent in all requests. | |
allowInstallmentsMerge | Boolean | The default when this is false and a multi-seller purchase is in progress is to simply show the installment options that are common to all sellers. When true , this option allows a more complex but flexible installment option configuration taking into account the installment maximum of every seller, even if they don't match. Installment values don't need to be equal in this case. | |
blockPaymentSession | Boolean | Indicates whether shoppers can add credit cards in the store's My Account section. | |
paymentSystemToCheckFirstInstallment | Boolean | If you want to apply a first-installment discount to a particular payment system, set this field to the ID of the payment system. Learn more in Configuring a discount for orders paid in full. |
TaxConfiguration
Field | Type | Description |
---|---|---|
allowExecutionAfterErrors | Boolean | Allows proceeding with the purchase even when there's a tax system problem. |
authorizationHeader | String | String that Checkout will use in the Authorization header of calls to the external tax calculation API. This field can be used to define the access credentials for this API. Example: "99b9935b048dfd86893d0bf9gas628849" . |
integratedAuthentication | Boolean | When true , the tax system will use VTEX auth. When false , it will use the authorizationHeader instead. |
url | String | External API endpoint URL of the tax provider that Checkout will query to receive the calculated taxes. Example: "https://sandbox-rest.avatax.com/api/v2/transactions/create" . |
Query 🔼