openapi: 3.0.3 info: title: TaxJar Sales Tax Categories Transactions - Refunds API description: REST API for real-time sales tax calculation, rooftop-level rate lookups, tax category listing, transaction management (orders and refunds), customer exemption management, nexus region tracking, address validation, and VAT validation. Supports token-based authentication via Authorization header. TaxJar is a Stripe company providing sub-20ms response times and 99.999% historical uptime. version: '2.0' contact: name: TaxJar Developer Support url: https://support.taxjar.com/category/233-taxjar-api termsOfService: https://www.taxjar.com/terms/ x-api-id: taxjar-sales-tax servers: - url: https://api.taxjar.com/v2 description: Production - url: https://api.sandbox.taxjar.com/v2 description: Sandbox security: - bearerAuth: [] tags: - name: Transactions - Refunds description: Refund transaction management paths: /transactions/refunds: get: operationId: listRefunds summary: List refund transactions description: Returns a list of refund transaction IDs for the authenticated account. Supports filtering by date range and provider. tags: - Transactions - Refunds parameters: - name: transaction_date in: query description: Filter refunds by exact transaction date (YYYY-MM-DD) schema: type: string format: date - name: from_transaction_date in: query description: Start date filter (YYYY-MM-DD) schema: type: string format: date - name: to_transaction_date in: query description: End date filter (YYYY-MM-DD) schema: type: string format: date - name: provider in: query description: Filter by provider schema: type: string responses: '200': description: List of refund transaction IDs content: application/json: schema: type: object properties: refunds: type: array items: type: string '401': $ref: '#/components/responses/Unauthorized' post: operationId: createRefund summary: Create a refund transaction description: Creates a new refund transaction linked to an order transaction. tags: - Transactions - Refunds requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RefundRequest' responses: '201': description: Refund transaction created content: application/json: schema: type: object properties: refund: $ref: '#/components/schemas/Refund' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/UnprocessableEntity' /transactions/refunds/{transaction_id}: get: operationId: showRefund summary: Show a refund transaction description: Returns a single refund transaction by transaction ID. tags: - Transactions - Refunds parameters: - name: transaction_id in: path required: true description: Unique identifier for the refund transaction schema: type: string - name: provider in: query description: Provider for the transaction schema: type: string responses: '200': description: Refund transaction details content: application/json: schema: type: object properties: refund: $ref: '#/components/schemas/Refund' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' put: operationId: updateRefund summary: Update a refund transaction description: Updates an existing refund transaction by transaction ID. tags: - Transactions - Refunds parameters: - name: transaction_id in: path required: true description: Unique identifier for the refund transaction schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RefundRequest' responses: '200': description: Updated refund transaction content: application/json: schema: type: object properties: refund: $ref: '#/components/schemas/Refund' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteRefund summary: Delete a refund transaction description: Deletes an existing refund transaction by transaction ID. tags: - Transactions - Refunds parameters: - name: transaction_id in: path required: true description: Unique identifier for the refund transaction schema: type: string - name: provider in: query description: Provider for the transaction schema: type: string responses: '200': description: Deleted refund transaction content: application/json: schema: type: object properties: refund: $ref: '#/components/schemas/Refund' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' components: schemas: LineItem: type: object properties: id: type: string quantity: type: integer product_identifier: type: string description: type: string product_tax_code: type: string unit_price: type: number format: float discount: type: number format: float sales_tax: type: number format: float LineItemRequest: type: object properties: id: type: string description: Unique identifier for the line item quantity: type: integer description: Quantity of the item example: 1 product_identifier: type: string description: Product SKU or identifier description: type: string description: Description of the product product_tax_code: type: string description: Product tax code for category-specific rates unit_price: type: number format: float description: Unit price of the item example: 15.0 discount: type: number format: float description: Discount amount for this line item sales_tax: type: number format: float description: Sales tax collected for this line item RefundRequest: type: object required: - transaction_id - transaction_date - transaction_reference_id - to_country - to_zip - to_state - amount - shipping - sales_tax properties: transaction_id: type: string description: Unique identifier for this refund transaction example: '321' transaction_date: type: string description: Date of the refund (YYYY-MM-DD or ISO 8601) example: 2015/05/14 transaction_reference_id: type: string description: Transaction ID of the original order being refunded example: '123' provider: type: string description: Source of the transaction example: api exemption_type: type: string description: Exemption type enum: - wholesale - government - other - non_exempt from_country: type: string example: US from_zip: type: string from_state: type: string from_city: type: string from_street: type: string to_country: type: string example: US to_zip: type: string example: '90002' to_state: type: string example: CA to_city: type: string to_street: type: string amount: type: number format: float example: 16.5 shipping: type: number format: float example: 1.5 sales_tax: type: number format: float example: 0.95 line_items: type: array items: $ref: '#/components/schemas/LineItemRequest' Refund: type: object properties: transaction_id: type: string example: '321' user_id: type: integer transaction_date: type: string example: '2015-05-14T00:00:00Z' transaction_reference_id: type: string example: '123' provider: type: string example: api exemption_type: type: string from_country: type: string from_zip: type: string from_state: type: string from_city: type: string from_street: type: string to_country: type: string to_zip: type: string to_state: type: string to_city: type: string to_street: type: string amount: type: number format: float shipping: type: number format: float sales_tax: type: number format: float line_items: type: array items: $ref: '#/components/schemas/LineItem' Error: type: object properties: error: type: string description: Error type detail: type: string description: Human-readable error detail status: type: integer description: HTTP status code responses: Unauthorized: description: Unauthorized - invalid or missing API token content: application/json: schema: $ref: '#/components/schemas/Error' UnprocessableEntity: description: Unprocessable entity - validation error content: application/json: schema: $ref: '#/components/schemas/Error' BadRequest: description: Bad request - invalid parameters content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: bearerAuth: type: http scheme: bearer description: 'Use your TaxJar API token. Format: "Bearer [token]" or "Token token=[token]"'