{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/stripe/main/json-schema/stripe-post-tax-calculations-request-schema.json",
  "title": "PostTaxCalculationsRequest",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stripe-tax-api-openapi.yml#/components/schemas/PostTaxCalculationsRequest",
  "type": "object",
  "required": [
    "currency",
    "line_items"
  ],
  "properties": {
    "currency": {
      "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).",
      "type": "string"
    },
    "customer": {
      "description": "The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to `customer_details`.",
      "maxLength": 5000,
      "type": "string"
    },
    "customer_details": {
      "description": "Details about the customer, including address and tax IDs.",
      "properties": {
        "address": {
          "properties": {
            "city": {
              "anyOf": [
                {
                  "maxLength": 5000,
                  "type": "string"
                },
                {
                  "enum": [
                    ""
                  ],
                  "type": "string"
                }
              ]
            },
            "country": {
              "maxLength": 5000,
              "type": "string"
            },
            "line1": {
              "anyOf": [
                {
                  "maxLength": 5000,
                  "type": "string"
                },
                {
                  "enum": [
                    ""
                  ],
                  "type": "string"
                }
              ]
            },
            "line2": {
              "anyOf": [
                {
                  "maxLength": 5000,
                  "type": "string"
                },
                {
                  "enum": [
                    ""
                  ],
                  "type": "string"
                }
              ]
            },
            "postal_code": {
              "anyOf": [
                {
                  "maxLength": 5000,
                  "type": "string"
                },
                {
                  "enum": [
                    ""
                  ],
                  "type": "string"
                }
              ]
            },
            "state": {
              "anyOf": [
                {
                  "maxLength": 5000,
                  "type": "string"
                },
                {
                  "enum": [
                    ""
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "required": [
            "country"
          ],
          "title": "postal_address",
          "type": "object"
        },
        "address_source": {
          "enum": [
            "billing",
            "shipping"
          ],
          "type": "string"
        },
        "ip_address": {
          "type": "string"
        },
        "tax_ids": {
          "items": {
            "properties": {
              "type": {
                "enum": [
                  "ad_nrt",
                  "ae_trn",
                  "ar_cuit",
                  "au_abn",
                  "au_arn",
                  "bg_uic",
                  "bo_tin",
                  "br_cnpj",
                  "br_cpf",
                  "ca_bn",
                  "ca_gst_hst",
                  "ca_pst_bc",
                  "ca_pst_mb",
                  "ca_pst_sk",
                  "ca_qst",
                  "ch_vat",
                  "cl_tin",
                  "cn_tin",
                  "co_nit",
                  "cr_tin",
                  "do_rcn",
                  "ec_ruc",
                  "eg_tin",
                  "es_cif",
                  "eu_oss_vat",
                  "eu_vat",
                  "gb_vat",
                  "ge_vat",
                  "hk_br",
                  "hu_tin",
                  "id_npwp",
                  "il_vat",
                  "in_gst",
                  "is_vat",
                  "jp_cn",
                  "jp_rn",
                  "jp_trn",
                  "ke_pin",
                  "kr_brn",
                  "li_uid",
                  "mx_rfc",
                  "my_frp",
                  "my_itn",
                  "my_sst",
                  "no_vat",
                  "nz_gst",
                  "pe_ruc",
                  "ph_tin",
                  "ro_tin",
                  "rs_pib",
                  "ru_inn",
                  "ru_kpp",
                  "sa_vat",
                  "sg_gst",
                  "sg_uen",
                  "si_tin",
                  "sv_nit",
                  "th_vat",
                  "tr_tin",
                  "tw_vat",
                  "ua_vat",
                  "us_ein",
                  "uy_ruc",
                  "ve_rif",
                  "vn_tin",
                  "za_vat"
                ],
                "maxLength": 5000,
                "type": "string",
                "x-stripeBypassValidation": true
              },
              "value": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "value"
            ],
            "title": "data_params",
            "type": "object"
          },
          "type": "array"
        },
        "taxability_override": {
          "enum": [
            "customer_exempt",
            "none",
            "reverse_charge"
          ],
          "type": "string"
        }
      },
      "title": "customer_details",
      "type": "object"
    },
    "expand": {
      "description": "Specifies which fields in the response should be expanded.",
      "items": {
        "maxLength": 5000,
        "type": "string"
      },
      "type": "array"
    },
    "line_items": {
      "description": "A list of items the customer is purchasing.",
      "items": {
        "properties": {
          "amount": {
            "type": "integer"
          },
          "product": {
            "maxLength": 5000,
            "type": "string"
          },
          "quantity": {
            "type": "integer"
          },
          "reference": {
            "maxLength": 500,
            "type": "string"
          },
          "tax_behavior": {
            "enum": [
              "exclusive",
              "inclusive"
            ],
            "type": "string"
          },
          "tax_code": {
            "type": "string"
          }
        },
        "required": [
          "amount"
        ],
        "title": "calculation_line_item",
        "type": "object"
      },
      "type": "array"
    },
    "shipping_cost": {
      "description": "Shipping cost details to be used for the calculation.",
      "properties": {
        "amount": {
          "type": "integer"
        },
        "shipping_rate": {
          "maxLength": 5000,
          "type": "string"
        },
        "tax_behavior": {
          "enum": [
            "exclusive",
            "inclusive"
          ],
          "type": "string"
        },
        "tax_code": {
          "type": "string"
        }
      },
      "title": "shipping_cost",
      "type": "object"
    },
    "tax_date": {
      "description": "Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future.",
      "type": "integer"
    }
  }
}