Skip to main content

shippingTaxPreview

Requires an authenticated session.

Returns the tax a new document would charge on a shipping amount, under the organization's "Apply tax on shipping charge" setting. Saves nothing. Use it to preview a document total.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

query ShippingTaxPreview($input: ShippingTaxPreviewInput!) {
shippingTaxPreview(input: $input) {
taxAmount
}
}

Variables:

{
"input": {
"currency": "string",
"shippingAmount": 0
}
}

Response:

{
"data": {
"shippingTaxPreview": {
"taxAmount": 0
}
}
}
shippingTaxPreview(
input: ShippingTaxPreviewInput!
): ShippingTaxPreview!

Arguments​

shippingTaxPreview.input ● ShippingTaxPreviewInput! non-null input​

The shipping charge, its currency and the tax method.

Type​

ShippingTaxPreview object​

The tax a new document would charge on its shipping, under the organization's "Apply tax on shipping charge" setting.